51  Partial differential equations

Heat, waves, and equilibrium in space and time

A partial differential equation (PDE) involves an unknown function of two or more independent variables and its partial derivatives. The three classical PDEs of mathematical physics appear throughout engineering and science, and they are the focus of this chapter:

How to read the PDE symbols

  • Symbol: u_t, u_{xx}

  • Reads as: “u sub t”, “u sub x x”

  • Means: partial derivative with respect to t; second partial with respect to x

  • Use when: the dependent variable depends on both space and time

  • Common misread: subscripts here are derivatives, not multiplication by variables

  • Symbol: \nabla^2 u

  • Reads as: “Laplacian of u”

  • Means: sum of second spatial derivatives (diffusion/curvature operator)

  • Use when: steady-state fields and diffusion/wave models in higher dimensions

  • Common misread: \nabla^2 is not ordinary squaring

  • Symbol: \lambda

  • Reads as: “lambda”

  • Means: separation constant linking the spatial and temporal ODEs after you assume u=X(x)T(t)

  • Use when: separation of variables

  • Common misread: \lambda becomes discrete once boundary conditions are applied (it turns into eigenvalues)

Equation Name Physics
u_t = \alpha^2 u_{xx} Heat equation (parabolic) Heat conduction, diffusion
u_{tt} = c^2 u_{xx} Wave equation (hyperbolic) Vibration, acoustics, EM waves
u_{xx} + u_{yy} = 0 Laplace equation (elliptic) Steady-state fields

Each represents a different physical situation. The heat equation describes irreversible processes that evolve toward equilibrium. The wave equation describes reversible oscillations that persist in time. The Laplace equation describes static equilibrium states with no time dependence at all.


51.1 What this chapter helps you do

Symbols to keep handy

These are the bits of notation you'll see a lot. If a line of symbols feels like a fence, read it out loud once, then keep going.

  • u_t,; u_{xx}: partial derivative of u with respect to t; second partial with respect to x

  • ^2 u: Laplacian of u

Definitions to keep handy

These are the words we keep coming back to. If one feels slippery, come back here and steady it before you push on.

  • PDE (partial differential equation): An equation for a function that depends on more than one independent variable (like space and time).

  • heat equation: A diffusion model: it smooths things out over time.

  • wave equation: An oscillation model: it carries disturbances without smoothing them away.

  • Laplace equation: A steady-state equilibrium model: no time dependence, just spatial balance.

  • separation of variables: A guess of the form u(x,t)=X(x)T(t) that turns one PDE into two linked ODEs.

  • boundary conditions: Extra information at the edges that picks which solution modes are allowed.

This chapter teaches you how to read a PDE as a physical bookkeeping law and how Fourier-mode thinking turns certain PDEs into solvable pieces. You will learn to:

  • recognise what a PDE is saying: which quantity is conserved or transported
  • classify second-order PDEs (elliptic/parabolic/hyperbolic) and connect the type to the physics
  • use separation of variables to split a PDE into ODEs linked by a separation constant
  • see why boundary conditions force discrete eigenvalues and produce Fourier series solutions

Watch for this

  • PDEs are not “harder ODEs”; they describe spatial coupling. Boundary conditions are part of the problem, not an afterthought.
  • The separation constant \lambda is not arbitrary once boundary conditions are imposed. The boundary conditions quantise it into a discrete set of values.
  • A solution is usually an infinite series of modes. The physics often becomes clearer when you ask what each mode does.

51.2 Classification of second-order PDEs

A general linear second-order PDE in two variables has the form:

A\,u_{xx} + B\,u_{xy} + C\,u_{yy} + D\,u_x + E\,u_y + F\,u = G

Here A, B, and C are just the coefficients multiplying the second derivatives u_{xx}, u_{xy}, and u_{yy}. They matter because those terms control the basic “shape” of the PDE: whether it behaves more like diffusion, like a wave, or like a static equilibrium.

The discriminant

\Delta = B^2 - 4AC

is the same algebraic pattern you see in the quadratic formula and in conic sections. That is not a coincidence: the second-derivative part of the PDE behaves like a quadratic form, and the sign of \Delta tells you whether that quadratic form is elliptic / parabolic / hyperbolic.

Do not overapply the discriminant

This \Delta = B^2 - 4AC test is for PDEs with two independent variables (like x and y). In three (or more) independent variables, you classify the equation using the eigenvalues of the second-derivative coefficient matrix instead.

\Delta < 0 | Elliptic | Laplace, Poisson equations |
\Delta = 0 | Parabolic | Heat equation |
\Delta > 0 | Hyperbolic | Wave equation |

The classification determines which boundary and initial conditions are appropriate and which numerical methods apply. Elliptic equations need boundary conditions on a closed domain; parabolic and hyperbolic equations need initial conditions in time plus boundary conditions in space.


