Introduction to PDEs
Every equation so far has had one independent variable. But heat spreads through
space and time, a wave depends on position and time, and an electric
potential varies across a whole region. Their unknown is a function of several variables, so
the equation involves
partial derivatives
— it is a partial differential equation (PDE).
Three linear second-order PDEs underpin an astonishing share of physics. Writing
u_t = \partial u/\partial t,
u_{xx} = \partial^2 u/\partial x^2, they are:
\underbrace{u_t = \alpha\, u_{xx}}_{\text{heat}}, \qquad \underbrace{u_{tt} = c^2\, u_{xx}}_{\text{wave}}, \qquad \underbrace{u_{xx} + u_{yy} = 0}_{\text{Laplace}}.
Heat diffuses (smooths out), waves propagate (travel undamped), and
Laplace describes the steady state when nothing changes in time. One technique cracks
all three: separation of variables.
Separating the heat equation, line by line
Solve u_t = \alpha\, u_{xx} by hunting for solutions that split
into a function of x times a function of
t.
Step 1 — assume a product.
u(x, t) = X(x)\,T(t).
Step 2 — take the derivatives the equation needs. Only
T depends on t, only
X on x:
u_t = X\,T', \qquad u_{xx} = X''\,T.
Step 3 — substitute into u_t = \alpha\, u_{xx}.
X\,T' = \alpha\,X''\,T.
Step 4 — separate the variables. Divide by
\alpha\,X\,T so each side depends on one variable only:
\frac{T'}{\alpha\,T} = \frac{X''}{X}.
Step 5 — the separation constant. The left side is a function of
t alone, the right of x alone, yet they
are equal for all x, t. A function of
t can equal a function of x only if both
equal the same constant — call it -\lambda (the sign chosen for
convenience):
\frac{T'}{\alpha\,T} = \frac{X''}{X} = -\lambda.
Step 6 — two ordinary equations fall out.
X'' = -\lambda X, \qquad T' = -\alpha\lambda\,T.
Step 7 — solve each. The space equation is our old friend with
oscillating solutions; the time equation decays exponentially:
X(x) = \sin\!\big(\sqrt{\lambda}\,x\big),\ \cos\!\big(\sqrt{\lambda}\,x\big), \qquad T(t) = e^{-\alpha\lambda t}.
Step 8 — a product solution (a "mode"). With boundary conditions
u(0,t) = u(L,t) = 0 forcing
\lambda_n = (n\pi/L)^2,
u_n(x, t) = e^{-\alpha\lambda_n t}\,\sin\!\Big(\frac{n\pi x}{L}\Big).
Step 9 — superpose into a Fourier series. The equation is linear, so sums of
modes still solve it. The general solution matching an initial temperature
u(x, 0) = f(x) is
u(x, t) = \sum_{n=1}^{\infty} b_n\, e^{-\alpha\lambda_n t}\,\sin\!\Big(\frac{n\pi x}{L}\Big),
with the b_n chosen so the t = 0 sum
equals f(x) — the Fourier coefficients. Each mode decays at its own
rate; higher modes (larger n) vanish fastest, which is why sharp
features smooth out first.
-
Heat (parabolic) u_t = \alpha\,u_{xx} —
diffusion; data smooths and decays. Modes
e^{-\alpha\lambda_n t}\sin(n\pi x/L).
-
Wave (hyperbolic) u_{tt} = c^2\,u_{xx} —
propagation at speed c; modes oscillate
\cos(\omega_n t)\sin(n\pi x/L), no decay.
-
Laplace (elliptic) u_{xx} + u_{yy} = 0 —
steady state; solutions are harmonic, set entirely by their boundary values.
-
Separation of variables: seek
u = X(x)T(t); a separation constant
-\lambda splits the PDE into ODEs, whose product solutions
superpose (a Fourier series) to fit the boundary and initial data.
Separation only ever produces the building blocks
\sin(n\pi x/L) and
\cos(n\pi x/L). The miracle — Fourier's 1822 claim, doubted at
the time — is that any reasonable initial profile f(x)
is a sum of these:
f(x) = \sum_{n=1}^{\infty} b_n \sin\!\Big(\frac{n\pi x}{L}\Big), \qquad b_n = \frac{2}{L}\int_0^L f(x)\sin\!\Big(\frac{n\pi x}{L}\Big)\,dx.
The sines are orthogonal — like perpendicular axes — so the coefficient
b_n is just the projection of f onto
the nth mode, computed by that integral. This is what makes
separation a complete method and not a lucky guess: the
boundary conditions pick which modes \lambda_n
are allowed, and the initial condition sets their weights
b_n. Specify both, and the solution is determined.
Worked example: check a candidate solution by substitution
You don't always need the full separation-of-variables machinery. If someone simply
hands you a candidate u(x, t), checking whether it solves
a PDE is just calculus: compute the partial derivatives the equation asks for, on both sides,
and see if they agree. Take u(x, t) = \sin(x)\, e^{-kt} and the
heat equation u_t = k\, u_{xx} (the diffusion constant is called
k here — the same role \alpha played
above, just a different letter, as different books use different symbols).
Step 1 — the time derivative. Freeze x and
differentiate with respect to t only:
u_t = \frac{\partial}{\partial t}\big[\sin(x)\, e^{-kt}\big] = -k\,\sin(x)\, e^{-kt}.
Step 2 — the first space derivative. Now freeze t
and differentiate with respect to x:
u_x = \frac{\partial}{\partial x}\big[\sin(x)\, e^{-kt}\big] = \cos(x)\, e^{-kt}.
Step 3 — the second space derivative. Differentiate again with respect to x, still with t frozen:
u_{xx} = \frac{\partial}{\partial x}\big[\cos(x)\, e^{-kt}\big] = -\sin(x)\, e^{-kt}.
Step 4 — compare both sides of the equation.
k\, u_{xx} = k\big(-\sin(x)\, e^{-kt}\big) = -k\sin(x)\, e^{-kt} = u_t. \ \checkmark
The two sides agree for every x and every t,
so u(x,t) = \sin(x)e^{-kt} genuinely solves the heat equation — it
is exactly the n=1, L=\pi mode from the
derivation above, caught here by a quick direct check instead of a full derivation.
But notice this check alone doesn't hand you the answer to any specific physical
problem. u = 0 also solves the heat equation. So does
u = \sin(2x)e^{-4kt}, and so does any sum of such modes with any
weights at all. Compare this to an ODE: y' = y needed exactly
one extra fact, the number y(0), to pick a single curve
out of the family y = a_0 e^x. A PDE needs much more: a whole
function's worth of information along the edges of the region for all time (the
boundary conditions) together with a whole function's worth of information
at the starting instant (the initial condition) before "the" solution
becomes unique.
Two mix-ups trip up almost everyone meeting PDEs for the first time.
-
A PDE by itself has infinitely many solutions. The heat equation is
equally happy with u = 0, with u = 5,
with every single mode \sin(nx)e^{-kn^2t}, and with every sum of
them. It takes the boundary conditions (what happens at the edges of the
region, for all time) together with the initial condition (the
whole starting profile, everywhere in the region) to carve out the one solution matching a
real physical setup — not one extra number, as for an ODE, but two whole extra pieces of
information.
-
\partial/\partial x is not d/dx.
The curly \partial is a reminder that u
depends on other variables too, and every one of them is held perfectly still while you
differentiate. u_{xx} never secretly picks up a stray
t term through some chain-rule slip — t
is simply frozen, exactly as it was in Step 3 above.
Run the heat equation forward on a sharp temperature spike — one hot point in an otherwise
cold rod — and watch it. Within an instant the spike is already a smooth little bump; a
moment later it is a gentle rounded hill, spreading ever wider and flatter. Every corner,
every sharp edge, gets sanded away almost immediately. That smoothing only runs one way: play
the film backwards and it looks impossible, because it is — you cannot run heat diffusion in
reverse and recover the spike. This is one reason physicists call heat flow
irreversible, and it is baked directly into the mathematics of
u_t = \alpha u_{xx}.
The wave equation could not behave more differently. Pluck a guitar string into a sharp
triangular kink and let go: the kink travels cleanly down the string, reflects off the far
end, and comes back — still recognisably a kink, not smeared into a blur. Because
u_{tt} = c^2 u_{xx} involves an even number of time
derivatives, running the film backwards looks exactly as valid as running it forwards: the
wave equation is time-reversible. Two equations that look almost identical
on paper describe two utterly different kinds of physics — one destroys information about
the past, the other keeps every bit of it.
Watch a heat mode decay
A single mode of the heated rod, u(x, t) = e^{-\alpha\lambda t}\sin(kx)
with k = n\pi/L. Step time forward and the sine wave keeps its
shape but its amplitude melts toward zero; raise the mode number
n and the same wave decays faster (the rate
\alpha\lambda \propto n^2), so fine wiggles disappear first.
See it explained