Learning Objectives
By the end of this section, you will be able to:
- Define what a partial differential equation is and explain how it differs from an ordinary differential equation
- Identify the key components: dependent variable, independent variables, partial derivatives, and order
- Classify second-order linear PDEs as elliptic, parabolic, or hyperbolic based on their discriminant
- Interpret the physical meaning of the heat equation and wave equation
- Understand why PDEs require both initial conditions and boundary conditions
- Recognize PDEs in applications from physics, engineering, finance, and machine learning
- Implement basic finite difference solvers for PDEs in Python
The Big Picture: Why PDEs Matter
"The deep study of nature is the most fruitful source of mathematical discoveries." — Joseph Fourier
While ordinary differential equations describe how quantities change with respect to one variable (usually time), the physical world is far richer. Temperature varies across both space and time. Waves propagate through two or three dimensions. Electromagnetic fields permeate all of space. To describe these phenomena, we need equations that involve derivatives with respect to multiple independent variables.
The Central Concept
A partial differential equation (PDE) is an equation involving an unknown function of several variables and its partial derivatives with respect to those variables.
PDEs: The Language of Continuous Phenomena
PDEs are the mathematical language for describing:
📍 Phenomena in Space
- Gravitational and electric fields
- Fluid flow patterns
- Stress and strain in materials
- Electromagnetic wave propagation
⏱️ Evolution in Time + Space
- Heat diffusion through materials
- Sound and light propagation
- Quantum mechanical systems
- Financial option pricing
Historical Origins
The study of PDEs emerged from the great scientific questions of the 18th and 19th centuries: How does heat flow? How do waves propagate? What determines the shape of a vibrating membrane?
Key Historical Developments
1747: Jean le Rond d'Alembert
First solved the wave equation for a vibrating string. Introduced the method of characteristics and the concept of traveling wave solutions.
1822: Joseph Fourier
Published "Théorie Analytique de la Chaleur," introducing the heat equation and Fourier series. This work revolutionized mathematics and physics.
1830s: George Green, Carl Friedrich Gauss
Developed potential theory and Laplace's equation. Green's theorem and Gauss's law connect PDEs to physics.
1926: Erwin Schrödinger
Formulated quantum mechanics using the Schrödinger equation, a PDE governing the wave function of particles.
2015-Present: Neural PDEs
Physics-Informed Neural Networks (PINNs) and diffusion models bring PDEs into the heart of modern machine learning.
What is a Partial Differential Equation?
A partial differential equation is an equation that contains partial derivatives of an unknown function of two or more independent variables.
Formal Definition
A PDE in the unknown function is an equation of the form:
where is a given function, and the equation involves at least one partial derivative.
Anatomy of a PDE
Consider the heat equation:
| Component | Symbol | Meaning |
|---|---|---|
| Dependent variable | u = u(x,t) | The unknown function (e.g., temperature) |
| Independent variables | x, t | Position and time |
| Partial derivative (1st order) | ∂u/∂t | Rate of change with respect to time |
| Partial derivative (2nd order) | ∂²u/∂x² | Curvature with respect to position |
| Parameter | α | Thermal diffusivity (material property) |
Order of a PDE
The order of a PDE is the order of the highest partial derivative appearing in the equation.
| Equation | Highest Derivative | Order |
|---|---|---|
| ∂u/∂t = c∂u/∂x | ∂u/∂t or ∂u/∂x | First order |
| ∂u/∂t = α∂²u/∂x² | ∂²u/∂x² | Second order |
| ∂²u/∂t² = c²∂²u/∂x² | ∂²u/∂t² or ∂²u/∂x² | Second order |
| ∂⁴u/∂x⁴ = 0 | ∂⁴u/∂x⁴ | Fourth order |
ODE vs PDE: The Key Distinction
Understanding the difference between ODEs and PDEs is fundamental. The distinction goes beyond notation to the very nature of the problems.
Ordinary Differential Equations
- One independent variable (e.g., time t)
- Solution: a function y(t) of one variable
- Requires: initial conditions only
- Example: Population growth, radioactive decay
- Solution space: finite-dimensional
Partial Differential Equations
- Multiple independent variables (e.g., x, y, t)
- Solution: a function u(x,t) of several variables
- Requires: initial AND boundary conditions
- Example: Heat diffusion, wave propagation
- Solution space: infinite-dimensional
Why Boundary Conditions?
PDEs describe phenomena that occur over spatial domains. We must specify what happens at the boundaries of that domain:
- Dirichlet: Specify the value of u at the boundary (e.g., fixed temperature)
- Neumann: Specify the derivative ∂u/∂n at the boundary (e.g., heat flux)
- Robin: Specify a combination of u and ∂u/∂n (e.g., convective cooling)
Notation and Terminology
PDEs use several notational conventions. Familiarity with these is essential for reading the literature.
Partial Derivative Notation
| Notation | Meaning | Used When |
|---|---|---|
| ∂u/∂x | Partial derivative of u with respect to x | General, formal writing |
| uₓ | Subscript notation for ∂u/∂x | Compact, handwritten |
| u_x or u_t | Subscript with underscore | Computer code, LaTeX |
| uₓₓ | Second derivative ∂²u/∂x² | Higher derivatives |
| uₓₜ or u_{xt} | Mixed derivative ∂²u/∂x∂t | Cross-derivatives |
Differential Operators
The Laplacian Operator
The Laplacian (or ) appears throughout PDEs:
The Laplacian Measures Curvature
The Laplacian measures how much the value of u at a point differs from the average of u in the surrounding region. It captures the "curvature" of the function in all directions.
Classification of Second-Order PDEs
Second-order linear PDEs are classified into three types based on a discriminant condition. This classification determines the fundamental behavior of solutions.
Consider the general second-order linear PDE in two variables:
The discriminant determines the type:
For the general equation Auxx + Buxy + Cuyy + ... = 0, classification depends on the discriminant B² - 4AC
Elliptic PDEs
Canonical Form
∂²u/∂x² + ∂²u/∂y² = 0
Classification Criterion
B² - 4AC < 0
Physical Interpretation
Describes steady-state or equilibrium phenomena. Solutions are smooth and satisfy maximum principles.
Examples
- Laplace's equation (electrostatics, steady heat)
- Poisson's equation (gravitational potential)
- Minimal surface equation (soap films)
Characteristic Curves
Characteristic curves show how information propagates through the solution domain.
| Type | Discriminant | Characteristics | Prototype |
|---|---|---|---|
| Elliptic | B² - 4AC < 0 | None (complex) | uxx + uyy = 0 |
| Parabolic | B² - 4AC = 0 | One family | ut = uxx |
| Hyperbolic | B² - 4AC > 0 | Two families | utt = c²uxx |
Physical Intuition for Classification
The classification reflects fundamentally different physical behaviors:
- Elliptic: Equilibrium problems — the solution smoothly adjusts everywhere simultaneously
- Parabolic: Diffusion problems — information spreads out over time, smoothing sharp features
- Hyperbolic: Wave problems — information travels at finite speed along characteristics
The Heat Equation: Diffusion in Action
The heat equation is the prototypical parabolic PDE. It describes how temperature (or any diffusing quantity) evolves over time.
The Heat Equation
Physical Interpretation
The heat equation says: Temperature tends to equalize.
- If a point is hotter than its neighbors (negative curvature), , so : it cools down.
- If a point is colder than its neighbors (positive curvature), , so : it warms up.
- Sharp peaks and valleys smooth out over time — this is diffusion.
Interactive visualization of the 1D heat equation: ∂u/∂t = α·∂²u/∂x²
Higher α = faster heat diffusion
Observe:
- • Heat spreads from hot to cold regions
- • Sharp features smooth out over time
- • Total heat is conserved (fixed boundaries)
- • Eventually reaches equilibrium (u = 0)
The Wave Equation: Propagation Without Diffusion
The wave equation is the prototypical hyperbolic PDE. It describes how disturbances propagate through a medium at a finite speed.
The Wave Equation
Physical Interpretation
The wave equation says: Curvature creates restoring forces.
- If a point is displaced above its neighbors (negative curvature), the restoring force pulls it down — acceleration is negative.
- If a point is displaced below its neighbors (positive curvature), the restoring force pushes it up — acceleration is positive.
- This leads to oscillatory motion that propagates at speed c.
Interactive visualization of the 1D wave equation: ∂²u/∂t² = c²·∂²u/∂x²
Higher c = faster wave propagation
Observe:
- • Waves propagate in both directions
- • Waves reflect at fixed boundaries
- • Shape is preserved during propagation
- • Energy oscillates between kinetic and potential
Key Difference from Heat Equation
Heat Equation (Parabolic)
- First order in time
- Information spreads infinitely fast
- Sharp features smooth out (irreversible)
- Needs 1 initial condition
Wave Equation (Hyperbolic)
- Second order in time
- Information travels at speed c
- Shape is preserved (reversible)
- Needs 2 initial conditions (u and ∂u/∂t)
Real-World Applications
PDEs are everywhere in science and engineering. The same mathematical structures describe phenomena from quantum mechanics to option pricing.
Explore how partial differential equations describe fundamental physical phenomena
Heat Equation
Variables
Physical Meaning
Describes how heat (or any diffusing quantity) spreads through a medium over time. The rate of temperature change is proportional to the curvature of the temperature profile.
Real-World Applications
🤖 Machine Learning Connection
Diffusion models (Stable Diffusion, DALL-E) are based on the heat equation with learned reverse diffusion.
Machine Learning Connections
PDEs have become central to modern machine learning, appearing in both theoretical foundations and practical algorithms.
1. Diffusion Models (Stable Diffusion, DALL-E)
State-of-the-art image generation uses score-based diffusion, which is fundamentally connected to the heat equation:
The model learns to reverse a diffusion process, gradually converting noise into coherent images by following the score (gradient of log probability).
2. Physics-Informed Neural Networks (PINNs)
PINNs embed PDEs directly into the loss function:
where penalizes violations of the governing PDE. This allows neural networks to:
- Learn from sparse data by encoding physical constraints
- Solve forward and inverse PDE problems
- Discover unknown parameters in physical laws
3. Neural Operators (Fourier Neural Operator)
Instead of learning point-wise mappings, neural operators learn solution operators for entire families of PDEs:
This enables real-time prediction of PDE solutions for new initial/boundary conditions without re-solving.
4. Graph Neural Networks and the Laplacian
Many GNN architectures are based on the discrete Laplacian:
This is a discrete heat equation! Information diffuses across the graph, analogous to heat spreading through a material.
Python Implementation
Solving the Heat Equation Numerically
Solving the Wave Equation Numerically
Common Pitfalls
Forgetting Boundary Conditions
Unlike ODEs, PDEs require boundary conditions in addition to initial conditions. Without proper boundary conditions, the problem is ill-posed and solutions may not exist or be unique.
Violating Stability Conditions
Explicit finite difference methods require the CFL condition:
- Heat equation:
- Wave equation:
Violating these causes the numerical solution to explode!
Confusing PDE Types
The three types (elliptic, parabolic, hyperbolic) have fundamentally different solution behaviors:
- Elliptic: No time variable — boundary value problems
- Parabolic: First-order in time — initial + boundary value
- Hyperbolic: Second-order in time — needs two initial conditions
Checking Your Solution
For PDEs with known analytical solutions (like the heat equation with sine initial conditions), always verify your numerical solution against the exact answer. Check that the error decreases as you refine the grid.
Test Your Understanding
What distinguishes a PDE from an ODE?
Summary
Partial differential equations extend the power of calculus to describe phenomena that vary in multiple dimensions. They are the mathematical foundation for physics, engineering, and increasingly, machine learning.
Key Concepts
| Concept | Description |
|---|---|
| PDE | Equation involving partial derivatives of a function of several variables |
| Order | Highest order partial derivative in the equation |
| Elliptic | B² - 4AC < 0; steady-state problems (Laplace) |
| Parabolic | B² - 4AC = 0; diffusion problems (Heat) |
| Hyperbolic | B² - 4AC > 0; wave propagation (Wave) |
| Laplacian | ∇²u = uₓₓ + uᵧᵧ + ...; measures curvature |
| Boundary conditions | Values or derivatives specified at domain boundaries |
| Initial conditions | Values specified at t = 0 for time-dependent problems |
Key Takeaways
- PDEs involve partial derivatives with respect to multiple independent variables, unlike ODEs which have only one
- Second-order linear PDEs are classified as elliptic, parabolic, or hyperbolic based on the discriminant B² - 4AC
- The heat equation (parabolic) describes diffusion — sharp features smooth out over time
- The wave equation (hyperbolic) describes propagation — information travels at finite speed
- PDEs require boundary conditions in addition to initial conditions to be well-posed
- Modern ML applications include diffusion models, PINNs, and neural operators
- Numerical solutions must respect stability conditions (CFL) to avoid blow-up
Coming Next: In the next section, we'll explore the Classification of PDEs in more depth. You'll learn how to determine the type of a PDE from its coefficients and understand the physical implications of each classification.