51.3 Separation of variables

Separation of variables is the principal analytic method for solving PDEs on regular domains. The key assumption: the solution factors into a product of functions of each individual variable:

u(x,t) = X(x)\,T(t)

Separation, in words

We are trying to build a complicated solution out of simple pieces:

  • X(x) is the shape in space
  • T(t) is the strength in time

Boundary conditions decide which spatial shapes are allowed. Initial conditions decide how much of each allowed shape you start with.

Substituting into the PDE, each side can be written as a function of only one variable. A function of x alone cannot change as t changes, and a function of t alone cannot change as x changes; the only way two such quantities can be equal for every x and every t is if both are the same constant. Call it the separation constant -\lambda.

This splits the PDE into two ODEs, one in x (the eigenvalue problem) and one in t. The boundary conditions restrict \lambda to a discrete set of eigenvalues \lambda_n, each associated with an eigenfunction X_n(x). The general solution is a superposition of all eigenfunction solutions:

u(x,t) = \sum_{n=1}^{\infty} X_n(x)\,T_n(t)

with coefficients determined by the initial conditions via Fourier series.


51.4 The heat equation

51.4.1 Derivation

Consider a thin rod of length L, thermally insulated on its lateral surface so that heat flows only along its length. Let u(x,t) be the temperature at position x and time t.

Fourier’s law of heat conduction states that the heat flux q (energy per unit area per unit time) is proportional to the temperature gradient: q = -k\,u_x, where k > 0 is the thermal conductivity.

Conservation of energy in a small element [x, x+\Delta x] gives:

\rho c\,\Delta x\,u_t = -\Delta x\,q_x = k\,\Delta x\,u_{xx}

Dividing by \rho c\,\Delta x gives the heat equation:

u_t = \alpha^2\,u_{xx}, \qquad \alpha^2 = \frac{k}{\rho c}

where \rho is density, c is specific heat capacity, and \alpha is the thermal diffusivity.

51.4.2 Boundary and initial conditions

For the problem to be well-posed, we need:

  • Initial condition (IC): u(x, 0) = f(x) for 0 < x < L (the initial temperature profile)
  • Boundary conditions (BCs): two conditions at the ends.

Common boundary conditions: - Dirichlet (fixed temperature): u(0,t) = u(L,t) = 0 - Neumann (insulated ends): u_x(0,t) = u_x(L,t) = 0

51.4.3 Solution by separation of variables

Assume u(x,t) = X(x)T(t). Substituting into u_t = \alpha^2 u_{xx}:

X\,T' = \alpha^2\,X''\,T \implies \frac{T'}{\alpha^2 T} = \frac{X''}{X} = -\lambda

The separation constant is written as -\lambda (the negative sign is chosen so that \lambda > 0 gives physically decaying solutions). This means the sign choice is bookkeeping, not new physics: choosing +\lambda would force the useful solutions to have \lambda < 0 instead.

Spatial ODE with Dirichlet BCs X(0) = X(L) = 0:

X'' + \lambda X = 0, \quad X(0) = 0, \quad X(L) = 0

The cases \lambda \leq 0 produce only the trivial solution: \lambda = 0 gives X'' = 0 so X = cx, which satisfies X(0) = 0 only if c = 0; \lambda < 0 gives real exponential solutions e^{\pm\sqrt{-\lambda}\,x} that cannot satisfy both boundary conditions simultaneously unless X \equiv 0. Only \lambda > 0 gives oscillatory solutions \sin(\sqrt{\lambda}\,x) that can vanish at both endpoints. Imposing X(L) = \sin(\sqrt{\lambda}\,L) = 0 then forces \sqrt{\lambda}\,L = n\pi, so \lambda = \lambda_n = n^2\pi^2/L^2 for n = 1, 2, 3, \ldots, giving:

X_n(x) = \sin\!\left(\frac{n\pi x}{L}\right)

Temporal ODE for each \lambda_n:

T_n' = -\alpha^2\lambda_n\,T_n \implies T_n(t) = e^{-\alpha^2 n^2\pi^2 t/L^2}

General solution:

u(x,t) = \sum_{n=1}^{\infty} B_n\,\sin\!\left(\frac{n\pi x}{L}\right)\,e^{-\alpha^2 n^2\pi^2 t/L^2}

This means each Fourier mode evolves independently, and the higher-frequency modes decay faster because their exponential factors contain n^2.

Applying the initial condition u(x,0) = f(x):

f(x) = \sum_{n=1}^{\infty} B_n\,\sin\!\left(\frac{n\pi x}{L}\right)

This is the Fourier sine series of f on [0, L]. Therefore:

B_n = \frac{2}{L}\int_0^L f(x)\,\sin\!\left(\frac{n\pi x}{L}\right)dx

