Partial differential equations
Heat spreading through metal, waves on a string, oil seeping through rock, air flowing over a wing: the laws of continuous media are PDEs.
An ODE (Ordinary Differential Equation) describes one quantity changing in time — the temperature of a cup. A PDE describes a quantity that varies in space and time — the temperature at every point of a metal rod. Because it depends on several variables, its derivatives are partial derivatives. Three equations — heat, wave and Laplace — teach almost everything you need to start.
- the heat, wave and Laplace/Poisson equations and what they model;
- initial and boundary conditions (Dirichlet, Neumann, Robin);
- classification into elliptic, parabolic and hyperbolic, and well-posedness;
- solving the heat equation with Fourier series;
- where PDEs meet SciML (Scientific Machine Learning).
Hold one end of a metal rod at $0\,{}^\circ$C and the other at $100\,{}^\circ$C, and wait. The temperature becomes a straight line, $u(x) = 100x$ (for a rod of length 1). Why does it stop changing? The heat equation says $u_t = \alpha u_{xx}$, and a straight line has no curvature: $u_{xx} = 0$, so $u_t = 0$. Now take a curved profile, the "hill" $u = 400x(1 - x)$ with both ends at $0\,{}^\circ$C: $u_{xx} = -800 < 0$ everywhere, so $u_t = -800\alpha < 0$ — every point cools. The rule in words: points that are hotter than the average of their neighbours cool down; points that are colder warm up. That is all the heat equation says.
1. Notation and definition
For $u(x, t)$ we write $u_t = \frac{\partial u}{\partial t}$, $u_x = \frac{\partial u}{\partial x}$, $u_{xx} = \frac{\partial^2 u}{\partial x^2}$. In several space dimensions the Laplacian is $\Delta u = \nabla^2 u = u_{xx} + u_{yy} + u_{zz}$.
A PDE is an equation involving an unknown function of two or more independent variables and its partial derivatives, $F(x, t, u, u_x, u_t, u_{xx}, \dots) = 0$. Its order is that of the highest derivative; it is linear if $F$ is linear in $u$ and all its derivatives.
Evans, Partial Differential Equations, 2nd ed., AMS (2010), chapter 1; Strauss, Partial Differential Equations: An Introduction, 2nd ed., Wiley (2008), chapter 1.| Equation | Name | Type | Models |
|---|---|---|---|
| $u_t = \alpha\, u_{xx}$ | heat / diffusion | parabolic | heat conduction, pollutant spreading, reservoir pressure |
| $u_{tt} = c^2 u_{xx}$ | wave | hyperbolic | strings, sound, seismic waves |
| $-\Delta u = f$ | Poisson (Laplace if $f = 0$) | elliptic | steady temperature, electrostatics, groundwater |
| $u_t + u\,u_x = \nu\, u_{xx}$ | Burgers | nonlinear | shocks, toy model of fluid flow — a PINN favourite |
2. The heat equation

