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′=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=0 is solved by g(x−2t) for any function g 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). 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) with g differentiable. What is 3fx+2fy?
By the chain rule fx=2g′ and fy=−3g′, so 3fx+2fy=6g′−6g′=0. This is Apostol's first example: f is constant on the lines 2x−3y=const, which are perpendicular to the gradient (2,−3)g′.Review: the chain rule
Quick checkFor a C2 function u(x,t), which of these is always true?
The equality of mixed partial derivatives (Schwarz's theorem) holds when the second partials are continuous. It is used below to change variables. The other two are not identities: they are the content of particular equations.Review: equality of mixed partials
Quick checkWhy are the functions sin(nπx) and sin(mπx) for n=m orthogonal on [0,1]?
Orthogonal means the inner product ⟨f,g⟩=∫01fgdx is zero (2.9). Different periods or integral zero are not enough: sin(πx) has integral π2=0 and is not orthogonal to the constant 1.Review: orthogonal
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: sinacosb=21[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=0 it says that the rate of change of u in the direction (2,1) of the (x,t) plane is zero: u is constant along every line x−2t=const, and what u 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=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 u 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)=s where L is a linear combination of u and its partial derivatives (with coefficients that may depend on the variables, but not on u) and homogeneous if s=0. Examples with u=u(x,y) or u(x,t): ux=0 (order 1), ut+2ux=0 (order 1), uxx+uyy=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 AApostol 9.1
Superposition for linear homogeneous equations
If L is a linear differential operator and L(u1)=L(u2)=0, then L(au1+bu2)=0 for all real a,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).
Derivatives are linear: (au1+bu2)x=au1x+bu2x, and likewise for every partial derivative.
So L(au1+bu2)=0.
Both terms are zero by hypothesis. This is the null space of the linear map L (2.3). ■
The null space can be infinite-dimensional: every function g(y) solves ux=0 (Apostol 9.1), because u may change with y but not with x. The functions y,y2,y3,… are infinitely many solutions that are linearly independent.
First-order equations: constant along characteristic lines
Theorem AApostol Thm 9.1 (9.2)
First-order equation with constant coefficients
Let a,b be constants, not both zero. A differentiable f on R2 satisfies afx+bfy=0 everywhere if and only if f(x,y)=g(bx−ay) for some differentiable g:R→R.
In one lineIf a,b are constants, not both 0, then f satisfies afx+bfy=0 if and only if f(x,y)=g(bx−ay) for some differentiable function g of one variable.
Why it is trueIt names every solution of the simplest PDE: constant on straight lines in the direction (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) and put ϕ(s)=f(x0+as,y0+bs). Then ϕ′(s)=afx+bfy=0.
dsdf(x0+as,y0+bs)=afx+bfy by the path theorem of 5.3.
So f is constant on the line through (x0,y0) with direction (a,b). This line is the curve bx−ay=bx0−ay0 (a characteristic).
A function with zero derivative on an interval is constant (mean value theorem, 1.4).
Define g(k)=f(p(k)) with p(k)=a2+b2k(b,−a). It is differentiable, as a composite of f with a linear map, and the line bx−ay=k passes through p(k).
Every point lies on exactly one such line. The point p(k) lies on the line bx−ay=k, because b⋅a2+b2kb−a⋅a2+b2−ka=k. So the lines are labelled by k, and p(k) is one chosen point on each.
Hence f(x,y)=g(bx−ay).
f is constant on the line, and bx−ay=k at the point (x,y) itself. So f(x,y)=f(p(k))=g(k) with k=bx−ay.
Every such f is a solution.
Conversely, chain rule: fx=bg′, fy=−ag′, so afx+bfy=abg′−abg′=0. ■
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 characteristic curve is a solution of the system dsdx=a(x,y), dsdy=b(x,y). Along it the field U(s)=u(x(s),y(s)) has U′(s)=uxx′+uyy′=aux+buy=f−cu. So the PDE becomes the ODE U′+cU=f for U(s). For constant a,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)) along which the PDE aux+buy+cu=f turns into an ordinary differential equation: x′=a, y′=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=0 with f(x,0)=sinx for all x.
Solution.
General solution. With a=4, b=3 the theorem gives f(x,y)=g(3x−4y). Characteristics are the lines 3x−4y=const with direction (4,3).
Use the condition. At y=0: f(x,0)=g(3x)=sinx for all x. Put s=3x: g(s)=sin3s. The condition determines g on the whole real line, since 3x takes every value.
Check.fx=cos(x−34y), fy=−34cos(x−34y), so 4fx+3fy=4cos−4cos=0 and f(x,0)=sinx. Always verify.
Answer.f(x,y)=sin(x−34y): the sine wave sinx at y=0 is carried along the direction (4,3).
Worked example Apostol 9.3 #3
(a) Show that u(x,y)=f(xy) satisfies xux−yuy=0, and find the solution with u(x,x)=x4ex2. (b) Show that v=f(x/y) satisfies xvx+yvy=0, and find the one with v(1,1)=2 and D1v(x,1/x)=1/x.
Solution.
(a) Verify.ux=yf′(xy) and uy=xf′(xy), so xux−yuy=xyf′−xyf′=0. Chain rule. The characteristics here solve x′=x, y′=−y, which are the hyperbolas xy=const, and u is constant on each.
(a) Solve. On the diagonal, u(x,x)=f(x2)=x4ex2. Put t=x2: f(t)=t2et for t≥0. So u(x,y)=(xy)2exy. The data on y=x determines f at all values t=x2≥0, which is the range of xy on the diagonal; the formula extends naturally.
(b) Verify.vx=f′(x/y)⋅y1, vy=−f′(x/y)⋅y2x, so xvx+yvy=yxf′−yxf′=0. Characteristics x′=x, y′=y are the rays through the origin, along which x/y is constant.
(b) Use D1v(x,1/x)=1/x.D1v(x,y)=f′(x/y)/y; at y=1/x this is xf′(x2)=x1, so f′(x2)=x21, i.e. f′(t)=t1 and f(t)=lnt+C for t>0. Put t=x2 and use x>0.
(b) Use v(1,1)=2.v(1,1)=f(1)=C=2. ln1=0.
Answer. (a) u=(xy)2exy. (b) v(x,y)=lnyx+2.
Worked example new (method of characteristics)
Solve the transport equation with decay, ut+2ux+u=0, u(x,0)=e−x2.
Solution.
Characteristics.dsdx=2, dsdt=1: the lines x=x0+2t (take s=t). Coefficients of ux and ut in the PDE.
The ODE along a characteristic. Put U(t)=u(x0+2t,t). Then U′=ux⋅2+ut=−u=−U, so U(t)=U(0)e−t. The PDE says ut+2ux=−u.
Use the data.U(0)=u(x0,0)=e−x02. At a point (x,t) the characteristic through it started at x0=x−2t. Label each line by where it crosses t=0.
Check.ut=−u+4(x−2t)u and 2ux=−4(x−2t)u, so ut+2ux+u=0. ✓
Answer.u(x,t)=e−te−(x−2t)2: the bump moves right at speed 2 while its height decays like e−t. The same recipe gives, for ut+aux+cu=0, the solution u(x,t)=e−ctu0(x−at).
Worked example Apostol 9.3 #8 and #9 (the converse of Euler's theorem)
Euler's theorem by characteristics: if f satisfies x⋅∇f(x)=pf(x) on R2∖{O}, show that f(sx)=spf(x) for s>0.
Solution.
The characteristics. The coefficients of fx,fy are x,y, so the characteristics solve x′=x, y′=y: the rays σ↦eσ(x0,y0). The field of directions (x,y) points radially outward.
The ODE along a ray.F(σ)=f(eσx0,eσy0) has F′(σ)=∇f⋅(eσx0,eσy0)=pF(σ) by the equation. So F(σ)=F(0)epσ. Path theorem of 5.3, then the equation x⋅∇f=pf at the point eσx0.
Translate. With s=eσ: f(sx0)=spf(x0). That is the definition of homogeneous of degree p.
Answer.f is homogeneous of degree p. Conversely, differentiating f(sx)=spf(x) in s at s=1 gives x⋅∇f=pf (Euler’s theorem). Example: f=x2+3xy has p=2 and xfx+yfy=2x2+3xy+3xy=2f. ✓
Quick checkWhich of these functions solves ut+3ux=0?
The general solution is g(x−3t), a profile moving right at speed 3. cos(x−3t) is of this form. ex+3t has ut+3ux=6u=0 (it moves left), and cosxcos3t is a standing wave, which solves utt=9uxx but not this first-order equation.
The wave equation
Definition A
Wave equation
The wave equation in one space variable is utt=c2uxx, where c>0 is a constant. In two or three space variables utt=c2∇2u. Apostol 9.4.
In one lineThe equation utt=c2uxx for the displacement u(x,t) of a vibrating string, with c 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 ρ per unit length is pulled with tension T (assumed constant). Let u(x,t) be the height at x. For a small piece between x and x+dx, the tension pulls up on the right end with vertical component Tsinθ(x+dx) and down on the left with Tsinθ(x), where θ is the angle of the string. For small displacements sinθ≈tanθ=ux, so the net force is T(ux(x+dx,t)−ux(x,t))≈Tuxxdx. The mass is ρdx and the acceleration utt, so Newton’s law gives ρuttdx=Tuxxdx. Hence utt=c2uxx with c=T/ρ: the wave speed grows with tension and falls with mass. A string of length 0.65 m and linear density 0.5 g/m tuned to the note E4, 329.63 Hz, has (from the formula c=2Lf derived below) c=2⋅0.65⋅329.63=428.5 m/s and tension T=ρc2=0.0005⋅428.52=91.8 N, about the weight of 9.4 kg.
Theorem AApostol Thm 9.2 (9.4); d'Alembert 1747
d'Alembert's solution of the wave equation
Let F∈C2(R) and G∈C1(R). Then u(x,t)=21[F(x+ct)+F(x−ct)]+2c1∫x−ctx+ctG(s)ds satisfies utt=c2uxx, u(x,0)=F(x), ut(x,0)=G(x). Conversely, if u is C2 on R2 and solves the wave equation with these initial data, then u is given by this formula.
In one lineIf F is twice differentiable and G is differentiable, then u(x,t)=21[F(x+ct)+F(x−ct)]+2c1∫x−ctx+ctG(s)ds solves utt=c2uxx with u(x,0)=F(x) and ut(x,0)=G(x); conversely every C2 solution on R2 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 c.
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, η=x−ct and u(x,t)=v(ξ,η).
Define v(ξ,η)=u(2ξ+η,2cξ−η), the same field in the new coordinates, which is C2 because the change of variables is linear.
ux=vξ+vη and ut=c(vξ−vη).
Chain rule (5.4): ξx=ηx=1, ξt=c, ηt=−c.
uxx=vξξ+2vξη+vηη and utt=c2(vξξ−2vξη+vηη).
Apply the chain rule again, using vξη=vηξ (5.5).
utt−c2uxx=−4c2vξη. So the wave equation holds if and only if vξη=0.
Subtract: the vξξ and vηη terms cancel.
Hence v(ξ,η)=φ(ξ)+ψ(η), that is u(x,t)=φ(x+ct)+ψ(x−ct).
∂η(vξ)=0 means vξ does not depend on η (mean value theorem in η for fixed ξ, on the whole plane): vξ=φ′(ξ). Then v−φ(ξ) has zero ξ-derivative, so depends on η only.
Solving the two linear equations: φ′=21F′+2c1G, ψ′=21F′−2c1G.
Initial data: u(x,0)=φ(x)+ψ(x)=F(x) and ut(x,0)=c(φ′(x)−ψ′(x))=G(x). Differentiate the first: φ′+ψ′=F′.
φ(x)=21F(x)+2c1∫0xG+C, ψ(x)=21F(x)−2c1∫0xG−C, which gives the formula.
Integrate from 0, with φ+ψ=F at 0 giving the constants (they cancel). Then u=φ(x+ct)+ψ(x−ct) and the two integrals combine: ∫0x+ctG−∫0x−ctG=∫x−ctx+ctG.
The formula is a solution.
Conversely, for the formula u=φ(x+ct)+ψ(x−ct) with φ,ψ∈C2 (which they are, by the hypotheses on F and G): utt=c2φ′′+c2ψ′′=c2uxx by the chain rule, and the initial conditions are checked as above. ■
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.
Put ξ=x+ct, η=x−ct, u(x,t)=v(ξ,η).
utt−c2uxx=−4c2vξη.
vξη=0, so v=φ(ξ)+ψ(η).
φ+ψ=F and c(φ′−ψ′)=G at t=0.
φ′=21F′+2c1G and ψ′=21F′−2c1G.
u=21[F(x+ct)+F(x−ct)]+2c1∫x−ctx+ctG.
Worked example new (compare Apostol 9.4, Example)
Wave speed 2, initial shape F(x)=e−x2, initially at rest (G=0). Describe the solution and find u(3,1.5).
Solution.
Formula. With G=0: u(x,t)=21[e−(x+2t)2+e−(x−2t)2]. d’Alembert with c=2.
Interpret. The first term is a bump of height 21 moving left at speed 2; the second is a bump of height 21 moving right at speed 2. F(x−ct) is F shifted right by ct.
Evaluate. At x=3, t=1.5: x−2t=0, x+2t=6. So u=21[e−36+1]≈0.5. The right-moving bump is exactly over x=3; the left-moving one is 6 units away and negligible.
Answer. Two bumps of half height run apart at speed 2; u(3,1.5)=21(1+e−36)≈0.5. Apostol’s own example is the same with the bump 1+cosπx on (−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=2, F=e−x2, G=0, what is u(3,1.5)?
Evaluate x+ct and x−ct.
u=21[e−(3+3)2+e−(3−3)2]=21[e−36+1]≈0.5.
Worked example new (the velocity term of d'Alembert's formula)
With F=0 and G(x)=cosx, find the solution of the wave equation and its value at x=0, t=π/6 for c=3.
Solution.
Formula.u=2c1∫x−ctx+ctcossds=2c1[sin(x+ct)−sin(x−ct)]. F=0, so only the integral term survives.
Simplify.sin(x+ct)−sin(x−ct)=2cosxsin(ct), so u=c1cosxsin(ct). Sum-to-product identity: sinA−sinB=2cos2A+Bsin2A−B.
Check.utt=−ccosxsin(ct) and c2uxx=c2⋅(−c1cosxsinct)=−ccosxsinct. ✓ And ut(x,0)=cosx=G. It solves the equation and the initial data.
Evaluate. For c=3, x=0, t=6π: u=31⋅1⋅sin2π=31. ct=2π.
Answer.u=c1cosxsin(ct); u(0,π/6)=31. This is a standing wave: the profile cosx stays in place and oscillates in time with angular frequency c (the factor sinct).
Your answerFor c=3, F=0, G=cosx, find u(0,π/6).
u=c1cosxsin(ct)=31⋅1⋅sin2π=31.
Beyond the course: for understanding· A finite string: reflections by an odd extension
For a string on [0,L] fixed at both ends, u(0,t)=u(L,t)=0, extend the initial shape F to an odd function of period 2L and use the same formula. Then u(0,t)=21[F(ct)+F(−ct)]=0 because F is odd, and u(L,t)=21[F(L+ct)+F(L−ct)]=21[F(−L+ct)+F(L−ct)]=21[−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/c, which gives the fundamental frequency f1=2Lc, and the standing waves sin(nπx/L) have frequencies fn=n2Lc: a note and its harmonics. For the E4 string above, c=2Lf1=428.5 m/s and the harmonics are 329.6, 659.3, 988.9 Hz, and so on.
Your answerA string of length 0.65 m has fundamental frequency 329.63 Hz. What is the wave speed c=2Lf1 in m/s? (Give a decimal.)
The pulse travels the string's length twice per period, so the period is 2L/c and f1=c/(2L); hence c=2⋅0.65⋅329.63≈428.5 m/s.
Quick checkA pulse travelling to the right along a string reaches a fixed end. What does the reflected pulse look like?
The solution is the odd extension, so the reflected pulse is the mirror image with the sign reversed, since the wall holds the string at height 0 and the incoming and outgoing pulses must cancel there. At a free end (no fixed height) the reflection would keep the sign.
The heat equation
Definition A
Heat equation
The heat equation (or diffusion equation) is ut=αuxx for a rod, ut=α(uxx+uyy) for a plate, and ut=α∇2u in general, with constant α>0. The first-order time derivative is the difference from the wave equation.
In one lineThe equation ut=αuxx (or ut=α∇2u in several space variables) for the temperature u of a conducting body, with α>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 A, density ρ, specific heat cp and conductivity k, with temperature u(x,t). The heat stored between x and x+dx is ρcpAudx. Fourier’s law (5.2) says heat flows from hot to cold at the rate q=−kux per unit area. In time dt the piece gains A(q(x)−q(x+dx))dt=Ak(ux(x+dx)−ux(x))dt≈Akuxxdxdt. Equating with the rise in stored heat, ρcpAutdxdt, gives ρcput=kuxx, that is ut=αuxx with α=ρcpk. For copper, k=400 W/(m K) (the value of 5.2), ρ=8960 kg/m3 and cp=385 J/(kg K) give α=8960⋅385400=1.16×10−4 m2/s. The time for heat to cross a length L is of order L2/α: for a 0.2 m rod, 0.04/(1.16×10−4)≈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)=4παt1e−x2/(4αt) solves ut=αuxx for t>0, and say what it describes.
Solution.
Logarithmic derivative in x.ux=−2αtxu. Chain rule on the exponent −x2/(4αt).
Second derivative.uxx=−2αt1u−2αtxux=(−2αt1+4α2t2x2)u. Product rule, then substitute ux.
Derivative in t.ut=(−2t1+4αt2x2)u. The prefactor t−1/2 gives −2t1, and the exponent −4αx2t−1 has t-derivative +4αt2x2.
Compare.αuxx=(−2t1+4αt2x2)u=ut. ✓
Answer. It is a solution. At each time it is a Gaussian (bell curve) with variance 2αt and total area 1: the temperature after a unit of heat is released at the single point x=0 at time 0. The width grows like t: diffusion spreads like the square root of time, not linearly. This is the one-dimensional cousin of the function t−3/2e−r2/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−4tsinx a solution of ut=4uxx? Of utt=4uxx?
Solution.
Differentiate in t.ut=−4e−4tsinx=−4u and utt=16e−4tsinx=16u. Treat x as a constant; only the factor e−4t depends on t.
Differentiate in x.ux=e−4tcosx and uxx=−e−4tsinx=−u. Treat t as a constant.
Heat equation.4uxx=−4u=ut. Both sides are the same function.
Wave equation.4uxx=−4u but utt=16u, and −4u=16u wherever u=0. One point where the two sides differ is enough to fail.
Answer. Yes for the heat equation (the shape sinx decays at rate 4), 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≤L with the ends held at temperature 0, u(0,t)=u(L,t)=0, try u=X(x)T(t). Then ut=XT′ and uxx=X′′T, so the equation is XT′=αX′′T. Dividing by αXT (where nonzero): αTT′=XX′′. The left side depends only on t and the right side only on x; two functions of different variables that are equal for all x,t are both equal to one constant, call it −κ. So X′′=−κX and T′=−ακT. The conditions X(0)=X(L)=0 force κ=(nπ/L)2 and X=sin(nπx/L), n=1,2,3,… (for κ≤0 the only solution of X′′=−κX with both ends zero is X=0; for κ>0 the solutions are Acos(κx)+Bsin(κx), which vanish at L only when κL is a multiple of π). Then T=e−α(nπ/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), 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 modesun(x,t)=e−α(nπ/L)2tsinLnπx are solutions with zero ends, and by superposition any sum ∑bnun is too. The decay rate grows like n2: the wiggly modes die first, which is why heat smooths. To match an initial temperature f we need ∑bnsin(nπx/L)=f(x) and that needs the coefficients.
Definition A
Fourier sine series
For a function f on [0,L], its Fourier sine series is ∑n≥1bnsinLnπx with bn=L2∫0Lf(x)sinLnπxdx. For piecewise smooth f the series converges to f at every point of continuity inside (0,L) (at the ends it converges to 0, the value of every sine, so it matches f there only if f(0)=f(L)=0), a theorem of Dirichlet and Fourier analysis (B, MATH 521). Here we prove the formula for bn when f is a finite sum of sines, and use it as the recipe for the infinite series.
In one lineThe expansion f(x)=∑n≥1bnsinLnπx on [0,L], with bn=L2∫0Lf(x)sinLnπxdx.
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 un, one for each whole number n. The starting temperature is given as some profile f(x), so we need numbers bn with f(x)=b1sinLπx+b2sinL2πx+⋯. This is the vector problem of 2.9 in disguise.
In R3, suppose e1,e2,e3 are perpendicular and v=c1e1+c2e2+c3e3. Take the dot product with e1: the other two terms drop out because they are perpendicular to e1, leaving v⋅e1=c1(e1⋅e1), so c1=e1⋅e1v⋅e1. Now let the “vectors” be functions on [0,L], with the inner product ⟨f,g⟩=∫0Lf(x)g(x)dx (the dot product of two functions: multiply value by value at every x and add up). The “axes” are the sines sn(x)=sinLnπx. The lemma below shows they are perpendicular, ⟨sn,sm⟩=0 for n=m, and that each has squared length ⟨sn,sn⟩=2L. The recipe is the same: bn=⟨sn,sn⟩⟨f,sn⟩=L2∫0Lfsndx.
Why sines and not cosines? The ends are held at 0, and every sn is 0 at x=0 and at x=L, so every sum of them also has zero ends. A cosine is not 0 at x=0. Equivalently: extend f to [−L,L] as an odd function, f(−x)=−f(x); odd functions are built from sines alone.
What is different from R3? There are infinitely many axes, so ”f 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>0 the factors e−α(nπ/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=0 the series may converge slowly, or to the wrong value at the ends (every sine is 0 there), which is why the example below tests it at an interior point.
So for n=m both integrals are 0, and for n=m the integral is 21(L−0)=2L.
For an integer k=0: ∫0LcosLkπxdx=kπLsin(kπ)=0. For k=0 the integral is L. If n=m both n−m and n+m are nonzero; if n=m only n+m is.
Hence bn=L2∫0LfsinLnπxdx.
Multiply f=∑mbmsinLmπx by sinLnπx and integrate: only m=n survives, giving bn2L. ■
Worked example new (separation of variables)
A rod of length 1 with diffusivity α=1 and ends at 0 starts at the temperature f(x)=sinπx+21sin3πx. Find u(x,t) and u(21,0.05).
Solution.
Identify the modes.f is already a combination of the modes n=1 and n=3 with b1=1, b3=21, all other bn=0. By orthogonality the coefficients are unique.
Let each mode decay.u(x,t)=e−π2tsinπx+21e−9π2tsin3πx. Mode n decays at the rate αn2π2/L2=n2π2.
Check. Each term has ut=−n2π2un=uxx, and u(0,t)=u(1,t)=0, u(x,0)=f. All three requirements.
Evaluate at x=21, t=0.05.sin2π=1 and sin23π=−1, so u=e−0.05π2−21e−0.45π2=0.6105−0.0059=0.6046. e−0.4935=0.6105 and e−4.441=0.01178.
Answer.u(x,t)=e−π2tsinπx+21e−9π2tsin3πx; u(21,0.05)≈0.6046. By t=0.05 the third mode has fallen to e−9π2⋅0.05=1.2% of its starting size and the first to 61%: only the smoothest part of the profile survives.
Your answerFor the rod above, what is u(21,0.05)? (Give a decimal.)
u=e−π2tsinπx+21e−9π2tsin3πx at x=21, t=0.05: e−0.05π2−21e−0.45π2≈0.6105−0.0059=0.6046.
Worked example new (the Fourier series of 2.9 in action)
Find the Fourier sine coefficients of f(x)=x(1−x) on [0,1] and write the solution of the heat equation with α=1.
Solution.
Coefficient formula.bn=2∫01x(1−x)sinnπxdx. L=1.
Integrate by parts twice. With p=x−x2 and k=nπ: ∫01psinkxdx=[−kpcoskx]01+k1∫01p′coskxdx=0+k21[p′sinkx]01−k21∫01p′′sinkxdx=k22∫01sinkxdx=k32(1−cosk), which is (nπ)32(1−(−1)n). The boundary terms vanish because p is 0 at both ends and sink=sin0=0; and p′′=−2.
Result.bn=(nπ)34(1−(−1)n): bn=n3π38 for odd n and 0 for even n. For example b1=π38=0.258, b3=0.00956. The profile is symmetric about 21, so even modes (antisymmetric) are absent.
The solution.u(x,t)=n odd∑n3π38e−n2π2tsinnπx.
Test at t=0, x=21.sin2nπ=(−1)(n−1)/2 for odd n, so ∑k(2k+1)3π38(−1)k=π38⋅32π3=41=f(21). ✓ Uses the known sum 1−271+1251−⋯=32π3. The partial sums show it happening: 0.2580 after one term, 0.2485 after two, 0.2505 after three, against f(21)=0.25.
Answer.bn=8/(nπ)3 for odd n. The coefficients fall like n−3 because the odd periodic extension of f is continuous with a continuous first derivative but its second derivative jumps (from −2 to +2) at the ends; each further derivative of smoothness gives another factor 1/n, which is why the series converges quickly.
Theorem Bthe energy method; Evans 2.3, Strauss 2.3
Uniqueness for the heat equation
Suppose u1,u2 are C2 in x and C1 in t on [0,L]×[0,T], both solve ut=αuxx, both have the same values at t=0 and the same values at x=0 and x=L for all t. Then u1=u2.
In one lineA C2 solution of ut=αuxx on [0,L]×[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−u2 and E(t)=∫0Lw(x,t)2dx≥0.
The equation is linear (superposition), so w=u1−u2 solves it, with w(x,0)=0 and w(0,t)=w(L,t)=0.
E′(t)=2∫0Lwwtdx=2α∫0Lwwxxdx.
Differentiate under the integral sign (the integrand is C1 on a compact rectangle, hence wt is uniformly continuous and the integral may be differentiated), then use the equation.
E′(t)=−2α∫0Lwx2dx≤0.
Integration by parts: ∫0Lwwxxdx=[wwx]0L−∫0Lwx2dx, and w=0 at x=0 and L kills the bracket.
Then ∫0Lw2dx=0 for all t; as w2 is continuous and non-negative, w≡0. ■
E(0)=0 since w(⋅,0)=0, E≥0 and E is non-increasing. So E≡0.
Quick checkWhy can the heat equation not be run backwards in time?
Running time backwards reverses the sign of every decay rate, so the wiggly modes, which are the ones damped fastest forward in time, are amplified fastest backward. A measurement error of size 10−6 in mode n=10 becomes huge in a fraction of a second. The problem is ill-posed: the answer does not depend continuously on the data.
Python labHeat equation by finite differences, and when it blows up
import numpy as npimport matplotlibmatplotlib.use("Agg")import matplotlib.pyplot as pltN = 50; dx = 1 / N # 50 intervals on a rod of length 1, diffusivity alpha = 1xs = np.linspace(0, 1, N + 1)f = lambda x: np.sin(np.pi * x) + 0.5 * np.sin(3 * np.pi * x) # initial temperaturedef 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 * dtprint(" 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] with fixed ends, u=X(x)T(t) gives c2TT′′=XX′′=−κ with the same X=sinLnπx, and T′′=−c2(Lnπ)2T, so T=AcosLnπct+BsinLnπct. The modes sinLnπxcosLnπct are the standing waves of the first picture: mode n vibrates at frequency nc/(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, where ∇2u=∑kuxkxk is the Laplacian, the sum of the pure second partial derivatives (the trace of the Hessian, 5.6). If ut=α∇2u and u does not depend on t, then ∇2u=0. Apostol 9.1 (equation 9.2).
In one lineThe equation ∇2u=uxx+uyy=0 (or uxx+uyy+uzz=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 Ω is a C2 function with ∇2u=0 throughout Ω. Examples in the plane: constants, x, y, xy, x2−y2, x3−3xy2, excosy, lnx2+y2 (away from the origin). Not harmonic: x2+y2 (its Laplacian is 4). In space, 1/x2+y2+z2 is harmonic away from the origin (the potential of a point charge or a point mass).
In one lineA C2 function u on an open set that satisfies ∇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 AApostol 9.5 #4
Polar form of the Laplacian
For u∈C2 and x=rcosθ, y=rsinθ, r>0: uxx+uyy=Urr+r1Ur+r21Uθθ.
In one lineIf U(r,θ)=u(rcosθ,rsinθ) with u of class C2, then for r>0: uxx+uyy=Urr+r1Ur+r21Uθθ.
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θ and Urr=uxxcos2θ+2uxysinθcosθ+uyysin2θ.
Differentiate Uθ again: the product rule on the factors −rsinθ, rcosθ gives −rcosθux−rsinθuy, and the chain rule on ux,uy gives the second-order terms (with uxy=uyx by 5.5).
Urr+r1Ur+r21Uθθ=uxx+uyy.
The first bracket is Ur, so Uθθ=−rUr+r2(…). Divide by r2 and add Urr and r1Ur: the Ur terms cancel, the uxy terms cancel, and cos2+sin2=1 multiplies uxx and uyy. ■
Worked example Apostol 9.5 #2 and #3
Find all radial harmonic functions u=g(r) in the plane away from the origin, and in R3.
Solution.
Plane. For u=g(r) the lemma gives ∇2u=g′′+r1g′=r1(rg′)′. U does not depend on θ, so Uθθ=0.
Solve.∇2u=0 means (rg′)′=0, so rg′=a and g=alnr+b. Integrate twice.
Space. In Rn the same computation gives ∇2g(r)=g′′+rn−1g′, which vanishes when rn−1g′ is constant: g=ar2−n+b for n≥3. For n=3, g=a/r+b. Check n=3 directly: g=r−1 has g′′=2r−3 and r2g′=−2r−3.
Answer.alnx2+y2+b in the plane; a/x2+y2+z2+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)+b).
Theorem BGauss; Evans 2.2.2; Strauss 6.3
Mean value property of harmonic functions
Let u be harmonic on an open set containing the closed disc Bˉ(a,R) of the plane. Then
u(a)=2π1∫02πu(a1+Rcosθ,a2+Rsinθ)dθ.
In one lineIf u is harmonic on an open set containing the closed disc of radius R about a, then u(a)=2π1∫02πu(a1+Rcosθ,a2+Rsinθ)dθ: 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)=2π1∫02πU(r,θ)dθ. Then M(0)=u(a) and we want M(R)=M(0).
Write U(r,θ)=u(a1+rcosθ,a2+rsinθ) for 0≤r≤R; it is C2 and 2π-periodic in θ. At r=0 it equals u(a) for every θ.
rM′(r)=2π1∫02πrUrdθ=:N(r).
Differentiate under the integral sign: Ur is continuous on the compact set [0,R]×[0,2π], hence uniformly continuous (4.3, 1.3), which lets the difference quotients converge uniformly.
N(r)→0 as r→0+.
∣N(r)∣≤rmax∣∇u∣, since ∣Ur∣=∣∇u⋅(cosθ,sinθ)∣≤∥∇u∥ (Cauchy–Schwarz).
N′(r)=2π1∫02πr(Urr+r1Ur)dθ.
Differentiate again under the integral: (rUr)r=rUrr+Ur=r(Urr+r1Ur).
N′(r)=−2πr1∫02πUθθdθ.
Laplace's equation in polar form (the lemma): Urr+r1Ur=−r21Uθθ.
So N′(r)=0 for 0<r≤R.
Fundamental theorem of calculus: ∫02πUθθdθ=Uθ(r,2π)−Uθ(r,0)=0 because Uθ is 2π-periodic.This is the step where the circle being closed matters: a derivative integrated around a closed loop gives zero.
N≡0, hence M is constant.
N is constant on (0,R] and tends to 0 at 0, so N≡0. Then M′(r)=N(r)/r=0 on (0,R], so M is constant on [0,R] (mean value theorem, continuity at 0), and M(R)=M(0)=u(a). ■
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.
At radius zero the circle is the single point a.
Differentiate under the integral sign; the radial derivative is bounded by the size of the gradient.
You must define the average M before differentiating it.
Differentiate N again; the product rule on r times U r gives r U r r plus U r.
This differentiates the formula for N from the previous line.
The polar form of the Laplacian says U r r plus U r over r equals minus U theta theta over r squared when u is harmonic.
You need the expression for N prime to substitute the equation into.
The fundamental theorem of calculus and periodicity in the angle: the circle closes up.
This uses the result of the previous line about what N prime is.
N is constant and tends to zero; then M has zero derivative, so M is constant.
This is the conclusion; it needs N prime equal to zero first.
Corollary BEvans 2.2.3; Strauss 6.1
Maximum principle for harmonic functions
Let Ω⊆R2 be open and connected and u harmonic on Ω. If u(p)≥u(x) for all x∈Ω for some p∈Ω, then u is constant on Ω. The same for a minimum.
In one lineIf u is harmonic on a connected open set Ω and has a maximum (or a minimum) at a point of Ω, then u 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.
A is a non-empty closed subset of Ω.
Let M=u(p) and A={x∈Ω:u(x)=M}. It is non-empty (it contains p) and closed in Ω, as the preimage of the closed set {M} under the continuous u.
u=M on every circle of radius r<ρ about x, so u=M on B(x,ρ) and B(x,ρ)⊆A: A is open.
Let x∈A and a ball B(x,ρ) inside Ω. For 0<r<ρ the mean value property gives M=u(x)=2π1∫02πu(x+r(cosθ,sinθ))dθ. The integrand is at most M, and an average of numbers at most M equals M only if all of them are M (continuity of the integrand).
A=Ω, that is u≡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, which is also harmonic. ■
Quick checkA bounded function u is harmonic on the open unit disc, with boundary values tending to 1 on the upper half of the boundary circle and to 0 on the lower half (except at the two points where the data jumps). Which statement does the maximum principle give?
A non-constant harmonic function cannot have an interior maximum or minimum, so its values inside lie strictly between the smallest and largest boundary values. At the centre the mean value property on circles of radius close to 1 gives a value close to the average of the boundary values, 21.
Your answerThe function u=x3−3xy2 is harmonic. What is its average value over the circle of radius 2 centred at (1,1)?
Use the mean value property instead of integrating.
By the mean value property the average equals the value at the centre: u(1,1)=1−3=−2.
Your answerRod of length 1, diffusivity 1, ends at 0: after how long does the first mode e−π2tsinπx fall to half its initial size? (Give a decimal.)
e−π2t=21 gives t=π2ln2≈0.0702. In physical units a rod of length L takes L2ln2/(απ2): for the 0.2 m copper rod, 0.04⋅0.693/(1.16×10−4⋅9.87)≈24 s.
Where it is used
Used inside maths· Inside maths: complex analysis, saddle points, and Fourier series
Harmonic functions and complex numbers. If f=u+iv is a differentiable function of z=x+iy (the complex analysis of MATH 521), then u and v satisfy the Cauchy–Riemann equations ux=vy and uy=−vx. Differentiating the first in x and the second in y and using the equality of mixed partials (5.5): uxx+uyy=vyx−vxy=0. So the real and imaginary parts of z2, namely x2−y2 and 2xy, and of z3, namely x3−3xy2 and 3x2y−y3, are harmonic; every conformal picture in the plane is a pair of harmonic functions. No interior extremes.∇2u is the trace of the Hessian (5.6), so at a critical point of a harmonic function the Hessian has trace 0 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 f 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.65 m, density 0.5 g/m and tension 91.8 N, the wave speed is c=T/ρ=428.5 m/s, the fundamental is f1=c/(2L)=329.6 Hz (the note E4) and the harmonics are 659.3 and 988.9 Hz. Plucking the string at a third of its length leaves out mode 3 (and every multiple of 3), because sin(nπx/L) is 0 at x=L/3 when n=3: the coefficients of a plucked string are computed with the sine formula above. Doubling the tension multiplies the pitch by 2, an interval of six semitones (a tritone).
A copper rod. From the heat equation, a rod of length 0.2 m with ends held at the ambient temperature and an initial half-sine profile of excess temperature loses half of that excess every 24 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: at t=60 s the standard deviation is 2⋅1.16×10−4⋅60=0.118 m.
Image blurring and diffusion models. The convolution of an image with a Gaussian of standard deviation σ pixels is the solution of the heat equation (with α=1) at time t=σ2/2: a blur with σ=3 pixels is 4.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 q in vacuum is V=4πε0rq, 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=0 has the general solution g(x−2t) for any differentiable g. Writing 'u=C' or ’u=ex−2t times a constant’ misses all other solutions. The function g is selected by the initial data, and the sign in x−2t matters: g(x+2t) moves the other way.
Watch out· Separation of variables finds special solutions only
A product 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 XT assumes it is nonzero: the constant −κ is a separation constant and must be the same on both sides. Check the boundary conditions before you pick the sign of κ.
Watch out· Count the conditions
Wave equation: two conditions in time (u and ut at t=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∈C2 to be a classical solution. For a plucked string with a corner, the formula still describes the motion but uxx 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≤21. 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.6 explodes.
Problems
check
Is e−9tsin3x a solution of ut=uxx? Of utt=9uxx?
Solution
ut=−9u and uxx=−9u, so ut=uxx: yes for the heat equation. For the wave equation, utt=81u while 9uxx=−81u: no.
checkApostol 9.2
Find the general solution of 5fx−2fy=0.
Solution
With a=5, b=−2: f(x,y)=g(bx−ay)=g(−2x−5y), which is the same family as h(2x+5y) for an arbitrary differentiable h. Check: fx=2h′, fy=5h′ for f=h(2x+5y), so 5fx−2fy=10h′−10h′=0.
checknew (compare Apostol 9.5 #2)
Which of x2+y2, x2−y2, xy, ln(x2+y2), exsiny are harmonic in the plane (away from the origin for the logarithm)?
How many initial conditions does each of the wave, heat and Laplace equations take, and why?
Solution
Wave: two (u and ut at t=0), since it is second order in time. Heat: one (u at t=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=0 with u(0,y)=y2.
Solution
General solution u=g(5x−3y) (here a=3, b=5). At x=0: g(−3y)=y2, so g(s)=9s2. Hence u(x,y)=9(5x−3y)2. Check: ux=910(5x−3y), uy=−96(5x−3y), so 3ux+5uy=930−30(5x−3y)=0.
usenew (a velocity impulse; d'Alembert with G nonzero)
For c=1, F=0 and G(x)=1 for ∣x∣<1, G(x)=0 otherwise (a string struck along an interval), find u(0,t) from d’Alembert’s formula.
Solution
u(0,t)=21∫−ttG(s)ds (with c=1, x=0). For 0≤t≤1 the interval [−t,t] lies inside (−1,1), so the integral is 2t and u(0,t)=t. For t≥1 the integral is 2 (the whole interval of G) and u(0,t)=1. So the midpoint rises linearly and then stays at height 1: the wave leaves behind a raised plateau. (The formula applies even though G is not continuous, as an integral.)
usecopper rod
A copper rod of length 0.2 m (α=1.16×10−4 m2/s) has ends held at the ambient temperature, and the excess temperature starts as sin(πx/L). After how many seconds does the excess at the centre fall to 10% of its start?
Solution
Mode 1 decays as e−απ2t/L2. Setting e−απ2t/L2=0.1: t=απ2L2ln10=1.16×10−4⋅9.86960.04⋅2.3026=0.00114490.092103=80.4 s.
useApostol 9.5 #3
Find all harmonic functions of the form g(r), r=∥x∥, in R4 away from the origin.
Solution
In Rn: ∇2g(r)=g′′+rn−1g′. For n=4 this is g′′+r3g′=r−3(r3g′)′, zero when r3g′=a, so g=−2r2a+b, that is g=αr−2+b. (This is r2−n for n=4.)
provenew (energy conservation of the string)
Show that a C2 solution of the wave equation on [0,L] with u(0,t)=u(L,t)=0 conserves the energy E(t)=21∫0L(ut2+c2ux2)dx.
Solution
Plan. Differentiate E, use the equation, and integrate by parts.
E′(t)=∫0L(ututt+c2uxuxt)dx (differentiating under the integral sign; the integrand is C1 on a compact set). With utt=c2uxx: E′=c2∫0L(utuxx+uxuxt)dx=c2∫0L∂x∂(utux)dx (product rule, using uxt=utx from 5.5) =c2[utux]x=0x=L. Since u(0,t)=0 for all t, ut(0,t)=0, and likewise at L, so the bracket is 0. Hence E′=0 and E is constant. ■ (21∫ut2 is kinetic and 2c2∫ux2 is potential energy; the string never loses energy in this model.)
provenew (orthogonality used for coefficients)
Prove that ∫0LsinLnπxsinLmπxdx=0 for integers n=m, both positive, and compute the value for n=m.
Solution
Plan. Product-to-sum, then integrate.
sinAsinB=21[cos(A−B)−cos(A+B)], so the integral is 21∫0L[cosL(n−m)πx−cosL(n+m)πx]dx. For a nonzero integer k, ∫0LcosLkπxdx=kπLsinkπ=0. When n=m both n−m and n+m are nonzero integers, so the integral is 0. When n=m the first cosine is cos0=1 with integral L and the second integrates to 0: the value is 2L. ■
provenew (uniqueness of the Dirichlet problem)
Let Ω be a bounded connected open set of the plane, and u1,u2 functions that are continuous on Ωˉ and harmonic in Ω and agree on the boundary ∂Ω. Prove u1=u2.
Solution
Plan. The difference is harmonic and zero on the boundary; apply the maximum principle on a compact set.
Put w=u1−u2, harmonic in Ω (linearity), continuous on the compact set Ωˉ (closed and bounded), and w=0 on ∂Ω. By the extreme value theorem (4.3) w has a maximum at some point of Ωˉ. If it is in Ω, then by the maximum principle w is constant on Ω, hence (by continuity) equal to its boundary value 0 on Ωˉ. Otherwise it is on ∂Ω, where w=0, so w≤0 everywhere. The same argument for −w gives w≥0. So w≡0. ■
stretchnew (Cauchy–Riemann and harmonic functions)
Let u and v be C2 with ux=vy and uy=−vx. Prove that u and v are harmonic, and that ∇u⊥∇v. Find v when u=x2−y2, and verify the perpendicularity.
Solution
Differentiate: uxx=vyx and uyy=−vxy, so uxx+uyy=vyx−vxy=0 by equality of mixed partials (5.5). Likewise vxx=−uyx and vyy=uxy, so vxx+vyy=0. And ∇u⋅∇v=uxvx+uyvy=ux(−uy)+uy(ux)=0. For u=x2−y2: ux=2x=vy gives v=2xy+h(x), and uy=−2y=−vx=−2y−h′(x) gives h′=0: v=2xy+C. Then ∇u=(2x,−2y), ∇v=(2y,2x), and ∇u⋅∇v=4xy−4xy=0. ✓ (The level curves of u and v are two orthogonal families of hyperbolas.)
stretchnew (ill-posedness of the backward heat equation)
Solve the backward heat equation ut=−uxx on [0,1] with zero ends and u(x,0)=n1sinnπx. Compare the size of the initial data with the size of the solution at t=0.1 for n=10.
Solution
Separation of variables for ut=−uxx: T′=+(nπ)2T, so u(x,t)=n1en2π2tsinnπx. For n=10: the initial data has maximum 101=0.1, and at t=0.1 the solution has maximum 101e100π2⋅0.1=101e98.7≈7×1041. A data error of size 0.1 becomes an error of size 1041 in a tenth of a time unit, and larger n 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=0 has the general solution f=g(bx−ay): constant along the characteristic lines in the direction (a,b), with an arbitrary profile g. The method of characteristics follows the unknown along the curves x′=a, y′=b, where the PDE becomes an ODE (ut+aux+cu=0 gives e−ctu0(x−at)).
Wave equationutt=c2uxx (Newton’s law for a string, c=T/ρ): in the variables ξ=x+ct, η=x−ct it becomes vξη=0. d’Alembert:u=21[F(x+ct)+F(x−ct)]+2c1∫x−ctx+ctG. A pulse splits into two half-height pulses; a fixed end reflects with a sign change.
Heat equationut=αuxx (energy conservation plus Fourier’s law, α=k/(ρcp)). Separation of variablesu=X(x)T(t) gives the modes e−α(nπ/L)2tsinLnπx; orthogonality of the sines gives the coefficients bn=L2∫fsinLnπx; high modes die like n2, so heat smooths and cannot be run backwards. Uniqueness by the energy method.
Laplace’s equation∇2u=0 (steady state); in polar form Urr+r1Ur+r21Uθθ=0. Radial solutions: lnr in the plane, 1/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≤21.
Watch and read
The same ideas explained by someone else. Use these when an explanation here does not land.
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.