Physical interpretation. Each term B_n \sin(n\pi x/L) e^{-\alpha^2 n^2\pi^2 t/L^2} is a heat mode: a spatial pattern (the n-th Fourier sine mode) that decays exponentially at rate \alpha^2 n^2\pi^2/L^2. Higher modes (larger n, more oscillations in space) decay faster — by a factor of n^2. Sharp spatial features smooth out quickly; broad features persist.

Use the time slider to watch the fast-decaying third mode disappear and leave the broad first mode behind.


51.5 The wave equation

51.5.1 Setup

A flexible string stretched between x = 0 and x = L is displaced and released. Let u(x,t) be the transverse displacement. Newton’s second law applied to a small element yields the wave equation:

u_{tt} = c^2\,u_{xx}, \qquad c = \sqrt{\frac{T}{\mu}}

where T is the string tension and \mu is the linear mass density (mass per unit length, kg/m). The constant c is the wave speed.

Unlike the heat equation, the wave equation is second-order in time and requires two initial conditions: - u(x, 0) = f(x) (initial displacement) - u_t(x, 0) = g(x) (initial velocity)

51.5.2 Solution by separation of variables

Assume u(x,t) = X(x)T(t) with fixed-end BCs u(0,t) = u(L,t) = 0. The spatial problem is identical to the heat equation:

\lambda_n = \frac{n^2\pi^2}{L^2}, \qquad X_n(x) = \sin\!\left(\frac{n\pi x}{L}\right)

The temporal ODE is now:

T_n'' = -c^2\lambda_n\,T_n \implies T_n(t) = A_n\cos\!\left(\frac{n\pi c\,t}{L}\right) + B_n\sin\!\left(\frac{n\pi c\,t}{L}\right)

General solution:

u(x,t) = \sum_{n=1}^{\infty}\sin\!\left(\frac{n\pi x}{L}\right)\left[A_n\cos\!\left(\frac{n\pi c\,t}{L}\right) + B_n\sin\!\left(\frac{n\pi c\,t}{L}\right)\right]

Applying initial conditions:

At t = 0: u(x,0) = \sum A_n\sin(n\pi x/L) = f(x) → Fourier sine coefficients of f.

Differentiating: u_t(x,0) = \sum B_n(n\pi c/L)\sin(n\pi x/L) = g(x) → Fourier sine coefficients of g, divided by n\pi c/L.

51.5.3 Standing waves and natural frequencies

Each term \sin(n\pi x/L)\cos(n\pi ct/L) is a standing wave: a spatial pattern that oscillates in time at a fixed frequency. The n-th mode oscillates at angular frequency \omega_n = n\pi c/L (frequency f_n = nc/(2L)).

These are the natural frequencies (harmonics) of the string. A guitar string of length L, tension T, and linear density \mu (so c = \sqrt{T/\mu}) produces: - Fundamental: f_1 = c/(2L) - First overtone: f_2 = c/L = 2f_1 - n-th harmonic: f_n = nf_1

The ratio of overtones is always integer multiples of the fundamental — this is why stringed instruments produce musical notes rather than noise.

Use the mode selector to compare the standing-wave shapes and their increasing frequencies.

51.5.4 D’Alembert’s solution

There is an elegant alternative form of the wave equation solution. This can be derived by changing variables to \xi = x-ct and \eta = x+ct, which converts the wave equation into a form that separates completely. D’Alembert’s solution is:

u(x,t) = \frac{1}{2}\left[f(x+ct) + f(x-ct)\right] + \frac{1}{2c}\int_{x-ct}^{x+ct} g(s)\,ds

This expresses the solution as two travelling waves — f(x-ct) moving right at speed c, and f(x+ct) moving left at speed c. For the initial velocity zero (g = 0), the initial displacement simply splits in two and propagates in opposite directions.


51.6 The Laplace equation

51.6.1 Setup

The Laplace equation \nabla^2 u = u_{xx} + u_{yy} = 0 describes steady-state distributions: temperature in a solid after all transients have died away, electrostatic potential in a charge-free region, fluid velocity potential for irrotational flow.

A function satisfying the Laplace equation is harmonic. Key property: a harmonic function attains its maximum and minimum values on the boundary, never in the interior. This means the steady-state temperature inside a region is always between the extreme boundary temperatures — physically obvious, mathematically provable.

51.6.2 Dirichlet problem in a rectangle

Find u(x,y) in 0 < x < a, 0 < y < b, satisfying:

u_{xx} + u_{yy} = 0

with boundary conditions u(0,y) = u(a,y) = u(x,b) = 0 and u(x,0) = f(x).

Assume u(x,y) = X(x)Y(y):

\frac{X''}{X} = -\frac{Y''}{Y} = -\lambda

With X(0) = X(a) = 0: eigenvalues \lambda_n = n^2\pi^2/a^2, eigenfunctions X_n = \sin(n\pi x/a).