Heat flows from hot to cold, at a rate proportional to the temperature gradient (Fourier's law, 1822). Conservation of energy in a thin rod then gives $$u_t = \alpha\, u_{xx}, \qquad 0 < x < L,\ t > 0,$$ where $\alpha > 0$ is the thermal diffusivity. The intuition: $u_{xx} > 0$ where the profile is a "valley" (cooler than its neighbours) — so it warms up; at a "peak" $u_{xx} < 0$ and it cools. Diffusion smooths everything out.
To get a unique solution we need an initial condition $u(x, 0) = u_0(x)$ and a condition at each end — a boundary condition:
| Type | Formula | Physical meaning |
|---|---|---|
| Dirichlet | $u(0, t) = g(t)$ | end held at a given temperature (in ice water) |
| Neumann | $u_x(0, t) = 0$ | insulated end: no heat flows through |
| Robin | $-u_x(0,t) + \beta u(0,t) = 0$ | cooling by surrounding air (Newton's law) |
Solving it: separation of variables and Fourier series
Try $u(x,t) = X(x)\,T(t)$ in $u_t = \alpha u_{xx}$ on $[0,1]$ with $u(0,t) = u(1,t) = 0$. Dividing by $\alpha XT$: $\frac{T'}{\alpha T} = \frac{X''}{X} = -\lambda$ (a constant, since the left depends only on $t$ and the right only on $x$). The boundary conditions allow only $X = \sin(k\pi x)$ with $\lambda = (k\pi)^2$, and then $T = e^{-\alpha k^2\pi^2 t}$. Adding all such solutions:
$$u(x,t) = \sum_{k=1}^{\infty} b_k\, e^{-\alpha k^2\pi^2 t}\sin(k\pi x), \qquad b_k = 2\int_0^1 u_0(x)\sin(k\pi x)\,dx.$$ Each Fourier mode decays at its own rate $\alpha k^2\pi^2$: mode 10 dies 100 times faster than mode 1. This is why the simulation smooths so quickly.
Strauss (2008), chapters 4–5 (separation of variables, Fourier series); Fourier, Théorie analytique de la chaleur, Paris (1822).3. The wave equation

For a stretched string with small vertical displacement $u(x,t)$, Newton's law gives $$u_{tt} = c^2 u_{xx},$$ with wave speed $c = \sqrt{\text{tension}/\text{density}}$. It needs two initial conditions — initial shape $u(x,0)$ and initial velocity $u_t(x,0)$ — because it is second order in time. Unlike heat, waves do not smooth out: they travel and reflect, carrying their shape. d'Alembert (1747) showed that on an infinite line every solution is $u = F(x - ct) + G(x + ct)$: one wave moving right, one moving left.
4. Steady state: Laplace and Poisson
Wait long enough and the temperature in a plate stops changing: $u_t = 0$. The heat equation in 2D, $u_t = \alpha(u_{xx} + u_{yy})$, becomes Laplace's equation $$\Delta u = u_{xx} + u_{yy} = 0,$$ or, with a heat source $f$, Poisson's equation $-\Delta u = f$. There is no time and no initial condition — only boundary conditions. A key property: a solution of Laplace's equation equals the average of its values around any circle (mean value property), so the maximum and minimum occur on the boundary (maximum principle).
Evans (2010), chapter 2.2 "Laplace's equation" (mean-value formulas, maximum principle).5. Classification and well-posedness
For $A u_{xx} + 2B u_{xy} + C u_{yy} + (\text{lower-order terms}) = 0$, the equation is elliptic if $B^2 - AC < 0$ (Laplace), parabolic if $B^2 - AC = 0$ (heat), and hyperbolic if $B^2 - AC > 0$ (wave).
Strauss (2008), chapter 1.6 "Types of second-order equations".The type predicts behaviour: elliptic → smooth steady states determined by the whole boundary; parabolic → smoothing in time, infinite propagation speed; hyperbolic → finite-speed waves that keep sharp features. Numerical methods must respect the type.
A problem is well-posed if (1) a solution exists, (2) it is unique, and (3) it depends continuously on the data (small changes in initial/boundary data give small changes in the solution). The backward heat equation — recovering the past temperature from the present — violates (3): it is ill-posed.
Hadamard, "Sur les problèmes aux dérivées partielles et leur signification physique", Princeton University Bulletin 13 (1902) 49–52; Evans (2010), chapter 1.Many practical tasks are inverse problems — find the diffusivity, the source or the initial state from sparse measurements — and these are often ill-posed. Data alone fits noise; physics alone lacks the unknown parameters. PINNs combine both: the PDE residual acts as a regulariser on the data fit (Raissi, Perdikaris & Karniadakis, J. Comput. Phys. 378, 2019, 686–707).
Pressure $p(x,t)$ in a porous rock saturated with a slightly compressible fluid obeys a diffusion equation $$\phi\,\mu\, c_t\, \frac{\partial p}{\partial t} = \nabla\cdot\big(k\,\nabla p\big),$$ with porosity $\phi$, viscosity $\mu$, total compressibility $c_t$ and permeability $k(x)$ — Darcy's law plus conservation of mass. Well tests measure pressure at a well and solve the inverse problem for $k$. Full reservoir simulators solve coupled nonlinear PDEs for several phases (oil, water, gas) on millions of cells.
Aziz & Settari, Petroleum Reservoir Simulation, Applied Science Publishers (1979); Chen, Huan & Ma, Computational Methods for Multiphase Flows in Porous Media, SIAM (2006).6. Try it in Python
The Fourier series solution of the heat equation, with a square-wave initial temperature.
import numpy as np
import matplotlib.pyplot as plt
alpha = 1.0
x = np.linspace(0, 1, 400)
u0 = np.where((x > 0.3) & (x < 0.7), 1.0, 0.0) # hot middle section
K = 200 # number of Fourier modes
k = np.arange(1, K + 1)[:, None]
dx = x[1] - x[0]
bk = 2 * (u0 * np.sin(k * np.pi * x)).sum(axis=1)[:, None] * dx # b_k = 2 * integral of u0 sin(k pi x)
for t in [0, 0.001, 0.01, 0.05, 0.2]:
u = (bk * np.exp(-alpha * (k * np.pi)**2 * t) * np.sin(k * np.pi * x)).sum(axis=0)
plt.plot(x, u, label=f"t = {t}")
plt.xlabel("x"); plt.ylabel("u(x, t)"); plt.legend(); plt.grid(alpha=.3)
plt.title("Heat equation by Fourier series"); plt.show()
What type is $u_{xx} + u_{yy} = 0$?
Right: $A = C = 1$, $B = 0$, so $B^2 - AC = -1 < 0$.
A rod with both ends insulated starts with temperature 1 on the left half and 0 on the right half. Long after, the temperature is…
Right: insulated (Neumann) ends conserve total heat, which spreads evenly to the average, 0.5.
Analytical solutions (Fourier series, Green's functions) exist only for simple equations, geometries and coefficients. Real problems — variable permeability, complex geometry, nonlinear terms, unknown coefficients — need numerical methods, and often data. Chapter 9 looks at these limits honestly, and at how SciML methods address them by building on what you learned here. Go to Chapter 9 →
- PDEs involve partial derivatives of a function of several variables.
- Heat (parabolic) smooths; wave (hyperbolic) propagates; Laplace (elliptic) is the steady state.
- A PDE needs initial and boundary conditions; Dirichlet fixes values, Neumann fixes fluxes.
- Fourier series solve the heat equation; high-frequency modes decay fastest.
- Well-posed = exists, unique, stable. Inverse problems are often ill-posed — a key motivation for physics-informed learning.
Further reading
- W. A. Strauss, Partial Differential Equations: An Introduction, 2nd ed., Wiley, 2008 — the best first book.
- L. C. Evans, Partial Differential Equations, 2nd ed., American Mathematical Society, 2010 — the standard graduate text.
- W. E. Boyce, R. C. DiPrima & D. B. Meade, Elementary Differential Equations and Boundary Value Problems, 11th ed., Wiley, 2017 — chapter 10.
- K. Aziz & A. Settari, Petroleum Reservoir Simulation, Applied Science Publishers, 1979.