47  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:

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.


47.1 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\]

The discriminant \(\Delta = B^2 - 4AC\) classifies its type:

\(\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.


47.2 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)\]

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.


47.3 The heat equation

47.3.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.

47.3.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\)

47.3.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).

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}\]

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.


47.4 The wave equation

47.4.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)

47.4.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\).

47.4.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.

47.4.4 D’Alembert’s solution

There is an elegant alternative form of the wave equation solution. D’Alembert’s solution:

\[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.


47.5 The Laplace equation

47.5.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.

47.5.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\)).

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\]


47.6 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.


47.7 Exercises


47.7.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)\).


47.7.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)\).


47.7.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.


47.7.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.


47.7.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\)


47.7.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 fix is to subtract a steady-state solution \(v(x)\) that satisfies the boundary conditions and \(v_{xx} = 0\), so that the remainder \(w = u - v\) has homogeneous boundary conditions and the standard series method applies. 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.)