Survey of Mathematics

5.9 Partial differential equations

A partial differential equation relates the partial derivatives of an unknown function of several variables, and its solutions contain whole arbitrary functions instead of constants. A first-order linear equation with constant coefficients says the unknown is constant along straight characteristic lines. The wave equation splits into two such transport equations (d'Alembert), the heat equation smooths its data mode by mode (separation of variables), and the solutions of Laplace's equation obey a mean value property that forbids interior maxima.

Taught in 375/376Apostol, not taughtBeyond the courseApostol Vol. 2, 9.1 to 9.5MATH 375, Homework 11 (Apostol 8.9 #18, the heat equation check)d'Alembert, Recherches sur la courbe que forme une corde tendue mise en vibration (1747)Fourier, Théorie analytique de la chaleur (1822)Evans, Partial Differential Equations, ch. 2Strauss, Partial Differential Equations: An Introduction, ch. 1 to 4

In one variable a differential equation such as y′=3yy' = 3y is solved by a function that depends on one unknown constant. Most of physics is about quantities that depend on position and time at once: the height of a string, the temperature in a rod, the potential around a charge. Their laws say how the rates of change in different directions are related, and the unknown is a whole function of several variables. The equation ut+2ux=0u_t + 2u_x = 0 is solved by g(x−2t)g(x - 2t) for any function gg at all, so the solution space is not a few-dimensional space of formulas but a space of functions (Apostol 9.1: it is infinite-dimensional). This chapter does the three famous second-order equations, plus the first-order one that sits underneath the wave equation, with the tools of Unit 5: the chain rule of 5.4 to check and to change variables, equality of mixed partials of 5.5, and the gradient picture of 5.3.

Before you start

5.4: the chain rule for a composite f(linear change of variables)f(\text{linear change of variables}). 5.3: the gradient is perpendicular to level sets, and the derivative of a field along a path. 2.9: inner products of functions and orthogonality.

Quick checkLet f(x,y)=g(2x−3y)f(x, y) = g(2x - 3y) with gg differentiable. What is 3fx+2fy3f_x + 2f_y?
Quick checkFor a C2C^2 function u(x,t)u(x, t), which of these is always true?
Quick checkWhy are the functions sin⁡(nπx)\sin(n\pi x) and sin⁡(mπx)\sin(m\pi x) for n≠mn \ne m orthogonal on [0,1][0, 1]?

The picture: standing waves and travelling pulses

Two pictures of the same equation. In the first, the string vibrates as a sum of standing waves, each of which keeps its shape and only changes its height: this is what separation of variables finds. Press Play, then turn the second and third modes on. In the second picture (choose it in the menu), an initial bump splits into two copies that run apart at the wave speed: this is d’Alembert’s solution. Tick ‘fixed ends’ and watch what a reflection does to the pulse. The two descriptions are the same solution: sin⁡acos⁡b=12[sin⁡(a+b)+sin⁡(a−b)]\sin a\cos b = \frac12[\sin(a + b) + \sin(a - b)] says that a standing wave is a right-moving and a left-moving wave added together.

The idea, in words

An ordinary differential equation pins down a function of one variable up to a few constants. A partial differential equation relates rates of change in several directions, and such a relation constrains the function only along certain curves, leaving freedom across them. For ut+2ux=0u_t + 2u_x = 0 it says that the rate of change of uu in the direction (2,1)(2, 1) of the (x,t)(x, t) plane is zero: uu is constant along every line x−2t=constx - 2t = \text{const}, and what uu does from one such line to the next is free. That freedom is an arbitrary function. Initial and boundary conditions (the shape of the string at t=0t = 0, the temperature of the ends) are what select one function from the freedom.

Where this came from· d'Alembert's strings, Bernoulli's harmonics, and Fourier's heat

In 1747 Jean le Rond d’Alembert wrote down the equation for the vibrating string and found that its solutions are sums of a wave running left and a wave running right, each of an arbitrary shape. Leonhard Euler took up the problem within a year or two and argued that the shapes need not be given by a single formula, such as a plucked string with a corner, which d’Alembert disputed. Around 1753 Daniel Bernoulli proposed that the string’s motion is an infinite sum of a fundamental tone and its harmonics, the standing waves of separation of variables, without a method to find the coefficients. The three men disagreed for decades on which shapes counted as solutions and whether trigonometric sums were general enough. Joseph Fourier, who presented his first memoir on heat in 1807 and published the full Théorie analytique de la chaleur in 1822, used such sums for heat and claimed that every function could be expanded; Dirichlet in 1829 proved that Fourier series converge for a wide class of functions. Both descriptions in the picture above are therefore correct, and both are older than the language (function, continuity, convergence) needed to say why.

Definitions

Definition A

Partial differential equation

An equation involving a scalar field uu and its partial derivatives is a partial differential equation (PDE). Its order is that of the highest derivative present. It is linear if it has the form L(u)=sL(u) = s where LL is a linear combination of uu and its partial derivatives (with coefficients that may depend on the variables, but not on uu) and homogeneous if s=0s = 0. Examples with u=u(x,y)u = u(x, y) or u(x,t)u(x, t): ux=0u_x = 0 (order 1), ut+2ux=0u_t + 2u_x = 0 (order 1), uxx+uyy=0u_{xx} + u_{yy} = 0 (order 2). Apostol 9.1.

In one lineAn equation involving an unknown function of two or more variables and some of its partial derivatives.

Why it existsIt is the natural law for any quantity that depends on position and time: it says how the change in each direction is tied to the changes in the others.

Proposition A Apostol 9.1

Superposition for linear homogeneous equations

If LL is a linear differential operator and L(u1)=L(u2)=0L(u_1) = L(u_2) = 0, then L(au1+bu2)=0L(au_1 + bu_2) = 0 for all real a,ba, b.

In one lineThe solutions of a linear homogeneous PDE form a vector space: sums and multiples of solutions are solutions.

Why it is trueIt is why one can build solutions from simple ones (standing waves, plane waves) and why a general solution is a sum.

ProofApostol 9.1
The idea: The operator is a linear map on a space of functions; the null space of a linear map is a subspace.
L(au1+bu2)=aL(u1)+bL(u2)L(au_1 + bu_2) = aL(u_1) + bL(u_2).
Derivatives are linear: (au1+bu2)x=au1x+bu2x(au_1 + bu_2)_x = au_{1x} + bu_{2x}, and likewise for every partial derivative.
So L(au1+bu2)=0L(au_1 + bu_2) = 0.
Both terms are zero by hypothesis. This is the null space of the linear map LL (2.3). ■\blacksquare

The null space can be infinite-dimensional: every function g(y)g(y) solves ux=0u_x = 0 (Apostol 9.1), because uu may change with yy but not with xx. The functions y,y2,y3,…y, y^2, y^3, \dots are infinitely many solutions that are linearly independent.

First-order equations: constant along characteristic lines

Theorem A Apostol Thm 9.1 (9.2)

First-order equation with constant coefficients

Let a,ba, b be constants, not both zero. A differentiable ff on R2\mathbb R^2 satisfies a fx+b fy=0a\,f_x + b\,f_y = 0 everywhere if and only if f(x,y)=g(bx−ay)f(x, y) = g(bx - ay) for some differentiable g:R→Rg: \mathbb R \to \mathbb R.

In one lineIf a,ba, b are constants, not both 00, then ff satisfies afx+bfy=0af_x + bf_y = 0 if and only if f(x,y)=g(bx−ay)f(x, y) = g(bx - ay) for some differentiable function gg of one variable.

Why it is trueIt names every solution of the simplest PDE: constant on straight lines in the direction (a,b)(a, b), free from line to line. Most of the later equations factor into equations of this type.

ProofApostol 9.2 (the geometric argument), made precise with characteristics
The idea: Write the equation as a dot product: the derivative of f in the direction (a, b) is zero, so f is constant on every line in that direction. The lines are bx - ay = const, and one line is a single value of that expression. Conversely the chain rule checks any g.
Fix a point (x0,y0)(x_0, y_0) and put ϕ(s)=f(x0+as,y0+bs)\phi(s) = f(x_0 + as, y_0 + bs). Then ϕ′(s)=afx+bfy=0\phi'(s) = af_x + bf_y = 0.
ddsf(x0+as, y0+bs)=afx+bfy\frac{d}{ds}f(x_0 + as,\ y_0 + bs) = af_x + bf_y by the path theorem of 5.3.
So ff is constant on the line through (x0,y0)(x_0, y_0) with direction (a,b)(a, b). This line is the curve bx−ay=bx0−ay0bx - ay = bx_0 - ay_0 (a characteristic).
A function with zero derivative on an interval is constant (mean value theorem, 1.4).
Define g(k)=f(p(k))g(k) = f(p(k)) with p(k)=ka2+b2(b,−a)p(k) = \dfrac{k}{a^2 + b^2}(b, -a). It is differentiable, as a composite of ff with a linear map, and the line bx−ay=kbx - ay = k passes through p(k)p(k).
Every point lies on exactly one such line. The point p(k)p(k) lies on the line bx−ay=kbx - ay = k, because b⋅kba2+b2−a⋅−kaa2+b2=kb\cdot\dfrac{kb}{a^2 + b^2} - a\cdot\dfrac{-ka}{a^2 + b^2} = k. So the lines are labelled by kk, and p(k)p(k) is one chosen point on each.
Hence f(x,y)=g(bx−ay)f(x, y) = g(bx - ay).
ff is constant on the line, and bx−ay=kbx - ay = k at the point (x,y)(x, y) itself. So f(x,y)=f(p(k))=g(k)f(x, y) = f(p(k)) = g(k) with k=bx−ayk = bx - ay.
Every such ff is a solution.
Conversely, chain rule: fx=b g′f_x = b\,g', fy=−a g′f_y = -a\,g', so afx+bfy=abg′−abg′=0af_x + bf_y = abg' - abg' = 0. ■\blacksquare
Definition A

Characteristic curve

For the first-order linear equation a(x,y)ux+b(x,y)uy+c(x,y)u=f(x,y)a(x, y)u_x + b(x, y)u_y + c(x, y)u = f(x, y), a characteristic curve is a solution of the system dxds=a(x,y)\dfrac{dx}{ds} = a(x, y), dyds=b(x,y)\dfrac{dy}{ds} = b(x, y). Along it the field U(s)=u(x(s),y(s))U(s) = u(x(s), y(s)) has U′(s)=uxx′+uyy′=aux+buy=f−cuU'(s) = u_xx' + u_yy' = au_x + bu_y = f - cu. So the PDE becomes the ODE U′+cU=fU' + cU = f for U(s)U(s). For constant a,ba, b the characteristics are the straight lines of the theorem. The method of characteristics is: find the curves, solve the ODE along each, and label the curves by where they cross the line (or curve) where the initial data is given.

In one lineA curve (x(s),y(s))(x(s), y(s)) along which the PDE a ux+b uy+c u=fa\,u_x + b\,u_y + c\,u = f turns into an ordinary differential equation: x′=ax' = a, y′=by' = b.

Why it existsIt is the idea that reduces a PDE to ODEs: follow the unknown along these curves and it changes by a rule in one variable.

Worked example Apostol 9.3 #1
Find the solution of 4fx+3fy=04f_x + 3f_y = 0 with f(x,0)=sin⁡xf(x, 0) = \sin x for all xx.

Solution.

  1. General solution. With a=4a = 4, b=3b = 3 the theorem gives f(x,y)=g(3x−4y)f(x, y) = g(3x - 4y). Characteristics are the lines 3x−4y=const3x - 4y = \text{const} with direction (4,3)(4, 3).
  2. Use the condition. At y=0y = 0: f(x,0)=g(3x)=sin⁡xf(x, 0) = g(3x) = \sin x for all xx. Put s=3xs = 3x: g(s)=sin⁡s3g(s) = \sin\dfrac s3. The condition determines gg on the whole real line, since 3x3x takes every value.
  3. Assemble. f(x,y)=sin⁡3x−4y3=sin⁡(x−43y)f(x, y) = \sin\dfrac{3x - 4y}{3} = \sin\big(x - \tfrac43y\big). Substitute s=3x−4ys = 3x - 4y.
  4. Check. fx=cos⁡(x−43y)f_x = \cos(x - \frac43y), fy=−43cos⁡(x−43y)f_y = -\frac43\cos(x - \frac43y), so 4fx+3fy=4cos⁡−4cos⁡=04f_x + 3f_y = 4\cos - 4\cos = 0 and f(x,0)=sin⁡xf(x, 0) = \sin x. Always verify.

Answer. f(x,y)=sin⁡(x−43y)f(x, y) = \sin\big(x - \frac43y\big): the sine wave sin⁡x\sin x at y=0y = 0 is carried along the direction (4,3)(4, 3).

Worked example Apostol 9.3 #3
(a) Show that u(x,y)=f(xy)u(x, y) = f(xy) satisfies xux−yuy=0xu_x - yu_y = 0, and find the solution with u(x,x)=x4ex2u(x, x) = x^4e^{x^2}. (b) Show that v=f(x/y)v = f(x/y) satisfies xvx+yvy=0xv_x + yv_y = 0, and find the one with v(1,1)=2v(1, 1) = 2 and D1v(x,1/x)=1/xD_1v(x, 1/x) = 1/x.

Solution.

  1. (a) Verify. ux=yf′(xy)u_x = yf'(xy) and uy=xf′(xy)u_y = xf'(xy), so xux−yuy=xyf′−xyf′=0xu_x - yu_y = xyf' - xyf' = 0. Chain rule. The characteristics here solve x′=xx' = x, y′=−yy' = -y, which are the hyperbolas xy=constxy = \text{const}, and uu is constant on each.
  2. (a) Solve. On the diagonal, u(x,x)=f(x2)=x4ex2u(x, x) = f(x^2) = x^4e^{x^2}. Put t=x2t = x^2: f(t)=t2etf(t) = t^2e^t for t≥0t \ge 0. So u(x,y)=(xy)2exyu(x, y) = (xy)^2e^{xy}. The data on y=xy = x determines ff at all values t=x2≥0t = x^2 \ge 0, which is the range of xyxy on the diagonal; the formula extends naturally.
  3. (b) Verify. vx=f′(x/y)⋅1yv_x = f'(x/y)\cdot\frac1y, vy=−f′(x/y)⋅xy2v_y = -f'(x/y)\cdot\frac x{y^2}, so xvx+yvy=xyf′−xyf′=0xv_x + yv_y = \frac xyf' - \frac xyf' = 0. Characteristics x′=xx' = x, y′=yy' = y are the rays through the origin, along which x/yx/y is constant.
  4. (b) Use D1v(x,1/x)=1/xD_1v(x, 1/x) = 1/x. D1v(x,y)=f′(x/y)/yD_1v(x, y) = f'(x/y)/y; at y=1/xy = 1/x this is xf′(x2)=1xxf'(x^2) = \frac1x, so f′(x2)=1x2f'(x^2) = \frac1{x^2}, i.e. f′(t)=1tf'(t) = \frac1t and f(t)=ln⁡t+Cf(t) = \ln t + C for t>0t \gt 0. Put t=x2t = x^2 and use x>0x \gt 0.
  5. (b) Use v(1,1)=2v(1, 1) = 2. v(1,1)=f(1)=C=2v(1, 1) = f(1) = C = 2. ln⁡1=0\ln1 = 0.

Answer. (a) u=(xy)2exyu = (xy)^2e^{xy}. (b) v(x,y)=ln⁡xy+2v(x, y) = \ln\dfrac xy + 2.

Worked example new (method of characteristics)
Solve the transport equation with decay, ut+2ux+u=0u_t + 2u_x + u = 0, u(x,0)=e−x2u(x, 0) = e^{-x^2}.

Solution.

  1. Characteristics. dxds=2\dfrac{dx}{ds} = 2, dtds=1\dfrac{dt}{ds} = 1: the lines x=x0+2tx = x_0 + 2t (take s=ts = t). Coefficients of uxu_x and utu_t in the PDE.
  2. The ODE along a characteristic. Put U(t)=u(x0+2t,t)U(t) = u(x_0 + 2t, t). Then U′=ux⋅2+ut=−u=−UU' = u_x\cdot2 + u_t = -u = -U, so U(t)=U(0)e−tU(t) = U(0)e^{-t}. The PDE says ut+2ux=−uu_t + 2u_x = -u.
  3. Use the data. U(0)=u(x0,0)=e−x02U(0) = u(x_0, 0) = e^{-x_0^2}. At a point (x,t)(x, t) the characteristic through it started at x0=x−2tx_0 = x - 2t. Label each line by where it crosses t=0t = 0.
  4. Assemble. u(x,t)=e−t e−(x−2t)2u(x, t) = e^{-t}\,e^{-(x - 2t)^2}. Substitute x0=x−2tx_0 = x - 2t.
  5. Check. ut=−u+4(x−2t)uu_t = -u + 4(x - 2t)u and 2ux=−4(x−2t)u2u_x = -4(x - 2t)u, so ut+2ux+u=0u_t + 2u_x + u = 0. ✓

Answer. u(x,t)=e−te−(x−2t)2u(x, t) = e^{-t}e^{-(x - 2t)^2}: the bump moves right at speed 22 while its height decays like e−te^{-t}. The same recipe gives, for ut+aux+cu=0u_t + au_x + cu = 0, the solution u(x,t)=e−ctu0(x−at)u(x, t) = e^{-ct}u_0(x - at).

Worked example Apostol 9.3 #8 and #9 (the converse of Euler's theorem)
Euler's theorem by characteristics: if ff satisfies x⋅∇f(x)=pf(x)x\cdot\nabla f(x) = pf(x) on R2∖{O}\mathbb R^2\setminus\{O\}, show that f(sx)=spf(x)f(sx) = s^pf(x) for s>0s \gt 0.

Solution.

  1. The characteristics. The coefficients of fx,fyf_x, f_y are x,yx, y, so the characteristics solve x′=xx' = x, y′=yy' = y: the rays σ↦eσ(x0,y0)\sigma \mapsto e^\sigma(x_0, y_0). The field of directions (x,y)(x, y) points radially outward.
  2. The ODE along a ray. F(σ)=f(eσx0,eσy0)F(\sigma) = f(e^\sigma x_0, e^\sigma y_0) has F′(σ)=∇f⋅(eσx0,eσy0)=p F(σ)F'(\sigma) = \nabla f\cdot(e^\sigma x_0, e^\sigma y_0) = p\,F(\sigma) by the equation. So F(σ)=F(0)epσF(\sigma) = F(0)e^{p\sigma}. Path theorem of 5.3, then the equation x⋅∇f=pfx\cdot\nabla f = pf at the point eσx0e^\sigma x_0.
  3. Translate. With s=eσs = e^\sigma: f(sx0)=spf(x0)f(sx_0) = s^pf(x_0). That is the definition of homogeneous of degree pp.

Answer. ff is homogeneous of degree pp. Conversely, differentiating f(sx)=spf(x)f(sx) = s^pf(x) in ss at s=1s = 1 gives x⋅∇f=pfx\cdot\nabla f = pf (Euler’s theorem). Example: f=x2+3xyf = x^2 + 3xy has p=2p = 2 and xfx+yfy=2x2+3xy+3xy=2fx f_x + yf_y = 2x^2 + 3xy + 3xy = 2f. ✓

Quick checkWhich of these functions solves ut+3ux=0u_t + 3u_x = 0?

The wave equation

Definition A

Wave equation

The wave equation in one space variable is utt=c2uxxu_{tt} = c^2u_{xx}, where c>0c \gt 0 is a constant. In two or three space variables utt=c2∇2uu_{tt} = c^2\nabla^2u. Apostol 9.4.

In one lineThe equation utt=c2uxxu_{tt} = c^2u_{xx} for the displacement u(x,t)u(x, t) of a vibrating string, with cc the wave speed.

Why it existsIt is Newton's second law for a thin string under tension, and the model of every one-dimensional wave: sound in a pipe, light in a cable, a vibrating guitar string.

Why· Where the equation comes from: Newton's law for a small piece of string

A string with mass ρ\rho per unit length is pulled with tension TT (assumed constant). Let u(x,t)u(x, t) be the height at xx. For a small piece between xx and x+dxx + dx, the tension pulls up on the right end with vertical component Tsin⁡θ(x+dx)T\sin\theta(x + dx) and down on the left with Tsin⁡θ(x)T\sin\theta(x), where θ\theta is the angle of the string. For small displacements sin⁡θ≈tan⁡θ=ux\sin\theta \approx \tan\theta = u_x, so the net force is T(ux(x+dx,t)−ux(x,t))≈T uxx dxT\big(u_x(x + dx, t) - u_x(x, t)\big) \approx T\,u_{xx}\,dx. The mass is ρ dx\rho\,dx and the acceleration uttu_{tt}, so Newton’s law gives ρ utt dx=T uxx dx\rho\,u_{tt}\,dx = T\,u_{xx}\,dx. Hence utt=c2uxxu_{tt} = c^2u_{xx} with c=T/ρc = \sqrt{T/\rho}: the wave speed grows with tension and falls with mass. A string of length 0.650.65 m and linear density 0.50.5 g/m tuned to the note E4, 329.63329.63 Hz, has (from the formula c=2Lfc = 2Lf derived below) c=2⋅0.65⋅329.63=428.5c = 2\cdot0.65\cdot329.63 = 428.5 m/s and tension T=ρc2=0.0005⋅428.52=91.8T = \rho c^2 = 0.0005\cdot428.5^2 = 91.8 N, about the weight of 9.4 kg.

Theorem A Apostol Thm 9.2 (9.4); d'Alembert 1747

d'Alembert's solution of the wave equation

Let F∈C2(R)F \in C^2(\mathbb R) and G∈C1(R)G \in C^1(\mathbb R). Then u(x,t)=12[F(x+ct)+F(x−ct)]+12c∫x−ctx+ctG(s) dsu(x, t) = \tfrac12\big[F(x + ct) + F(x - ct)\big] + \dfrac1{2c}\displaystyle\int_{x - ct}^{x + ct}G(s)\,ds satisfies utt=c2uxxu_{tt} = c^2u_{xx}, u(x,0)=F(x)u(x, 0) = F(x), ut(x,0)=G(x)u_t(x, 0) = G(x). Conversely, if uu is C2C^2 on R2\mathbb R^2 and solves the wave equation with these initial data, then uu is given by this formula.

In one lineIf FF is twice differentiable and GG is differentiable, then u(x,t)=12[F(x+ct)+F(x−ct)]+12c∫x−ctx+ctG(s) dsu(x, t) = \tfrac12\big[F(x + ct) + F(x - ct)\big] + \dfrac1{2c}\displaystyle\int_{x - ct}^{x + ct}G(s)\,ds solves utt=c2uxxu_{tt} = c^2u_{xx} with u(x,0)=F(x)u(x, 0) = F(x) and ut(x,0)=G(x)u_t(x, 0) = G(x); conversely every C2C^2 solution on R2\mathbb R^2 has this form.

Why it is trueIt solves the initial value problem for the string in closed form: the motion is a left-moving and a right-moving wave. It shows information travels at speed cc.

ProofApostol 9.4 (this is his 'one method', via 9.3 #4)
The idea: Change variables to xi = x + ct and eta = x - ct (the two characteristic directions). Then the wave equation becomes v_xi_eta = 0 by the chain rule, so v is a function of xi plus a function of eta. The initial conditions fix the two functions.
Put ξ=x+ct\xi = x + ct, η=x−ct\eta = x - ct and u(x,t)=v(ξ,η)u(x, t) = v(\xi, \eta).
Define v(ξ,η)=u(ξ+η2, ξ−η2c)v(\xi, \eta) = u\big(\frac{\xi + \eta}2,\ \frac{\xi - \eta}{2c}\big), the same field in the new coordinates, which is C2C^2 because the change of variables is linear.
ux=vξ+vηu_x = v_\xi + v_\eta and ut=c(vξ−vη)u_t = c(v_\xi - v_\eta).
Chain rule (5.4): ξx=ηx=1\xi_x = \eta_x = 1, ξt=c\xi_t = c, ηt=−c\eta_t = -c.
uxx=vξξ+2vξη+vηηu_{xx} = v_{\xi\xi} + 2v_{\xi\eta} + v_{\eta\eta} and utt=c2(vξξ−2vξη+vηη)u_{tt} = c^2(v_{\xi\xi} - 2v_{\xi\eta} + v_{\eta\eta}).
Apply the chain rule again, using vξη=vηξv_{\xi\eta} = v_{\eta\xi} (5.5).
utt−c2uxx=−4c2vξηu_{tt} - c^2u_{xx} = -4c^2v_{\xi\eta}. So the wave equation holds if and only if vξη=0v_{\xi\eta} = 0.
Subtract: the vξξv_{\xi\xi} and vηηv_{\eta\eta} terms cancel.
Hence v(ξ,η)=φ(ξ)+ψ(η)v(\xi, \eta) = \varphi(\xi) + \psi(\eta), that is u(x,t)=φ(x+ct)+ψ(x−ct)u(x, t) = \varphi(x + ct) + \psi(x - ct).
∂η(vξ)=0\partial_\eta(v_\xi) = 0 means vξv_\xi does not depend on η\eta (mean value theorem in η\eta for fixed ξ\xi, on the whole plane): vξ=φ′(ξ)v_\xi = \varphi'(\xi). Then v−φ(ξ)v - \varphi(\xi) has zero ξ\xi-derivative, so depends on η\eta only.
Solving the two linear equations: φ′=12F′+12cG\varphi' = \frac12F' + \frac1{2c}G, ψ′=12F′−12cG\psi' = \frac12F' - \frac1{2c}G.
Initial data: u(x,0)=φ(x)+ψ(x)=F(x)u(x, 0) = \varphi(x) + \psi(x) = F(x) and ut(x,0)=c(φ′(x)−ψ′(x))=G(x)u_t(x, 0) = c\big(\varphi'(x) - \psi'(x)\big) = G(x). Differentiate the first: φ′+ψ′=F′\varphi' + \psi' = F'.
φ(x)=12F(x)+12c∫0xG+C\varphi(x) = \frac12F(x) + \frac1{2c}\int_0^xG + C, ψ(x)=12F(x)−12c∫0xG−C\psi(x) = \frac12F(x) - \frac1{2c}\int_0^xG - C, which gives the formula.
Integrate from 00, with φ+ψ=F\varphi + \psi = F at 00 giving the constants (they cancel). Then u=φ(x+ct)+ψ(x−ct)u = \varphi(x + ct) + \psi(x - ct) and the two integrals combine: ∫0x+ctG−∫0x−ctG=∫x−ctx+ctG\int_0^{x + ct}G - \int_0^{x - ct}G = \int_{x - ct}^{x + ct}G.
The formula is a solution.
Conversely, for the formula u=φ(x+ct)+ψ(x−ct)u = \varphi(x + ct) + \psi(x - ct) with φ,ψ∈C2\varphi, \psi \in C^2 (which they are, by the hypotheses on FF and GG): utt=c2φ′′+c2ψ′′=c2uxxu_{tt} = c^2\varphi'' + c^2\psi''= c^2u_{xx} by the chain rule, and the initial conditions are checked as above. ■\blacksquare
Proof workshopGive the reason for each line of d'Alembert's derivationApostol 9.4

Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.

  1. Put ξ=x+ct\xi = x + ct, η=x−ct\eta = x - ct, u(x,t)=v(ξ,η)u(x, t) = v(\xi, \eta).
  2. utt−c2uxx=−4c2vξηu_{tt} - c^2u_{xx} = -4c^2v_{\xi\eta}.
  3. vξη=0v_{\xi\eta} = 0, so v=φ(ξ)+ψ(η)v = \varphi(\xi) + \psi(\eta).
  4. φ+ψ=F\varphi + \psi = F and c(φ′−ψ′)=Gc(\varphi' - \psi') = G at t=0t = 0.
  5. φ′=12F′+12cG\varphi' = \frac12F' + \frac1{2c}G and ψ′=12F′−12cG\psi' = \frac12F' - \frac1{2c}G.
  6. u=12[F(x+ct)+F(x−ct)]+12c∫x−ctx+ctGu = \frac12[F(x + ct) + F(x - ct)] + \frac1{2c}\int_{x - ct}^{x + ct}G.
Worked example new (compare Apostol 9.4, Example)
Wave speed 2, initial shape F(x)=e−x2F(x) = e^{-x^2}, initially at rest (G=0G = 0). Describe the solution and find u(3,1.5)u(3, 1.5).

Solution.

  1. Formula. With G=0G = 0: u(x,t)=12[e−(x+2t)2+e−(x−2t)2]u(x, t) = \frac12\big[e^{-(x + 2t)^2} + e^{-(x - 2t)^2}\big]. d’Alembert with c=2c = 2.
  2. Interpret. The first term is a bump of height 12\frac12 moving left at speed 22; the second is a bump of height 12\frac12 moving right at speed 22. F(x−ct)F(x - ct) is FF shifted right by ctct.
  3. Evaluate. At x=3x = 3, t=1.5t = 1.5: x−2t=0x - 2t = 0, x+2t=6x + 2t = 6. So u=12[e−36+1]≈0.5u = \frac12\big[e^{-36} + 1\big] \approx 0.5. The right-moving bump is exactly over x=3x = 3; the left-moving one is 66 units away and negligible.

Answer. Two bumps of half height run apart at speed 22; u(3,1.5)=12(1+e−36)≈0.5u(3, 1.5) = \frac12(1 + e^{-36}) \approx 0.5. Apostol’s own example is the same with the bump 1+cos⁡πx1 + \cos\pi x on (−1,1)(-1, 1) (which has only one continuous derivative at its edges, so it is a solution only in a generalised sense, but the formula still describes the motion).

Your answerFor the wave equation with c=2c = 2, F=e−x2F = e^{-x^2}, G=0G = 0, what is u(3,1.5)u(3, 1.5)?
Worked example new (the velocity term of d'Alembert's formula)
With F=0F = 0 and G(x)=cos⁡xG(x) = \cos x, find the solution of the wave equation and its value at x=0x = 0, t=π/6t = \pi/6 for c=3c = 3.

Solution.

  1. Formula. u=12c∫x−ctx+ctcos⁡s ds=12c[sin⁡(x+ct)−sin⁡(x−ct)]u = \dfrac1{2c}\int_{x - ct}^{x + ct}\cos s\,ds = \dfrac1{2c}\big[\sin(x + ct) - \sin(x - ct)\big]. F=0F = 0, so only the integral term survives.
  2. Simplify. sin⁡(x+ct)−sin⁡(x−ct)=2cos⁡xsin⁡(ct)\sin(x + ct) - \sin(x - ct) = 2\cos x\sin(ct), so u=1ccos⁡xsin⁡(ct)u = \dfrac1c\cos x\sin(ct). Sum-to-product identity: sin⁡A−sin⁡B=2cos⁡A+B2sin⁡A−B2\sin A - \sin B = 2\cos\frac{A + B}2\sin\frac{A - B}2.
  3. Check. utt=−ccos⁡xsin⁡(ct)u_{tt} = -c\cos x\sin(ct) and c2uxx=c2⋅(−1ccos⁡xsin⁡ct)=−ccos⁡xsin⁡ctc^2u_{xx} = c^2\cdot\big(-\frac1c\cos x\sin ct\big) = -c\cos x\sin ct. ✓ And ut(x,0)=cos⁡x=Gu_t(x, 0) = \cos x = G. It solves the equation and the initial data.
  4. Evaluate. For c=3c = 3, x=0x = 0, t=π6t = \frac\pi6: u=13⋅1⋅sin⁡π2=13u = \frac13\cdot1\cdot\sin\frac\pi2 = \frac13. ct=π2ct = \frac\pi2.

Answer. u=1ccos⁡xsin⁡(ct)u = \frac1c\cos x\sin(ct); u(0,π/6)=13u(0, \pi/6) = \frac13. This is a standing wave: the profile cos⁡x\cos x stays in place and oscillates in time with angular frequency cc (the factor sin⁡ct\sin ct).

Your answerFor c=3c = 3, F=0F = 0, G=cos⁡xG = \cos x, find u(0,π/6)u(0, \pi/6).
Beyond the course: for understanding· A finite string: reflections by an odd extension

For a string on [0,L][0, L] fixed at both ends, u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0, extend the initial shape FF to an odd function of period 2L2L and use the same formula. Then u(0,t)=12[F(ct)+F(−ct)]=0u(0, t) = \frac12[F(ct) + F(-ct)] = 0 because FF is odd, and u(L,t)=12[F(L+ct)+F(L−ct)]=12[F(−L+ct)+F(L−ct)]=12[−F(L−ct)+F(L−ct)]=0u(L, t) = \frac12[F(L + ct) + F(L - ct)] = \frac12[F(-L + ct) + F(L - ct)] = \frac12[-F(L - ct) + F(L - ct)] = 0 by periodicity and oddness. The pulses of the formula pass through the walls as upside-down mirror images: a reflection at a fixed end flips the sign, as in the second picture of the visualiser. The motion repeats every 2L/c2L/c, which gives the fundamental frequency f1=c2Lf_1 = \frac{c}{2L}, and the standing waves sin⁡(nπx/L)\sin(n\pi x/L) have frequencies fn=n c2Lf_n = n\,\frac{c}{2L}: a note and its harmonics. For the E4 string above, c=2Lf1=428.5c = 2Lf_1 = 428.5 m/s and the harmonics are 329.6329.6, 659.3659.3, 988.9988.9 Hz, and so on.

Your answerA string of length 0.650.65 m has fundamental frequency 329.63329.63 Hz. What is the wave speed c=2Lf1c = 2Lf_1 in m/s? (Give a decimal.)
Quick checkA pulse travelling to the right along a string reaches a fixed end. What does the reflected pulse look like?

The heat equation

Definition A

Heat equation

The heat equation (or diffusion equation) is ut=αuxxu_t = \alpha u_{xx} for a rod, ut=α(uxx+uyy)u_t = \alpha(u_{xx} + u_{yy}) for a plate, and ut=α∇2uu_t = \alpha\nabla^2u in general, with constant α>0\alpha \gt 0. The first-order time derivative is the difference from the wave equation.

In one lineThe equation ut=αuxxu_t = \alpha u_{xx} (or ut=α∇2uu_t = \alpha\nabla^2u in several space variables) for the temperature uu of a conducting body, with α>0\alpha \gt 0 the diffusivity.

Why it existsIt is energy conservation plus Fourier's law, and the model of every diffusion: heat, dissolved salt, the spread of a probability distribution.

Why· Where the equation comes from: conservation of energy and Fourier's law

Take a rod of cross-section AA, density ρ\rho, specific heat cpc_p and conductivity kk, with temperature u(x,t)u(x, t). The heat stored between xx and x+dxx + dx is ρcpA u dx\rho c_pA\,u\,dx. Fourier’s law (5.2) says heat flows from hot to cold at the rate q=−k uxq = -k\,u_x per unit area. In time dtdt the piece gains A(q(x)−q(x+dx))dt=Ak(ux(x+dx)−ux(x))dt≈Ak uxx dx dtA\big(q(x) - q(x + dx)\big)dt = Ak\big(u_x(x + dx) - u_x(x)\big)dt \approx Ak\,u_{xx}\,dx\,dt. Equating with the rise in stored heat, ρcpA ut dx dt\rho c_pA\,u_t\,dx\,dt, gives ρcput=kuxx\rho c_pu_t = ku_{xx}, that is ut=αuxxu_t = \alpha u_{xx} with α=kρcp\alpha = \dfrac{k}{\rho c_p}. For copper, k=400k = 400 W/(m K) (the value of 5.2), ρ=8960\rho = 8960 kg/m3^3 and cp=385c_p = 385 J/(kg K) give α=4008960⋅385=1.16×10−4\alpha = \dfrac{400}{8960\cdot385} = 1.16\times10^{-4} m2^2/s. The time for heat to cross a length LL is of order L2/αL^2/\alpha: for a 0.20.2 m rod, 0.04/(1.16×10−4)≈3450.04/(1.16\times10^{-4}) \approx 345 s, about six minutes.

Worked example MATH 375 Homework 11 style (Apostol 8.9 #18); related to Apostol 9.5 #1, whose solution is an integral of this kernel
Show that u(x,t)=14παt e−x2/(4αt)u(x, t) = \dfrac1{\sqrt{4\pi\alpha t}}\,e^{-x^2/(4\alpha t)} solves ut=αuxxu_t = \alpha u_{xx} for t>0t \gt 0, and say what it describes.

Solution.

  1. Logarithmic derivative in xx. ux=−x2αt uu_x = -\dfrac{x}{2\alpha t}\,u. Chain rule on the exponent −x2/(4αt)-x^2/(4\alpha t).
  2. Second derivative. uxx=−12αtu−x2αtux=(−12αt+x24α2t2)uu_{xx} = -\dfrac{1}{2\alpha t}u - \dfrac{x}{2\alpha t}u_x = \Big(-\dfrac{1}{2\alpha t} + \dfrac{x^2}{4\alpha^2t^2}\Big)u. Product rule, then substitute uxu_x.
  3. Derivative in tt. ut=(−12t+x24αt2)uu_t = \Big(-\dfrac1{2t} + \dfrac{x^2}{4\alpha t^2}\Big)u. The prefactor t−1/2t^{-1/2} gives −12t-\frac1{2t}, and the exponent −x24αt−1-\frac{x^2}{4\alpha}t^{-1} has tt-derivative +x24αt2+\frac{x^2}{4\alpha t^2}.
  4. Compare. αuxx=(−12t+x24αt2)u=ut\alpha u_{xx} = \Big(-\dfrac1{2t} + \dfrac{x^2}{4\alpha t^2}\Big)u = u_t. ✓

Answer. It is a solution. At each time it is a Gaussian (bell curve) with variance 2αt2\alpha t and total area 11: the temperature after a unit of heat is released at the single point x=0x = 0 at time 00. The width grows like t\sqrt t: diffusion spreads like the square root of time, not linearly. This is the one-dimensional cousin of the function t−3/2e−r2/4tt^{-3/2}e^{-r^2/4t} of 5.2. Convolving any initial temperature with it gives the solution, which is also why the heat equation is Gaussian blurring.

Separation of variables

Before the method, one check that every PDE student must be able to do: test a candidate.

Worked example new (checking a candidate solution)
Is u=e−4tsin⁡xu = e^{-4t}\sin x a solution of ut=4uxxu_t = 4u_{xx}? Of utt=4uxxu_{tt} = 4u_{xx}?

Solution.

  1. Differentiate in tt. ut=−4e−4tsin⁡x=−4uu_t = -4e^{-4t}\sin x = -4u and utt=16e−4tsin⁡x=16uu_{tt} = 16e^{-4t}\sin x = 16u. Treat xx as a constant; only the factor e−4te^{-4t} depends on tt.
  2. Differentiate in xx. ux=e−4tcos⁡xu_x = e^{-4t}\cos x and uxx=−e−4tsin⁡x=−uu_{xx} = -e^{-4t}\sin x = -u. Treat tt as a constant.
  3. Heat equation. 4uxx=−4u=ut4u_{xx} = -4u = u_t. Both sides are the same function.
  4. Wave equation. 4uxx=−4u4u_{xx} = -4u but utt=16uu_{tt} = 16u, and −4u≠16u-4u \ne 16u wherever u≠0u \ne 0. One point where the two sides differ is enough to fail.

Answer. Yes for the heat equation (the shape sin⁡x\sin x decays at rate 44), no for the wave equation (a wave equation would need an oscillating time factor, not a decaying one).

Definition A

Separation of variables

To solve the heat equation on the rod 0≤x≤L0 \le x \le L with the ends held at temperature 00, u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0, try u=X(x)T(t)u = X(x)T(t). Then ut=XT′u_t = XT' and uxx=X′′Tu_{xx} = X''T, so the equation is XT′=αX′′TXT' = \alpha X''T. Dividing by αXT\alpha XT (where nonzero): T′αT=X′′X\dfrac{T'}{\alpha T} = \dfrac{X''}{X}. The left side depends only on tt and the right side only on xx; two functions of different variables that are equal for all x,tx, t are both equal to one constant, call it −κ-\kappa. So X′′=−κXX'' = -\kappa X and T′=−ακTT' = -\alpha\kappa T. The conditions X(0)=X(L)=0X(0) = X(L) = 0 force κ=(nπ/L)2\kappa = (n\pi/L)^2 and X=sin⁡(nπx/L)X = \sin(n\pi x/L), n=1,2,3,…n = 1, 2, 3, \dots (for κ≤0\kappa \le 0 the only solution of X′′=−κXX'' = -\kappa X with both ends zero is X=0X = 0; for κ>0\kappa \gt 0 the solutions are Acos⁡(κx)+Bsin⁡(κx)A\cos(\sqrt\kappa x) + B\sin(\sqrt\kappa x), which vanish at LL only when κL\sqrt\kappa L is a multiple of π\pi). Then T=e−α(nπ/L)2tT = e^{-\alpha(n\pi/L)^2t}.

In one lineThe method of looking for solutions of a PDE that are products of functions of one variable each, such as u=X(x)T(t)u = X(x)T(t), which turns the PDE into ordinary differential equations.

Why it existsIt replaces one PDE by several equations in one variable, which can be solved, and the linearity of the PDE then lets us add the product solutions.

So the modes un(x,t)=e−α(nπ/L)2tsin⁡nπxLu_n(x, t) = e^{-\alpha(n\pi/L)^2t}\sin\dfrac{n\pi x}L are solutions with zero ends, and by superposition any sum ∑bnun\sum b_nu_n is too. The decay rate grows like n2n^2: the wiggly modes die first, which is why heat smooths. To match an initial temperature ff we need ∑bnsin⁡(nπx/L)=f(x)\sum b_n\sin(n\pi x/L) = f(x) and that needs the coefficients.

Definition A

Fourier sine series

For a function ff on [0,L][0, L], its Fourier sine series is ∑n≥1bnsin⁡nπxL\sum_{n \ge 1}b_n\sin\frac{n\pi x}L with bn=2L∫0Lf(x)sin⁡nπxL dxb_n = \dfrac2L\displaystyle\int_0^Lf(x)\sin\dfrac{n\pi x}L\,dx. For piecewise smooth ff the series converges to ff at every point of continuity inside (0,L)(0, L) (at the ends it converges to 00, the value of every sine, so it matches ff there only if f(0)=f(L)=0f(0) = f(L) = 0), a theorem of Dirichlet and Fourier analysis (B, MATH 521). Here we prove the formula for bnb_n when ff is a finite sum of sines, and use it as the recipe for the infinite series.

In one lineThe expansion f(x)=∑n≥1bnsin⁡nπxLf(x) = \sum_{n \ge 1}b_n\sin\dfrac{n\pi x}L on [0,L][0, L], with bn=2L∫0Lf(x)sin⁡nπxL dxb_n = \dfrac2L\int_0^Lf(x)\sin\dfrac{n\pi x}L\,dx.

Why it existsIt writes an arbitrary profile as a sum of the modes that separation of variables produced; the coefficient formula is the projection onto an orthogonal basis from 2.9.

Why· Fourier sine series from scratch: why this formula, and why sines

Separation of variables left us with a ladder of solutions unu_n, one for each whole number nn. The starting temperature is given as some profile f(x)f(x), so we need numbers bnb_n with f(x)=b1sin⁡πxL+b2sin⁡2πxL+⋯f(x) = b_1\sin\frac{\pi x}L + b_2\sin\frac{2\pi x}L + \cdots. This is the vector problem of 2.9 in disguise.

In R3\mathbb R^3, suppose e1,e2,e3e_1, e_2, e_3 are perpendicular and v=c1e1+c2e2+c3e3v = c_1e_1 + c_2e_2 + c_3e_3. Take the dot product with e1e_1: the other two terms drop out because they are perpendicular to e1e_1, leaving v⋅e1=c1 (e1⋅e1)v\cdot e_1 = c_1\,(e_1\cdot e_1), so c1=v⋅e1e1⋅e1c_1 = \dfrac{v\cdot e_1}{e_1\cdot e_1}. Now let the “vectors” be functions on [0,L][0, L], with the inner product ⟨f,g⟩=∫0Lf(x)g(x) dx\langle f, g\rangle = \int_0^Lf(x)g(x)\,dx (the dot product of two functions: multiply value by value at every xx and add up). The “axes” are the sines sn(x)=sin⁡nπxLs_n(x) = \sin\frac{n\pi x}L. The lemma below shows they are perpendicular, ⟨sn,sm⟩=0\langle s_n, s_m\rangle = 0 for n≠mn \ne m, and that each has squared length ⟨sn,sn⟩=L2\langle s_n, s_n\rangle = \frac L2. The recipe is the same: bn=⟨f,sn⟩⟨sn,sn⟩=2L∫0Lf sn dxb_n = \dfrac{\langle f, s_n\rangle}{\langle s_n, s_n\rangle} = \dfrac2L\int_0^Lf\,s_n\,dx.

Why sines and not cosines? The ends are held at 00, and every sns_n is 00 at x=0x = 0 and at x=Lx = L, so every sum of them also has zero ends. A cosine is not 00 at x=0x = 0. Equivalently: extend ff to [−L,L][-L, L] as an odd function, f(−x)=−f(x)f(-x) = -f(x); odd functions are built from sines alone.

What is different from R3\mathbb R^3? There are infinitely many axes, so ”ff equals the sum” needs a meaning of convergence for an infinite sum of functions. Proving that it holds is a theorem of analysis (Dirichlet; MATH 521). For the heat equation the risk is small: for t>0t \gt 0 the factors e−α(nπ/L)2te^{-\alpha(n\pi/L)^2t} shrink the high terms so fast that the series can be differentiated term by term (MATH 521 proves this), and each term solves the equation. At t=0t = 0 the series may converge slowly, or to the wrong value at the ends (every sine is 00 there), which is why the example below tests it at an interior point.

Lemma A Apostol 1.12 (orthogonal families); Fourier 1822

Orthogonality of the sine modes

For positive integers n,mn, m: ⟨sin⁡nπxL,sin⁡mπxL⟩=∫0Lsin⁡nπxLsin⁡mπxL dx\langle\sin\frac{n\pi x}L, \sin\frac{m\pi x}L\rangle = \int_0^L\sin\frac{n\pi x}L\sin\frac{m\pi x}L\,dx equals 00 if n≠mn \ne m and L2\frac L2 if n=mn = m.

In one line∫0Lsin⁡nπxLsin⁡mπxL dx=0\displaystyle\int_0^L\sin\frac{n\pi x}L\sin\frac{m\pi x}L\,dx = 0 for n≠mn \ne m and =L2= \frac L2 for n=mn = m; hence if f=∑bmsin⁡mπxLf = \sum b_m\sin\frac{m\pi x}L (finite sum) then bn=2L∫0Lfsin⁡nπxLb_n = \frac2L\int_0^Lf\sin\frac{n\pi x}L.

Why it is trueIt is what makes the coefficient formula work: take the inner product with one mode and every other term vanishes (2.9).

Proofstandard
The idea: Turn the product of sines into a sum of cosines and integrate; the integrals of cosines over whole periods vanish.
sin⁡nπxLsin⁡mπxL=12[cos⁡(n−m)πxL−cos⁡(n+m)πxL]\sin\frac{n\pi x}L\sin\frac{m\pi x}L = \frac12\Big[\cos\frac{(n - m)\pi x}L - \cos\frac{(n + m)\pi x}L\Big].
Product-to-sum identity sin⁡Asin⁡B=12[cos⁡(A−B)−cos⁡(A+B)]\sin A\sin B = \frac12[\cos(A - B) - \cos(A + B)].
So for n≠mn \ne m both integrals are 00, and for n=mn = m the integral is 12(L−0)=L2\frac12(L - 0) = \frac L2.
For an integer k≠0k \ne 0: ∫0Lcos⁡kπxL dx=Lkπsin⁡(kπ)=0\int_0^L\cos\frac{k\pi x}L\,dx = \frac{L}{k\pi}\sin(k\pi) = 0. For k=0k = 0 the integral is LL. If n≠mn \ne m both n−mn - m and n+mn + m are nonzero; if n=mn = m only n+mn + m is.
Hence bn=2L∫0Lfsin⁡nπxL dxb_n = \frac2L\int_0^Lf\sin\frac{n\pi x}L\,dx.
Multiply f=∑mbmsin⁡mπxLf = \sum_mb_m\sin\frac{m\pi x}L by sin⁡nπxL\sin\frac{n\pi x}L and integrate: only m=nm = n survives, giving bnL2b_n\frac L2. ■\blacksquare
Worked example new (separation of variables)
A rod of length 11 with diffusivity α=1\alpha = 1 and ends at 00 starts at the temperature f(x)=sin⁡πx+12sin⁡3πxf(x) = \sin\pi x + \frac12\sin3\pi x. Find u(x,t)u(x, t) and u(12,0.05)u\big(\frac12, 0.05\big).

Solution.

  1. Identify the modes. ff is already a combination of the modes n=1n = 1 and n=3n = 3 with b1=1b_1 = 1, b3=12b_3 = \frac12, all other bn=0b_n = 0. By orthogonality the coefficients are unique.
  2. Let each mode decay. u(x,t)=e−π2tsin⁡πx+12e−9π2tsin⁡3πxu(x, t) = e^{-\pi^2t}\sin\pi x + \frac12e^{-9\pi^2t}\sin3\pi x. Mode nn decays at the rate αn2π2/L2=n2π2\alpha n^2\pi^2/L^2 = n^2\pi^2.
  3. Check. Each term has ut=−n2π2un=uxxu_t = -n^2\pi^2u_n = u_{xx}, and u(0,t)=u(1,t)=0u(0, t) = u(1, t) = 0, u(x,0)=fu(x, 0) = f. All three requirements.
  4. Evaluate at x=12x = \frac12, t=0.05t = 0.05. sin⁡π2=1\sin\frac\pi2 = 1 and sin⁡3π2=−1\sin\frac{3\pi}2 = -1, so u=e−0.05π2−12e−0.45π2=0.6105−0.0059=0.6046u = e^{-0.05\pi^2} - \frac12e^{-0.45\pi^2} = 0.6105 - 0.0059 = 0.6046. e−0.4935=0.6105e^{-0.4935} = 0.6105 and e−4.441=0.01178e^{-4.441} = 0.01178.

Answer. u(x,t)=e−π2tsin⁡πx+12e−9π2tsin⁡3πxu(x, t) = e^{-\pi^2t}\sin\pi x + \frac12e^{-9\pi^2t}\sin3\pi x; u(12,0.05)≈0.6046u(\frac12, 0.05) \approx 0.6046. By t=0.05t = 0.05 the third mode has fallen to e−9π2⋅0.05=1.2%e^{-9\pi^2\cdot0.05} = 1.2\% of its starting size and the first to 61%61\%: only the smoothest part of the profile survives.

Your answerFor the rod above, what is u(12,0.05)u(\tfrac12, 0.05)? (Give a decimal.)
Worked example new (the Fourier series of 2.9 in action)
Find the Fourier sine coefficients of f(x)=x(1−x)f(x) = x(1 - x) on [0,1][0, 1] and write the solution of the heat equation with α=1\alpha = 1.

Solution.

  1. Coefficient formula. bn=2∫01x(1−x)sin⁡nπx dxb_n = 2\displaystyle\int_0^1x(1 - x)\sin n\pi x\,dx. L=1L = 1.
  2. Integrate by parts twice. With p=x−x2p = x - x^2 and k=nπk = n\pi: ∫01psin⁡kx dx=[−pcos⁡kxk]01+1k∫01p′cos⁡kx dx=0+1k2[p′sin⁡kx]01−1k2∫01p′′sin⁡kx dx=2k2∫01sin⁡kx dx=2(1−cos⁡k)k3\displaystyle\int_0^1p\sin kx\,dx = \Big[-\frac{p\cos kx}k\Big]_0^1 + \frac1k\int_0^1p'\cos kx\,dx = 0 + \frac1{k^2}\Big[p'\sin kx\Big]_0^1 - \frac1{k^2}\int_0^1p''\sin kx\,dx = \frac2{k^2}\int_0^1\sin kx\,dx = \frac{2(1 - \cos k)}{k^3}, which is 2(1−(−1)n)(nπ)3\dfrac{2\big(1 - (-1)^n\big)}{(n\pi)^3}. The boundary terms vanish because pp is 00 at both ends and sin⁡k=sin⁡0=0\sin k = \sin0 = 0; and p′′=−2p'' = -2.
  3. Result. bn=4(1−(−1)n)(nπ)3b_n = \dfrac{4\big(1 - (-1)^n\big)}{(n\pi)^3}: bn=8n3π3b_n = \dfrac{8}{n^3\pi^3} for odd nn and 00 for even nn. For example b1=8π3=0.258b_1 = \dfrac8{\pi^3} = 0.258, b3=0.00956b_3 = 0.00956. The profile is symmetric about 12\frac12, so even modes (antisymmetric) are absent.
  4. The solution. u(x,t)=∑n odd8n3π3 e−n2π2tsin⁡nπxu(x, t) = \displaystyle\sum_{n\text{ odd}}\frac{8}{n^3\pi^3}\,e^{-n^2\pi^2t}\sin n\pi x.
  5. Test at t=0t = 0, x=12x = \frac12. sin⁡nπ2=(−1)(n−1)/2\sin\frac{n\pi}2 = (-1)^{(n - 1)/2} for odd nn, so ∑k8(−1)k(2k+1)3π3=8π3⋅π332=14=f(12)\sum_k\frac{8(-1)^k}{(2k + 1)^3\pi^3} = \frac{8}{\pi^3}\cdot\frac{\pi^3}{32} = \frac14 = f(\frac12). ✓ Uses the known sum 1−127+1125−⋯=π3321 - \frac1{27} + \frac1{125} - \dots = \frac{\pi^3}{32}. The partial sums show it happening: 0.25800.2580 after one term, 0.24850.2485 after two, 0.25050.2505 after three, against f(12)=0.25f(\frac12) = 0.25.

Answer. bn=8/(nπ)3b_n = 8/(n\pi)^3 for odd nn. The coefficients fall like n−3n^{-3} because the odd periodic extension of ff is continuous with a continuous first derivative but its second derivative jumps (from −2-2 to +2+2) at the ends; each further derivative of smoothness gives another factor 1/n1/n, which is why the series converges quickly.

Theorem B the energy method; Evans 2.3, Strauss 2.3

Uniqueness for the heat equation

Suppose u1,u2u_1, u_2 are C2C^2 in xx and C1C^1 in tt on [0,L]×[0,T][0, L]\times[0, T], both solve ut=αuxxu_t = \alpha u_{xx}, both have the same values at t=0t = 0 and the same values at x=0x = 0 and x=Lx = L for all tt. Then u1=u2u_1 = u_2.

In one lineA C2C^2 solution of ut=αuxxu_t = \alpha u_{xx} on [0,L]×[0,T][0, L]\times[0, T] with given initial temperature and given end temperatures is unique.

Why it is trueIt says that separation of variables does not miss anything: once you have found a solution of the problem, it is the solution.

ProofEvans 2.3
The idea: The difference w solves the same equation with zero data. Its total squared temperature E(t) = the integral of w squared never increases, because its derivative is minus a sum of squares; it starts at zero, so it stays zero.
Put w=u1−u2w = u_1 - u_2 and E(t)=∫0Lw(x,t)2 dx≥0E(t) = \int_0^Lw(x, t)^2\,dx \ge 0.
The equation is linear (superposition), so w=u1−u2w = u_1 - u_2 solves it, with w(x,0)=0w(x, 0) = 0 and w(0,t)=w(L,t)=0w(0, t) = w(L, t) = 0.
E′(t)=2∫0Lwwt dx=2α∫0Lwwxx dxE'(t) = 2\int_0^Lww_t\,dx = 2\alpha\int_0^Lww_{xx}\,dx.
Differentiate under the integral sign (the integrand is C1C^1 on a compact rectangle, hence wtw_t is uniformly continuous and the integral may be differentiated), then use the equation.
E′(t)=−2α∫0Lwx2 dx≤0E'(t) = -2\alpha\int_0^Lw_x^2\,dx \le 0.
Integration by parts: ∫0Lwwxx dx=[wwx]0L−∫0Lwx2 dx\int_0^Lww_{xx}\,dx = [ww_x]_0^L - \int_0^Lw_x^2\,dx, and w=0w = 0 at x=0x = 0 and LL kills the bracket.
Then ∫0Lw2 dx=0\int_0^Lw^2\,dx = 0 for all tt; as w2w^2 is continuous and non-negative, w≡0w \equiv 0. ■\blacksquare
E(0)=0E(0) = 0 since w(⋅,0)=0w(\cdot, 0) = 0, E≥0E \ge 0 and EE is non-increasing. So E≡0E \equiv 0.
Quick checkWhy can the heat equation not be run backwards in time?
Python labHeat equation by finite differences, and when it blows up
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt

N = 50; dx = 1 / N                       # 50 intervals on a rod of length 1, diffusivity alpha = 1
xs = np.linspace(0, 1, N + 1)
f = lambda x: np.sin(np.pi * x) + 0.5 * np.sin(3 * np.pi * x)       # initial temperature
def exact(x, t):                          # separation of variables: each mode decays like exp(-(n pi)^2 t)
    return np.exp(-np.pi**2 * t) * np.sin(np.pi * x) + 0.5 * np.exp(-9 * np.pi**2 * t) * np.sin(3 * np.pi * x)

def solve(r, T):
    """Explicit scheme u_j <- u_j + r (u_{j+1} - 2 u_j + u_{j-1}) with r = dt/dx^2; the ends stay at 0."""
    dt = r * dx**2; steps = int(round(T / dt)); u = f(xs)
    for _ in range(steps):
        u[1:-1] = u[1:-1] + r * (u[2:] - 2 * u[1:-1] + u[:-2])
    return u, steps * dt

print(" r     steps   max|u|        max error vs exact")
for r in (0.4, 0.5, 0.6):
    u, T = solve(r, 0.05)
    print(f"{r:.1f}   {int(round(T / (r * dx**2))):5d}   {np.abs(u).max():.3e}   {np.abs(u - exact(xs, T)).max():.3e}")

plt.figure(figsize=(6, 3.2))
for T in (0.0, 0.005, 0.02, 0.05):
    u, T2 = solve(0.4, T) if T > 0 else (f(xs), 0)
    plt.plot(xs, u, label=f"t = {T}")
plt.plot(xs, exact(xs, 0.05), "k--", lw=1, label="exact, t = 0.05")
plt.legend(); plt.xlabel("x"); plt.ylabel("temperature")

Try this. Run it. For r = 0.4 and 0.5 the numerical solution agrees with the exact two-mode solution to about 2e-4 (the plot shows the profile flattening and the third mode vanishing first). For r = 0.6 the same code gives a number near 3e13: the explicit scheme is unstable when r = alpha dt / dx^2 exceeds 1/2, because the highest-frequency grid mode is then multiplied by a factor of absolute value above 1 at every step. Change N to 100 with r = 0.5 and check that the number of steps quadruples (the stable step is proportional to dx squared). Change f to a single spike (u = 1 at x = 0.5, 0 elsewhere) and watch it become a bell curve of width about sqrt(2 t).

Standing waves from the same method

For the wave equation on [0,L][0, L] with fixed ends, u=X(x)T(t)u = X(x)T(t) gives T′′c2T=X′′X=−κ\dfrac{T''}{c^2T} = \dfrac{X''}{X} = -\kappa with the same X=sin⁡nπxLX = \sin\frac{n\pi x}L, and T′′=−c2(nπL)2TT'' = -c^2\big(\frac{n\pi}L\big)^2T, so T=Acos⁡nπctL+Bsin⁡nπctLT = A\cos\frac{n\pi ct}L + B\sin\frac{n\pi ct}L. The modes sin⁡nπxLcos⁡nπctL\sin\frac{n\pi x}L\cos\frac{n\pi ct}L are the standing waves of the first picture: mode nn vibrates at frequency n c/(2L)n\,c/(2L). The only difference from the heat case is the sign in the time equation: oscillation instead of decay. That one sign separates a string, which rings forever (in the model), from a rod, which cools.

Laplace’s equation

Definition A

Laplace equation

Laplace’s equation is ∇2u=0\nabla^2u = 0, where ∇2u=∑kuxkxk\nabla^2u = \sum_ku_{x_kx_k} is the Laplacian, the sum of the pure second partial derivatives (the trace of the Hessian, 5.6). If ut=α∇2uu_t = \alpha\nabla^2u and uu does not depend on tt, then ∇2u=0\nabla^2u = 0. Apostol 9.1 (equation 9.2).

In one lineThe equation ∇2u=uxx+uyy=0\nabla^2u = u_{xx} + u_{yy} = 0 (or uxx+uyy+uzz=0u_{xx} + u_{yy} + u_{zz} = 0): the steady state of the heat equation.

Why it existsIt is what remains when nothing changes in time: the temperature of a plate once it has settled, the electrostatic potential in empty space.

Definition A

Harmonic function

A harmonic function on an open set Ω\Omega is a C2C^2 function with ∇2u=0\nabla^2u = 0 throughout Ω\Omega. Examples in the plane: constants, xx, yy, xyxy, x2−y2x^2 - y^2, x3−3xy2x^3 - 3xy^2, excos⁡ye^x\cos y, ln⁡x2+y2\ln\sqrt{x^2 + y^2} (away from the origin). Not harmonic: x2+y2x^2 + y^2 (its Laplacian is 44). In space, 1/x2+y2+z21/\sqrt{x^2 + y^2 + z^2} is harmonic away from the origin (the potential of a point charge or a point mass).

In one lineA C2C^2 function uu on an open set that satisfies ∇2u=0\nabla^2u = 0 there.

Why it existsHarmonic functions are the solutions of Laplace's equation; they have remarkable rigidity (the mean value property) that makes them the model of 'no sources and no sinks'.

Lemma A Apostol 9.5 #4

Polar form of the Laplacian

For u∈C2u \in C^2 and x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta, r>0r \gt 0: uxx+uyy=Urr+1rUr+1r2Uθθu_{xx} + u_{yy} = U_{rr} + \dfrac1rU_r + \dfrac1{r^2}U_{\theta\theta}.

In one lineIf U(r,θ)=u(rcos⁡θ,rsin⁡θ)U(r, \theta) = u(r\cos\theta, r\sin\theta) with uu of class C2C^2, then for r>0r \gt 0: uxx+uyy=Urr+1rUr+1r2Uθθu_{xx} + u_{yy} = U_{rr} + \dfrac1rU_r + \dfrac1{r^2}U_{\theta\theta}.

Why it is trueIt is the form of Laplace's equation that suits discs and circles, and it is the key to the mean value property and to separation of variables in polar coordinates.

ProofApostol 9.5 #4
The idea: Compute U_r, U_rr, U_theta and U_theta theta with the chain rule. The cross terms cancel and the first-order terms in U_theta theta combine with U_r.
Ur=uxcos⁡θ+uysin⁡θU_r = u_x\cos\theta + u_y\sin\theta and Urr=uxxcos⁡2θ+2uxysin⁡θcos⁡θ+uyysin⁡2θU_{rr} = u_{xx}\cos^2\theta + 2u_{xy}\sin\theta\cos\theta + u_{yy}\sin^2\theta.
Chain rule (5.4) with xr=cos⁡θx_r = \cos\theta, yr=sin⁡θy_r = \sin\theta.
Uθ=−rsin⁡θ ux+rcos⁡θ uyU_\theta = -r\sin\theta\,u_x + r\cos\theta\,u_y.
Chain rule with xθ=−rsin⁡θx_\theta = -r\sin\theta, yθ=rcos⁡θy_\theta = r\cos\theta.
Uθθ=−r(uxcos⁡θ+uysin⁡θ)+r2(uxxsin⁡2θ−2uxysin⁡θcos⁡θ+uyycos⁡2θ)U_{\theta\theta} = -r\big(u_x\cos\theta + u_y\sin\theta\big) + r^2\big(u_{xx}\sin^2\theta - 2u_{xy}\sin\theta\cos\theta + u_{yy}\cos^2\theta\big).
Differentiate UθU_\theta again: the product rule on the factors −rsin⁡θ-r\sin\theta, rcos⁡θr\cos\theta gives −rcos⁡θ ux−rsin⁡θ uy-r\cos\theta\,u_x - r\sin\theta\,u_y, and the chain rule on ux,uyu_x, u_y gives the second-order terms (with uxy=uyxu_{xy} = u_{yx} by 5.5).
Urr+1rUr+1r2Uθθ=uxx+uyyU_{rr} + \frac1rU_r + \frac1{r^2}U_{\theta\theta} = u_{xx} + u_{yy}.
The first bracket is UrU_r, so Uθθ=−rUr+r2(…)U_{\theta\theta} = -rU_r + r^2\big(\ldots\big). Divide by r2r^2 and add UrrU_{rr} and 1rUr\frac1rU_r: the UrU_r terms cancel, the uxyu_{xy} terms cancel, and cos⁡2+sin⁡2=1\cos^2 + \sin^2 = 1 multiplies uxxu_{xx} and uyyu_{yy}. ■\blacksquare
Worked example Apostol 9.5 #2 and #3
Find all radial harmonic functions u=g(r)u = g(r) in the plane away from the origin, and in R3\mathbb R^3.

Solution.

  1. Plane. For u=g(r)u = g(r) the lemma gives ∇2u=g′′+1rg′=1r(rg′)′\nabla^2u = g'' + \dfrac1rg' = \dfrac1r(rg')'. UU does not depend on θ\theta, so Uθθ=0U_{\theta\theta} = 0.
  2. Solve. ∇2u=0\nabla^2u = 0 means (rg′)′=0(rg')' = 0, so rg′=arg' = a and g=aln⁡r+bg = a\ln r + b. Integrate twice.
  3. Space. In Rn\mathbb R^n the same computation gives ∇2g(r)=g′′+n−1rg′\nabla^2g(r) = g'' + \dfrac{n - 1}rg', which vanishes when rn−1g′r^{n - 1}g' is constant: g=ar2−n+bg = ar^{2 - n} + b for n≥3n \ge 3. For n=3n = 3, g=a/r+bg = a/r + b. Check n=3n = 3 directly: g=r−1g = r^{-1} has g′′=2r−3g'' = 2r^{-3} and 2rg′=−2r−3\frac2rg' = -2r^{-3}.

Answer. aln⁡x2+y2+ba\ln\sqrt{x^2 + y^2} + b in the plane; a/x2+y2+z2+ba/\sqrt{x^2 + y^2 + z^2} + b in space. These are the potentials of a line charge and of a point charge (Apostol’s answer for the plane is written alog⁡(x2+y2)+ba\log(x^2 + y^2) + b).

Theorem B Gauss; Evans 2.2.2; Strauss 6.3

Mean value property of harmonic functions

Let uu be harmonic on an open set containing the closed disc Bˉ(a,R)\bar B(a, R) of the plane. Then

u(a)=12π∫02πu(a1+Rcos⁡θ, a2+Rsin⁡θ) dθ.u(a) = \frac1{2\pi}\int_0^{2\pi}u\big(a_1 + R\cos\theta,\ a_2 + R\sin\theta\big)\,d\theta.

In one lineIf uu is harmonic on an open set containing the closed disc of radius RR about aa, then u(a)=12π∫02πu(a1+Rcos⁡θ, a2+Rsin⁡θ) dθu(a) = \dfrac1{2\pi}\displaystyle\int_0^{2\pi}u\big(a_1 + R\cos\theta,\ a_2 + R\sin\theta\big)\,d\theta: the value at the centre is the average over the circle.

Why it is trueIt says a harmonic function has no preferred point: its value at any point is the average of its neighbours. That one fact gives the maximum principle, smoothness, and the uniqueness of the temperature or potential with given boundary values.

ProofEvans 2.2.2, in polar form
The idea: Let M(r) be the average of u over the circle of radius r. Show its derivative is zero by using Laplace's equation in polar form and the fact that the circle has no end points, so a derivative with respect to the angle integrates to zero. Then M(R) = M(0) = u(a).
Define M(r)=12π∫02πU(r,θ) dθM(r) = \dfrac1{2\pi}\displaystyle\int_0^{2\pi}U(r, \theta)\,d\theta. Then M(0)=u(a)M(0) = u(a) and we want M(R)=M(0)M(R) = M(0).
Write U(r,θ)=u(a1+rcos⁡θ,a2+rsin⁡θ)U(r, \theta) = u(a_1 + r\cos\theta, a_2 + r\sin\theta) for 0≤r≤R0 \le r \le R; it is C2C^2 and 2π2\pi-periodic in θ\theta. At r=0r = 0 it equals u(a)u(a) for every θ\theta.
rM′(r)=12π∫02πrUr dθ=:N(r)rM'(r) = \dfrac1{2\pi}\displaystyle\int_0^{2\pi}rU_r\,d\theta =: N(r).
Differentiate under the integral sign: UrU_r is continuous on the compact set [0,R]×[0,2π][0, R]\times[0, 2\pi], hence uniformly continuous (4.3, 1.3), which lets the difference quotients converge uniformly.
N(r)→0N(r) \to 0 as r→0+r \to 0^+.
∣N(r)∣≤rmax⁡∣∇u∣\lvert N(r)\rvert \le r\max\lvert\nabla u\rvert, since ∣Ur∣=∣∇u⋅(cos⁡θ,sin⁡θ)∣≤∥∇u∥\lvert U_r\rvert = \lvert\nabla u\cdot(\cos\theta, \sin\theta)\rvert \le \lVert\nabla u\rVert (Cauchy–Schwarz).
N′(r)=12π∫02πr(Urr+1rUr)dθN'(r) = \dfrac1{2\pi}\displaystyle\int_0^{2\pi}r\Big(U_{rr} + \frac1rU_r\Big)d\theta.
Differentiate again under the integral: (rUr)r=rUrr+Ur=r(Urr+1rUr)(rU_r)_r = rU_{rr} + U_r = r\big(U_{rr} + \frac1rU_r\big).
N′(r)=−12πr∫02πUθθ dθN'(r) = -\dfrac1{2\pi r}\displaystyle\int_0^{2\pi}U_{\theta\theta}\,d\theta.
Laplace's equation in polar form (the lemma): Urr+1rUr=−1r2UθθU_{rr} + \frac1rU_r = -\frac1{r^2}U_{\theta\theta}.
So N′(r)=0N'(r) = 0 for 0<r≤R0 \lt r \le R.
Fundamental theorem of calculus: ∫02πUθθ dθ=Uθ(r,2π)−Uθ(r,0)=0\int_0^{2\pi}U_{\theta\theta}\,d\theta = U_\theta(r, 2\pi) - U_\theta(r, 0) = 0 because UθU_\theta is 2π2\pi-periodic.This is the step where the circle being closed matters: a derivative integrated around a closed loop gives zero.
N≡0N \equiv 0, hence MM is constant.
NN is constant on (0,R](0, R] and tends to 00 at 00, so N≡0N \equiv 0. Then M′(r)=N(r)/r=0M'(r) = N(r)/r = 0 on (0,R](0, R], so MM is constant on [0,R][0, R] (mean value theorem, continuity at 00), and M(R)=M(0)=u(a)M(R) = M(0) = u(a). ■\blacksquare
Proof workshopRebuild the proof of the mean value propertyEvans 2.2.2

Tap the lines in the order a proof would write them. Each line can only use what is already above it.

    Corollary B Evans 2.2.3; Strauss 6.1

    Maximum principle for harmonic functions

    Let Ω⊆R2\Omega \subseteq \mathbb R^2 be open and connected and uu harmonic on Ω\Omega. If u(p)≥u(x)u(p) \ge u(x) for all x∈Ωx \in \Omega for some p∈Ωp \in \Omega, then uu is constant on Ω\Omega. The same for a minimum.

    In one lineIf uu is harmonic on a connected open set Ω\Omega and has a maximum (or a minimum) at a point of Ω\Omega, then uu is constant. So a non-constant harmonic function on a bounded region, continuous up to the boundary, attains its largest and smallest values on the boundary only.

    Why it is trueIt says harmonic functions have no interior peaks or valleys, which gives the uniqueness of the steady-state temperature or potential with given boundary values.

    ProofEvans 2.2.3
    The idea: The set where u equals its maximum value M is closed by continuity and open by the mean value property, so it is everything because the region is connected.
    AA is a non-empty closed subset of Ω\Omega.
    Let M=u(p)M = u(p) and A={x∈Ω:u(x)=M}A = \{x \in \Omega : u(x) = M\}. It is non-empty (it contains pp) and closed in Ω\Omega, as the preimage of the closed set {M}\{M\} under the continuous uu.
    u=Mu = M on every circle of radius r<ρr \lt \rho about xx, so u=Mu = M on B(x,ρ)B(x, \rho) and B(x,ρ)⊆AB(x, \rho) \subseteq A: AA is open.
    Let x∈Ax \in A and a ball B(x,ρ)B(x, \rho) inside Ω\Omega. For 0<r<ρ0 \lt r \lt \rho the mean value property gives M=u(x)=12π∫02πu(x+r(cos⁡θ,sin⁡θ)) dθM = u(x) = \frac1{2\pi}\int_0^{2\pi}u(x + r(\cos\theta, \sin\theta))\,d\theta. The integrand is at most MM, and an average of numbers at most MM equals MM only if all of them are MM (continuity of the integrand).
    A=ΩA = \Omega, that is u≡Mu \equiv M.
    A set that is open, closed and non-empty in a connected set is the whole set (4.4). For a minimum apply the result to −u-u, which is also harmonic. ■\blacksquare
    Quick checkA bounded function uu is harmonic on the open unit disc, with boundary values tending to 11 on the upper half of the boundary circle and to 00 on the lower half (except at the two points where the data jumps). Which statement does the maximum principle give?
    Your answerThe function u=x3−3xy2u = x^3 - 3xy^2 is harmonic. What is its average value over the circle of radius 22 centred at (1,1)(1, 1)?
    Your answerRod of length 11, diffusivity 11, ends at 00: after how long does the first mode e−π2tsin⁡πxe^{-\pi^2t}\sin\pi x fall to half its initial size? (Give a decimal.)

    Where it is used

    Used inside maths· Inside maths: complex analysis, saddle points, and Fourier series

    Harmonic functions and complex numbers. If f=u+ivf = u + iv is a differentiable function of z=x+iyz = x + iy (the complex analysis of MATH 521), then uu and vv satisfy the Cauchy–Riemann equations ux=vyu_x = v_y and uy=−vxu_y = -v_x. Differentiating the first in xx and the second in yy and using the equality of mixed partials (5.5): uxx+uyy=vyx−vxy=0u_{xx} + u_{yy} = v_{yx} - v_{xy} = 0. So the real and imaginary parts of z2z^2, namely x2−y2x^2 - y^2 and 2xy2xy, and of z3z^3, namely x3−3xy2x^3 - 3xy^2 and 3x2y−y33x^2y - y^3, are harmonic; every conformal picture in the plane is a pair of harmonic functions. No interior extremes. ∇2u\nabla^2u is the trace of the Hessian (5.6), so at a critical point of a harmonic function the Hessian has trace 00 and cannot be positive or negative definite: the second-derivative test can only report a saddle or a degenerate point, which is the maximum principle seen through the Hessian. Fourier series. The sine modes are an orthogonal family in the inner product of 2.9, and the coefficient formula is the orthogonal projection of ff onto each: the same formula that gives the best approximation in 2.9. The convergence of the series is the subject of Fourier analysis, and the reason Dirichlet’s 1829 theorem was needed.

    Used in the real world· Guitar strings, copper rods, blurred images and potentials

    A guitar string. With L=0.65L = 0.65 m, density 0.50.5 g/m and tension 91.891.8 N, the wave speed is c=T/ρ=428.5c = \sqrt{T/\rho} = 428.5 m/s, the fundamental is f1=c/(2L)=329.6f_1 = c/(2L) = 329.6 Hz (the note E4) and the harmonics are 659.3659.3 and 988.9988.9 Hz. Plucking the string at a third of its length leaves out mode 33 (and every multiple of 33), because sin⁡(nπx/L)\sin(n\pi x/L) is 00 at x=L/3x = L/3 when n=3n = 3: the coefficients of a plucked string are computed with the sine formula above. Doubling the tension multiplies the pitch by 2\sqrt2, an interval of six semitones (a tritone).

    A copper rod. From the heat equation, a rod of length 0.20.2 m with ends held at the ambient temperature and an initial half-sine profile of excess temperature loses half of that excess every 2424 s; the second mode decays four times faster. A hot-spot of heat at the centre spreads as a bell curve of width 2αt\sqrt{2\alpha t}: at t=60t = 60 s the standard deviation is 2⋅1.16×10−4⋅60=0.118\sqrt{2\cdot1.16\times10^{-4}\cdot60} = 0.118 m.

    Image blurring and diffusion models. The convolution of an image with a Gaussian of standard deviation σ\sigma pixels is the solution of the heat equation (with α=1\alpha = 1) at time t=σ2/2t = \sigma^2/2: a blur with σ=3\sigma = 3 pixels is 4.54.5 time units of diffusion, and edge detection by ‘blur, then differentiate’ (the Laplacian of Gaussian) uses that the Gaussian solves the equation. In the simplest diffusion model for images, the noise added during the forward process is Gaussian with growing variance, so the density of the noisy data evolves by the heat equation; generating an image runs this process backwards, and running the heat equation backwards is ill-posed (see the quiz), so in practice the reverse process is steered by the gradient of the logarithm of the density, which a neural network learns.

    Potentials. The electrostatic potential of a point charge qq in vacuum is V=q4πε0rV = \dfrac{q}{4\pi\varepsilon_0r}, harmonic away from the origin, and by the mean value property the potential at the centre of any empty sphere equals its average over the sphere: the potential has no local minimum in empty space, which is the idea behind Earnshaw’s theorem that charges cannot be held in stable static equilibrium by electrostatic forces alone.

    Traps

    Watch out· The solution of a first-order PDE contains a function, not a constant

    ut+2ux=0u_t + 2u_x = 0 has the general solution g(x−2t)g(x - 2t) for any differentiable gg. Writing 'u=Cu = C' or ’u=ex−2tu = e^{x - 2t} times a constant’ misses all other solutions. The function gg is selected by the initial data, and the sign in x−2tx - 2t matters: g(x+2t)g(x + 2t) moves the other way.

    Watch out· Separation of variables finds special solutions only

    A product X(x)T(t)X(x)T(t) is a special solution. A general solution is a sum (or series) of them, with coefficients from the initial data. And dividing by XTXT assumes it is nonzero: the constant −κ-\kappa is a separation constant and must be the same on both sides. Check the boundary conditions before you pick the sign of κ\kappa.

    Watch out· Count the conditions

    Wave equation: two conditions in time (uu and utu_t at t=0t = 0) and conditions at the boundary. Heat equation: one condition in time. Laplace: none in time, only boundary values. Giving too few leaves a function free; giving too many may leave no solution. And the heat equation cannot be solved backwards.

    Watch out· Smoothness hypotheses are real

    d’Alembert’s formula needs F∈C2F \in C^2 to be a classical solution. For a plucked string with a corner, the formula still describes the motion but uxxu_{xx} does not exist at the corner. The mean value property needs the closed disc inside the domain of harmonicity.

    Watch out· Numerical stability is not optional

    The explicit finite-difference scheme for the heat equation needs α dt/dx2≤12\alpha\,dt/dx^2 \le \frac12. Halving the grid spacing forces the time step to a quarter, so a four-times finer grid in one dimension costs 64 times the work. See the lab above, where r=0.6r = 0.6 explodes.

    Problems

    check

    Is e−9tsin⁡3xe^{-9t}\sin3x a solution of ut=uxxu_t = u_{xx}? Of utt=9uxxu_{tt} = 9u_{xx}?

    Solution

    ut=−9uu_t = -9u and uxx=−9uu_{xx} = -9u, so ut=uxxu_t = u_{xx}: yes for the heat equation. For the wave equation, utt=81uu_{tt} = 81u while 9uxx=−81u9u_{xx} = -81u: no.

    checkApostol 9.2

    Find the general solution of 5fx−2fy=05f_x - 2f_y = 0.

    Solution

    With a=5a = 5, b=−2b = -2: f(x,y)=g(bx−ay)=g(−2x−5y)f(x, y) = g(bx - ay) = g(-2x - 5y), which is the same family as h(2x+5y)h(2x + 5y) for an arbitrary differentiable hh. Check: fx=2h′f_x = 2h', fy=5h′f_y = 5h' for f=h(2x+5y)f = h(2x + 5y), so 5fx−2fy=10h′−10h′=05f_x - 2f_y = 10h' - 10h' = 0.

    checknew (compare Apostol 9.5 #2)

    Which of x2+y2x^2 + y^2, x2−y2x^2 - y^2, xyxy, ln⁡(x2+y2)\ln(x^2 + y^2), exsin⁡ye^x\sin y are harmonic in the plane (away from the origin for the logarithm)?

    Solution

    x2+y2x^2 + y^2: ∇2=4\nabla^2 = 4, no. x2−y2x^2 - y^2: 2−2=02 - 2 = 0, yes. xyxy: 0+0=00 + 0 = 0, yes. ln⁡(x2+y2)=2ln⁡r\ln(x^2 + y^2) = 2\ln r: yes (the radial formula). exsin⁡ye^x\sin y: exsin⁡y−exsin⁡y=0e^x\sin y - e^x\sin y = 0, yes.

    check

    How many initial conditions does each of the wave, heat and Laplace equations take, and why?

    Solution

    Wave: two (uu and utu_t at t=0t = 0), since it is second order in time. Heat: one (uu at t=0t = 0), first order in time. Laplace: none in time (no time variable); the solution is determined by its values on the boundary of the region.

    usenew (first-order PDE)

    Solve 3ux+5uy=03u_x + 5u_y = 0 with u(0,y)=y2u(0, y) = y^2.

    Solution

    General solution u=g(5x−3y)u = g(5x - 3y) (here a=3a = 3, b=5b = 5). At x=0x = 0: g(−3y)=y2g(-3y) = y^2, so g(s)=s29g(s) = \frac{s^2}9. Hence u(x,y)=(5x−3y)29u(x, y) = \dfrac{(5x - 3y)^2}9. Check: ux=10(5x−3y)9u_x = \frac{10(5x - 3y)}{9}, uy=−6(5x−3y)9u_y = -\frac{6(5x - 3y)}{9}, so 3ux+5uy=30−309(5x−3y)=03u_x + 5u_y = \frac{30 - 30}{9}(5x - 3y) = 0.

    usenew (a velocity impulse; d'Alembert with G nonzero)

    For c=1c = 1, F=0F = 0 and G(x)=1G(x) = 1 for ∣x∣<1\lvert x\rvert \lt 1, G(x)=0G(x) = 0 otherwise (a string struck along an interval), find u(0,t)u(0, t) from d’Alembert’s formula.

    Solution

    u(0,t)=12∫−ttG(s) dsu(0, t) = \frac1{2}\int_{-t}^{t}G(s)\,ds (with c=1c = 1, x=0x = 0). For 0≤t≤10 \le t \le 1 the interval [−t,t][-t, t] lies inside (−1,1)(-1, 1), so the integral is 2t2t and u(0,t)=tu(0, t) = t. For t≥1t \ge 1 the integral is 22 (the whole interval of GG) and u(0,t)=1u(0, t) = 1. So the midpoint rises linearly and then stays at height 11: the wave leaves behind a raised plateau. (The formula applies even though GG is not continuous, as an integral.)

    usecopper rod

    A copper rod of length 0.20.2 m (α=1.16×10−4\alpha = 1.16\times10^{-4} m2^2/s) has ends held at the ambient temperature, and the excess temperature starts as sin⁡(πx/L)\sin(\pi x/L). After how many seconds does the excess at the centre fall to 10%10\% of its start?

    Solution

    Mode 11 decays as e−απ2t/L2e^{-\alpha\pi^2t/L^2}. Setting e−απ2t/L2=0.1e^{-\alpha\pi^2t/L^2} = 0.1: t=L2ln⁡10απ2=0.04⋅2.30261.16×10−4⋅9.8696=0.0921030.0011449=80.4t = \dfrac{L^2\ln10}{\alpha\pi^2} = \dfrac{0.04\cdot2.3026}{1.16\times10^{-4}\cdot9.8696} = \dfrac{0.092103}{0.0011449} = 80.4 s.

    useApostol 9.5 #3

    Find all harmonic functions of the form g(r)g(r), r=∥x∥r = \lVert x\rVert, in R4\mathbb R^4 away from the origin.

    Solution

    In Rn\mathbb R^n: ∇2g(r)=g′′+n−1rg′\nabla^2g(r) = g'' + \frac{n - 1}rg'. For n=4n = 4 this is g′′+3rg′=r−3(r3g′)′g'' + \frac3rg' = r^{-3}(r^3g')', zero when r3g′=ar^3g' = a, so g=−a2r2+bg = -\frac a{2r^2} + b, that is g=αr−2+bg = \alpha r^{-2} + b. (This is r2−nr^{2 - n} for n=4n = 4.)

    provenew (energy conservation of the string)

    Show that a C2C^2 solution of the wave equation on [0,L][0, L] with u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0 conserves the energy E(t)=12∫0L(ut2+c2ux2) dxE(t) = \frac12\int_0^L\big(u_t^2 + c^2u_x^2\big)\,dx.

    Solution

    Plan. Differentiate EE, use the equation, and integrate by parts.

    E′(t)=∫0L(ututt+c2uxuxt)dxE'(t) = \int_0^L\big(u_tu_{tt} + c^2u_xu_{xt}\big)dx (differentiating under the integral sign; the integrand is C1C^1 on a compact set). With utt=c2uxxu_{tt} = c^2u_{xx}: E′=c2∫0L(utuxx+uxuxt)dx=c2∫0L∂∂x(utux)dxE' = c^2\int_0^L\big(u_tu_{xx} + u_xu_{xt}\big)dx = c^2\int_0^L\frac{\partial}{\partial x}\big(u_tu_x\big)dx (product rule, using uxt=utxu_{xt} = u_{tx} from 5.5) =c2[utux]x=0x=L= c^2\big[u_tu_x\big]_{x = 0}^{x = L}. Since u(0,t)=0u(0, t) = 0 for all tt, ut(0,t)=0u_t(0, t) = 0, and likewise at LL, so the bracket is 00. Hence E′=0E' = 0 and EE is constant. ■\blacksquare (12∫ut2\frac12\int u_t^2 is kinetic and c22∫ux2\frac{c^2}{2}\int u_x^2 is potential energy; the string never loses energy in this model.)

    provenew (orthogonality used for coefficients)

    Prove that ∫0Lsin⁡nπxLsin⁡mπxL dx=0\int_0^L\sin\frac{n\pi x}L\sin\frac{m\pi x}L\,dx = 0 for integers n≠mn \ne m, both positive, and compute the value for n=mn = m.

    Solution

    Plan. Product-to-sum, then integrate.

    sin⁡Asin⁡B=12[cos⁡(A−B)−cos⁡(A+B)]\sin A\sin B = \frac12[\cos(A - B) - \cos(A + B)], so the integral is 12∫0L[cos⁡(n−m)πxL−cos⁡(n+m)πxL]dx\frac12\int_0^L\big[\cos\frac{(n - m)\pi x}L - \cos\frac{(n + m)\pi x}L\big]dx. For a nonzero integer kk, ∫0Lcos⁡kπxL dx=Lkπsin⁡kπ=0\int_0^L\cos\frac{k\pi x}L\,dx = \frac L{k\pi}\sin k\pi = 0. When n≠mn \ne m both n−mn - m and n+mn + m are nonzero integers, so the integral is 00. When n=mn = m the first cosine is cos⁡0=1\cos0 = 1 with integral LL and the second integrates to 00: the value is L2\frac L2. ■\blacksquare

    provenew (uniqueness of the Dirichlet problem)

    Let Ω\Omega be a bounded connected open set of the plane, and u1,u2u_1, u_2 functions that are continuous on Ωˉ\bar\Omega and harmonic in Ω\Omega and agree on the boundary ∂Ω\partial\Omega. Prove u1=u2u_1 = u_2.

    Solution

    Plan. The difference is harmonic and zero on the boundary; apply the maximum principle on a compact set.

    Put w=u1−u2w = u_1 - u_2, harmonic in Ω\Omega (linearity), continuous on the compact set Ωˉ\bar\Omega (closed and bounded), and w=0w = 0 on ∂Ω\partial\Omega. By the extreme value theorem (4.3) ww has a maximum at some point of Ωˉ\bar\Omega. If it is in Ω\Omega, then by the maximum principle ww is constant on Ω\Omega, hence (by continuity) equal to its boundary value 00 on Ωˉ\bar\Omega. Otherwise it is on ∂Ω\partial\Omega, where w=0w = 0, so w≤0w \le 0 everywhere. The same argument for −w-w gives w≥0w \ge 0. So w≡0w \equiv 0. ■\blacksquare

    stretchnew (Cauchy–Riemann and harmonic functions)

    Let uu and vv be C2C^2 with ux=vyu_x = v_y and uy=−vxu_y = -v_x. Prove that uu and vv are harmonic, and that ∇u⊥∇v\nabla u\perp\nabla v. Find vv when u=x2−y2u = x^2 - y^2, and verify the perpendicularity.

    Solution

    Differentiate: uxx=vyxu_{xx} = v_{yx} and uyy=−vxyu_{yy} = -v_{xy}, so uxx+uyy=vyx−vxy=0u_{xx} + u_{yy} = v_{yx} - v_{xy} = 0 by equality of mixed partials (5.5). Likewise vxx=−uyxv_{xx} = -u_{yx} and vyy=uxyv_{yy} = u_{xy}, so vxx+vyy=0v_{xx} + v_{yy} = 0. And ∇u⋅∇v=uxvx+uyvy=ux(−uy)+uy(ux)=0\nabla u\cdot\nabla v = u_xv_x + u_yv_y = u_x(-u_y) + u_y(u_x) = 0. For u=x2−y2u = x^2 - y^2: ux=2x=vyu_x = 2x = v_y gives v=2xy+h(x)v = 2xy + h(x), and uy=−2y=−vx=−2y−h′(x)u_y = -2y = -v_x = -2y - h'(x) gives h′=0h' = 0: v=2xy+Cv = 2xy + C. Then ∇u=(2x,−2y)\nabla u = (2x, -2y), ∇v=(2y,2x)\nabla v = (2y, 2x), and ∇u⋅∇v=4xy−4xy=0\nabla u\cdot\nabla v = 4xy - 4xy = 0. ✓ (The level curves of uu and vv are two orthogonal families of hyperbolas.)

    stretchnew (ill-posedness of the backward heat equation)

    Solve the backward heat equation ut=−uxxu_t = -u_{xx} on [0,1][0, 1] with zero ends and u(x,0)=1nsin⁡nπxu(x, 0) = \frac1n\sin n\pi x. Compare the size of the initial data with the size of the solution at t=0.1t = 0.1 for n=10n = 10.

    Solution

    Separation of variables for ut=−uxxu_t = -u_{xx}: T′=+(nπ)2TT' = +(n\pi)^2T, so u(x,t)=1nen2π2tsin⁡nπxu(x, t) = \frac1ne^{n^2\pi^2t}\sin n\pi x. For n=10n = 10: the initial data has maximum 110=0.1\frac1{10} = 0.1, and at t=0.1t = 0.1 the solution has maximum 110e100π2⋅0.1=110e98.7≈7×1041\frac1{10}e^{100\pi^2\cdot0.1} = \frac1{10}e^{98.7} \approx 7\times10^{41}. A data error of size 0.10.1 becomes an error of size 104110^{41} in a tenth of a time unit, and larger nn is worse without limit: the solution does not depend continuously on the data, so the problem is ill-posed.

    Summary

    • A PDE relates the partial derivatives of an unknown function of several variables. For linear homogeneous equations the solutions form a vector space, which is usually infinite-dimensional because arbitrary functions appear.
    • First order, constant coefficients: afx+bfy=0af_x + bf_y = 0 has the general solution f=g(bx−ay)f = g(bx - ay): constant along the characteristic lines in the direction (a,b)(a, b), with an arbitrary profile gg. The method of characteristics follows the unknown along the curves x′=ax' = a, y′=by' = b, where the PDE becomes an ODE (ut+aux+cu=0u_t + au_x + cu = 0 gives e−ctu0(x−at)e^{-ct}u_0(x - at)).
    • Wave equation utt=c2uxxu_{tt} = c^2u_{xx} (Newton’s law for a string, c=T/ρc = \sqrt{T/\rho}): in the variables ξ=x+ct\xi = x + ct, η=x−ct\eta = x - ct it becomes vξη=0v_{\xi\eta} = 0. d’Alembert: u=12[F(x+ct)+F(x−ct)]+12c∫x−ctx+ctGu = \frac12[F(x + ct) + F(x - ct)] + \frac1{2c}\int_{x - ct}^{x + ct}G. A pulse splits into two half-height pulses; a fixed end reflects with a sign change.
    • Heat equation ut=αuxxu_t = \alpha u_{xx} (energy conservation plus Fourier’s law, α=k/(ρcp)\alpha = k/(\rho c_p)). Separation of variables u=X(x)T(t)u = X(x)T(t) gives the modes e−α(nπ/L)2tsin⁡nπxLe^{-\alpha(n\pi/L)^2t}\sin\frac{n\pi x}L; orthogonality of the sines gives the coefficients bn=2L∫fsin⁡nπxLb_n = \frac2L\int f\sin\frac{n\pi x}L; high modes die like n2n^2, so heat smooths and cannot be run backwards. Uniqueness by the energy method.
    • Laplace’s equation ∇2u=0\nabla^2u = 0 (steady state); in polar form Urr+1rUr+1r2Uθθ=0U_{rr} + \frac1rU_r + \frac1{r^2}U_{\theta\theta} = 0. Radial solutions: ln⁡r\ln r in the plane, 1/r1/r in space.
    • Mean value property: a harmonic function’s value at a point is its average over any circle around it (proof: the circle average has zero derivative). Maximum principle: no interior extremes unless constant; hence the Dirichlet problem has at most one solution.
    • Numerically, the explicit scheme for the heat equation needs α dt/dx2≤12\alpha\,dt/dx^2 \le \frac12.

    Watch and read

    The same ideas explained by someone else. Use these when an explanation here does not land.

    Where this sits

    Comes from
    2.9 Inner products, orthogonality, Gram–Schmidt, projection
    4.4 Connectedness and path-connectedness
    5.2 Directional derivatives, partial derivatives and the gradient
    5.4 The chain rule for fields
    5.5 Higher partial derivatives and the equality of mixed partials
    Leads to
    See the next unit
    Same idea elsewhere
    MATH 375: Homework 11 (Apostol 8.9 #18) asked for the exponent n that makes t^n e^(-r²/4t) satisfy the three-dimensional radial heat equation, which 5.2 worked. Apostol's own chapter 9.1 to 9.5, which the lectures did not reach, is covered here: the first-order equation with constant coefficients, d'Alembert's solution, and the exercises on Laplace's equation in polar coordinates.
    MATH 521: 521 proves that Fourier series converge for piecewise smooth functions (Dirichlet, 1829) and develops the theory of the Laplace equation (harmonic functions are analytic, Liouville's theorem, the Poisson integral). The separation of variables below is the heuristic those theorems justify.
    Physics: Every field in physics obeys one of these four equations or a relative: waves (sound, light, strings), heat and diffusion (temperature, concentration, probability), Laplace and Poisson (electrostatic and gravitational potentials), and Schrödinger's equation, which is a heat equation with an imaginary diffusivity.
    AI and image processing: Gaussian blurring of an image is the heat equation run for a time t = σ²/2. The forward noising process of a diffusion model, in its simplest form, convolves the data density with a Gaussian of growing variance, which is again a heat equation.