The Y equation becomes Y'' - \lambda_n Y = 0 with Y(b) = 0. Solutions:

Y_n(y) = \sinh\!\left(\frac{n\pi(b-y)}{a}\right)

(sinh chosen to satisfy Y_n(b) = 0; Y_n(0) = \sinh(n\pi b/a) \neq 0).

In the Laplace equation, the Y equation carries the opposite sign from the heat and wave equations (both of which give Y'' + \lambda Y = 0) because the second x-derivative is a boundary condition on both sides rather than an initial condition on time. This sign flip means Y''-\lambda Y=0 produces exponential or hyperbolic behaviour instead of oscillatory sine and cosine terms. The key insight: the choice of constant determines the entire family of solutions, and the Laplace boundary geometry demands the hyperbolic family.

General solution:

u(x,y) = \sum_{n=1}^{\infty} C_n\,\sin\!\left(\frac{n\pi x}{a}\right)\sinh\!\left(\frac{n\pi(b-y)}{a}\right)

Applying u(x,0) = f(x):

C_n = \frac{2}{a\,\sinh(n\pi b/a)}\int_0^a f(x)\,\sin\!\left(\frac{n\pi x}{a}\right)dx


51.7 Summary: the method in four steps

Regardless of which classical PDE applies, the separation-of-variables procedure follows the same steps:

  1. Assume u = X(x)T(t) (or X(x)Y(y) for the Laplace equation). Substitute and separate.
  2. Solve the spatial eigenvalue problem with the given boundary conditions. This determines the eigenvalues \lambda_n and eigenfunctions X_n.
  3. Solve the temporal (or second spatial) ODE for each \lambda_n, giving T_n(t).
  4. Apply initial conditions: express f(x) as a Fourier series in the eigenfunctions \{X_n\} to determine the coefficients.

The Fourier series computation in step 4 is identical to what was developed in the previous two chapters. PDEs give the Fourier series its deepest physical motivation.

51.8 Where this goes

Analytic methods go surprisingly far, but most real geometries, forcing terms, and material properties break the assumptions that make separation of variables work cleanly. The next step is numerical methods: discretise the domain, turn derivatives into finite differences (or elements), and solve the resulting large linear systems.

That is exactly why this chapter opens into the numerical methods chapter: the numerics are not “a different subject” so much as the continuation of the same physical bookkeeping when exact formulas run out.

51.9 What you can do now

You can now read the three classical PDEs as three distinct physical regimes, classify a second-order PDE in two variables, and follow the separation-of-variables pipeline from PDE to eigenvalue problem to Fourier series solution. You should be able to explain why boundary conditions produce discrete modes and why the initial condition determines the coefficients.


51.10 Exercises


51.10.1 Exercise 1: Heat equation — single-mode initial condition

Solve u_t = 4u_{xx} on 0 < x < \pi, t > 0, with u(0,t) = u(\pi,t) = 0 and u(x,0) = 3\sin(2x).


51.10.2 Exercise 2: Heat equation — arbitrary initial condition

Solve u_t = u_{xx} on 0 < x < \pi, t > 0, with u(0,t) = u(\pi,t) = 0 and u(x,0) = x(\pi - x).


51.10.3 Exercise 3: Wave equation — plucked string

A string of length L = \pi and wave speed c = 2 is plucked to a triangular initial shape f(x) = \frac{2}{\pi}\min(x, \pi-x) and released from rest (g(x) = 0). Write the solution.


51.10.4 Exercise 4: Laplace equation — steady-state temperature

Find the steady-state temperature u(x,y) in the rectangle 0 < x < \pi, 0 < y < 1, with u = 0 on three sides and u(x,0) = \sin(x) + \frac{1}{3}\sin(3x) on the bottom.


51.10.5 Exercise 5: Classify these PDEs

Classify each of the following equations as elliptic, parabolic, or hyperbolic. Identify a physical situation each could model.

(a) u_{xx} + 4u_{xy} + 4u_{yy} = 0 (b) 3u_{xx} - u_{yy} + u_x = 0 (c) u_{xx} + u_{yy} + u_{zz} = \rho


51.10.6 Exercise 6: Non-homogeneous boundary conditions

When the boundary conditions are non-zero — as when one end of a rod is held at a fixed nonzero temperature — separation of variables cannot be applied directly because the eigenfunctions \sin(n\pi x/L) all vanish at the boundaries. The method is to find the steady-state solution v(x) (which satisfies v_{xx} = 0 and the boundary conditions), then solve for the remainder w = u - v with homogeneous boundary conditions using the standard series method. The final answer is u = v + w: steady state plus decaying transient.

Solve u_t = u_{xx} on 0 < x < 1, t > 0, with u(0,t) = 0, u(1,t) = 1, and u(x,0) = 0.

(Steady-state plus transient method.)