Differential EquationsPartial Differential Equations2 of 6
Partial Differential Equations · 2

The Heat Equation

We want to find how the temperature u(x,t)\temp{u(x, t)} along a heated rod changes over time, which means separating space x\spacepart{x} and time t\timepart{t} in the Heat Equation.

1

Separating Space and Time in the Heat Equation

Suppose a metal rod of length LL has insulated sides, starts with a temperature profile u(x,0)=f(x)\temp{u(x, 0)} = \temp{f(x)}, and has both ends held in 0∘0^\circ ice water for all t≥0t \ge 0. We want to find functions u(x,t)\temp{u(x, t)} that satisfy both the Heat Equation and these 0∘0^\circ boundary conditions:

∂u∂t\displaystyle \rate{\frac{\partial u}{\partial t}} =k∂2u∂x2,u(0,t)\displaystyle = k \curv{\frac{\partial^2 u}{\partial x^2}}, \qquad \temp{u(0, t)} =0,u(L,t)\displaystyle = 0, \quad \temp{u(L, t)} =0\displaystyle = 0
∂2u∂x2<0\htmlClass{lc-orange}{\dfrac{\partial^2 u}{\partial x^2}} < 0
∂u∂t<0\htmlClass{lc-pink}{\dfrac{\partial u}{\partial t}} < 0
∂u∂t>0\htmlClass{lc-pink}{\dfrac{\partial u}{\partial t}} > 0
∂2u∂x2>0\htmlClass{lc-orange}{\dfrac{\partial^2 u}{\partial x^2}} > 0
u(x,0)=f(x)\htmlClass{lc-blue}{u(x, 0)} = \htmlClass{lc-blue}{f(x)}
0∘0^\circ
0∘0^\circ
0\htmlClass{lc-mute}{0}
L\htmlClass{lc-mute}{L}
insulated sides\htmlClass{lc-mute}{\text{insulated sides}}

Instead of looking for every possible solution at once, we look first for a spatial shape that cools in place without changing its shape, written as a space function times a time function.

Separating Space and Time in the Heat Equation
∂u∂t=k ∂2u∂x2u(x,t)=  ?\begin{aligned}\htmlClass{lc-pink}{\dfrac{\partial u}{\partial t}} &= k\,\htmlClass{lc-orange}{\dfrac{\partial^2 u}{\partial x^2}}\\[2pt] \htmlClass{lc-blue}{u(x, t)} &= \;?\end{aligned}
f(x)\htmlClass{lc-blue}{f(x)}
0∘0^\circ
0∘0^\circ
0\htmlClass{lc-mute}{0}
L\htmlClass{lc-mute}{L}
Text solution
Product guess and substituteWrite the temperature as a spatial shape X(x)\spacepart{X(x)} times a time factor T(t)\timepart{T(t)}, and plug the partial derivatives into ∂u∂t=k∂2u∂x2\rate{\frac{\partial u}{\partial t}} = k \curv{\frac{\partial^2 u}{\partial x^2}}.
u(x,t)=X(x)⏟spatial shape⋅T(t)⏟time factor  ⟹  X(x)T′(t)=kX′′(x)T(t)\displaystyle \begin{aligned} \temp{u(x, t)} &= \underbrace{\spacepart{X(x)}}_{\spacepart{\text{spatial shape}}} \cdot \underbrace{\timepart{T(t)}}_{\timepart{\text{time factor}}} \\ \implies \spacepart{X(x)}\rate{T'(t)} &= k \curv{X''(x)}\timepart{T(t)} \end{aligned}
Divide by kX(x)T(t)k \spacepart{X(x)}\timepart{T(t)} to separate variablesPut all t\timepart{t} terms on the left and all x\spacepart{x} terms on the right, so both sides must equal the same constant.
T′(t)kT(t)\displaystyle \frac{\rate{T'(t)}}{k \timepart{T(t)}} =X′′(x)X(x)\displaystyle = \frac{\curv{X''(x)}}{\spacepart{X(x)}} =−λ2⏟separation constant\displaystyle = \underbrace{-\lambda^2}_{\text{separation constant}}
Split into two ODEsRewrite the separated equation as an ordinary differential equation in space (with the 0∘0^\circ endpoints) and an ordinary differential equation in time.
Space equation:X′′(x)=−λ2X(x),X(0)=0,X(L)=0Time equation:T′(t)=−kλ2T(t)\displaystyle \begin{aligned} \text{Space equation:} & \\ \curv{X''(x)} &= -\lambda^2 \spacepart{X(x)}, \\ \spacepart{X(0)} &= 0, \quad \spacepart{X(L)} = 0 \\[8pt] \text{Time equation:} & \\ \rate{T'(t)} &= -k\lambda^2 \timepart{T(t)} \end{aligned}

So the single partial differential equation splits into two ordinary differential equations that we can solve one variable at a time.

In the curve below, the sign of the ratio X′′(x)X(x)\frac{\curv{X''(x)}}{\spacepart{X(x)}} tells us whether a spatial shape leaving 0∘0^\circ at x=0x = 0 bends away from the rod, stays flat, or arches back down to hit 0∘0^\circ at x=Lx = L.

To arch up from zero at the left end and come back down to zero at the right end, the curve has to bend back toward the rod, making its curvature ratio negative.
2

Normal Modes and Sine-Wave Starting Temperatures

Now we want to solve the Space Equation and Time Equation to find the basic building-block solutions un(x,t)\temp{u_n(x, t)}, and use them to find u(x,t)\temp{u(x, t)} when the starting temperature u(x,0)\temp{u(x, 0)} is already made of sine waves:

u(x,0)=50sin⁡(3x)andu(x,0)=50sin⁡(3x)−12sin⁡(5x)(L=π, k=1)\displaystyle \begin{aligned} \temp{u(x, 0)} &= 50\spacepart{\sin(3x)} \qquad \text{and} \\ \temp{u(x, 0)} &= 50\spacepart{\sin(3x)} - 12\spacepart{\sin(5x)} \\ &\qquad (L = \pi, \ k = 1) \end{aligned}

Remember that X′′(x)=−λ2X(x)\curv{X''(x)} = -\lambda^2 \spacepart{X(x)} has sine and cosine solutions, while T′(t)=−rT(t)\rate{T'(t)} = -r \timepart{T(t)} has exponential solutions.

Normal Modes and Sine-Wave Starting Temperatures
X′′(x)=−λ2 X(x)X(0)=0,X(L)=0T′(t)=−kλ2 T(t)\begin{aligned}\htmlClass{lc-orange}{X''(x)} &= -\lambda^2\,\htmlClass{lc-blue}{X(x)}\\ \htmlClass{lc-blue}{X(0)} &= 0,\quad \htmlClass{lc-blue}{X(L)} = 0\\[6pt] \htmlClass{lc-pink}{T'(t)} &= -k\lambda^2\,\htmlClass{lc-violet}{T(t)}\end{aligned}
X(x)=  ?\htmlClass{lc-blue}{X(x)} = \;?
0∘0^\circ
0∘0^\circ
0\htmlClass{lc-mute}{0}
L\htmlClass{lc-mute}{L}
Text solution
Apply the 0∘0^\circ ends to the space equationPlug x=0x = 0 and x=Lx = L into X(x)=Acos⁡(λx)+Bsin⁡(λx)\spacepart{X(x)} = \costerm{A\cos(\lambda x)} + \spacepart{B\sin(\lambda x)} to find which sine waves fit the rod.
X(0)=A=0  ⟹  X(x)=Bsin⁡(λx)X(L)=Bsin⁡(λL)=0  ⟹  λ=nπL,Xn(x)=sin⁡(nπxL)(n=1,2,3,… )\displaystyle \begin{aligned} \spacepart{X(0)} &= \costerm{A} = 0 \\ \implies \spacepart{X(x)} &= \spacepart{B\sin(\lambda x)} \\[8pt] \spacepart{X(L)} &= \spacepart{B\sin(\lambda L)} = 0 \\ \implies \lambda &= \frac{n\pi}{L}, \\ \spacepart{X_n(x)} &= \spacepart{\sin\left(\frac{n\pi x}{L}\right)} \\ &\qquad (n = 1, 2, 3, \dots) \end{aligned}
Solve the time equation and multiplySubstitute λ=nπL\lambda = \frac{n\pi}{L} into T′(t)=−kλ2T(t)\rate{T'(t)} = -k\lambda^2 \timepart{T(t)} and multiply Xn(x)Tn(t)\spacepart{X_n(x)}\timepart{T_n(t)} to form each normal mode.
Tn(t)=e−k(nπ/L)2t  ⟹  un(x,t)=Bnsin⁡(nπxL)e−k(nπ/L)2t⏟normal mode (n=1,2,3,… )\displaystyle \begin{aligned} \timepart{T_n(t)} &= \timepart{e^{-k(n\pi/L)^2 t}} \\ \implies \temp{u_n(x, t)} &= \underbrace{B_n \spacepart{\sin\left(\frac{n\pi x}{L}\right)} \timepart{e^{-k(n\pi/L)^2 t}}}_{\text{normal mode } (n = 1, 2, 3, \dots)} \end{aligned}
Match sine-wave starting temperatures at t=0t = 0With L=πL = \pi and k=1k = 1, each mode has e0=1\timepart{e^0} = 1 at t=0t = 0, so we read the coefficients straight from the starting temperature and attach each mode's exponential decay e−n2t\timepart{e^{-n^2 t}}.
u(x,0)=50sin⁡(3x)  ⟹  u(x,t)=50sin⁡(3x)e−9tu(x,0)=50sin⁡(3x)−12sin⁡(5x)  ⟹  u(x,t)=50sin⁡(3x)e−9t−12sin⁡(5x)e−25t\displaystyle \begin{aligned} \temp{u(x, 0)} &= 50\spacepart{\sin(3x)} \\ \implies \temp{u(x, t)} &= 50\spacepart{\sin(3x)}\timepart{e^{-9t}} \\[6pt] \temp{u(x, 0)} &= 50\spacepart{\sin(3x)} \\ &\quad - 12\spacepart{\sin(5x)} \\ \implies \temp{u(x, t)} &= 50\spacepart{\sin(3x)}\timepart{e^{-9t}} \\ &\quad - 12\spacepart{\sin(5x)}\timepart{e^{-25t}} \end{aligned}

So each standing sine wave along the rod keeps its spatial shape and decays exponentially at a rate proportional to n2n^2.

As more half-waves (n=1,2,3,…n = 1, 2, 3, \dots) fit between the two 0∘0^\circ ends below, the peaks and valleys crowd closer together and curve more sharply, sending heat straight into neighboring valleys so the wave flattens n2n^2 times faster.

Packing more half-waves between the zero-degree ends puts hot peaks right next to cold valleys, so the wave flattens toward zero much faster, with cooling speed growing as the square of the number of half-waves.
3

Fourier Sine Series for a Flat Starting Temperature

A single mode or a couple of modes works when u(x,0)\temp{u(x, 0)} is already built from sine waves, but what if the rod starts at a flat, even temperature across its whole length? We now want to find u(x,t)\temp{u(x, t)} for a rod of length LL with 0∘0^\circ ends when

u(x,0)\displaystyle \temp{u(x, 0)} =100(0<x<L)\displaystyle = \temp{100} \qquad (0 < x < L)

To match a starting profile f(x)\temp{f(x)} that isn't made of sine waves, we add all the normal modes together into an infinite series and use an integral to find how much of each sine wave we need.

Fourier Sine Series for a Flat Starting Temperature
un(x,t)=Bn sin⁡(nπxL) e−k(nπ/L)2tBn=  ?\begin{aligned}\htmlClass{lc-blue}{u_n(x, t)} &= B_n\,\htmlClass{lc-blue}{\sin\left(\dfrac{n\pi x}{L}\right)}\,\htmlClass{lc-violet}{e^{-k(n\pi/L)^2 t}}\\[2pt] B_n &= \;?\end{aligned}
100∘\htmlClass{lc-blue}{100^\circ}
0∘0^\circ
0∘0^\circ
0\htmlClass{lc-mute}{0}
L\htmlClass{lc-mute}{L}
Text solution
Sum all modes and set t=0t = 0By superposition, add all normal modes together and plug in t=0t = 0 so the starting profile f(x)\temp{f(x)} is written as a Fourier sine series.
u(x,t)=∑n=1∞Bnsin⁡(nπxL)e−k(nπ/L)2t→t=0f(x)=∑n=1∞Bnsin⁡(nπxL)\displaystyle \begin{aligned} \temp{u(x, t)} &= \sum_{n=1}^{\infty} B_n \spacepart{\sin\left(\frac{n\pi x}{L}\right)} \timepart{e^{-k(n\pi/L)^2 t}} \\ \xrightarrow{t = 0} \quad \temp{f(x)} &= \sum_{n=1}^{\infty} B_n \spacepart{\sin\left(\frac{n\pi x}{L}\right)} \end{aligned}
Integrate to find the Fourier sine coefficients BnB_nSubstitute f(x)=100\temp{f(x)} = \temp{100} into the formula for BnB_n and evaluate at x=Lx = L and x=0x = 0.
Bn=2L∫0Lf(x)sin⁡(nπxL)dx⏟Fourier sine coefficient=2L∫0L100sin⁡(nπxL)dx=200L[−Lnπcos⁡(nπxL)]0L=200nπ(1−cos⁡(nπ))\displaystyle \begin{aligned} B_n &= \underbrace{\frac{2}{L}\int_0^L \temp{f(x)}\sin\left(\frac{n\pi x}{L}\right)dx}_{\text{Fourier sine coefficient}} \\ &= \frac{2}{L}\int_0^L \temp{100}\sin\left(\frac{n\pi x}{L}\right)dx \\ &= \frac{200}{L}\left[-\frac{L}{n\pi}\cos\left(\frac{n\pi x}{L}\right)\right]_0^L \\ &= \frac{200}{n\pi}\big(1 - \cos(n\pi)\big) \end{aligned}
Separate even and odd nn and write the seriesSince cos⁡(nπ)=1\cos(n\pi) = 1 for even nn and cos⁡(nπ)=−1\cos(n\pi) = -1 for odd nn, only the odd modes remain.
Bn={0if n is even400nπif n is oddu(x,t)=400πsin⁡(πxL)e−k(π/L)2t+4003πsin⁡(3πxL)e−9k(π/L)2t+4005πsin⁡(5πxL)e−25k(π/L)2t+…\displaystyle \begin{aligned} B_n &= \begin{cases} 0 & \text{if } n \text{ is even} \\ \dfrac{400}{n\pi} & \text{if } n \text{ is odd} \end{cases} \\ \temp{u(x, t)} &= \frac{400}{\pi}\spacepart{\sin\left(\frac{\pi x}{L}\right)}\timepart{e^{-k(\pi/L)^2 t}} \\ &\quad + \frac{400}{3\pi}\spacepart{\sin\left(\frac{3\pi x}{L}\right)}\timepart{e^{-9k(\pi/L)^2 t}} \\ &\quad + \frac{400}{5\pi}\spacepart{\sin\left(\frac{5\pi x}{L}\right)}\timepart{e^{-25k(\pi/L)^2 t}} + \dots \end{aligned}

So the flat 100∘\temp{100^\circ} starting temperature is built entirely from odd sine waves, each decaying at its own rate.

100∘\htmlClass{lc-blue}{100^\circ}
n=1 ⁣: sin⁡(πxL)n = 1\!:\ \htmlClass{lc-blue}{\sin\left(\tfrac{\pi x}{L}\right)}
++
0\htmlClass{lc-mute}{0}
L\htmlClass{lc-mute}{L}
B1=400πB_1 = \dfrac{400}{\pi}
100∘\htmlClass{lc-blue}{100^\circ}
n=2 ⁣: sin⁡(2πxL)n = 2\!:\ \htmlClass{lc-blue}{\sin\left(\tfrac{2\pi x}{L}\right)}
++
−-
0\htmlClass{lc-mute}{0}
L\htmlClass{lc-mute}{L}
B2=0B_2 = 0

In the cooling profile below, the odd sine modes add up to form the flat 100∘\temp{100^\circ} top at t=0t = 0. As the rod cools, the high-nn ripples die out first and round off the corners, leaving the temperature curve right on the single n=1n = 1 sine arch long before the rod reaches 0∘0^\circ.

As the hot rod cools, its higher odd sine waves fade out so fast that the temperature curve soon matches the single wide first arch.
4

Long-Time Cooling and the First-Mode Approximation

Now suppose we take our evenly heated 100∘\temp{100^\circ} rod with L=πL = \pi and k=1k = 1, and we want to find the time tt when the center of the rod, x=π2x = \frac{\pi}{2}, cools down to 10∘\temp{10^\circ}:

u(π2,t)\displaystyle \temp{u}\left(\frac{\pi}{2}, t\right) =10\displaystyle = \temp{10}

Plugging x=π2x = \frac{\pi}{2} into the infinite series gives an equation with infinitely many different exponentials, which we cannot solve for tt with algebra alone.

Long-Time Cooling and the First-Mode Approximation
L=π,k=1u(π2,t)=10t=  ?\begin{aligned}L &= \pi,\quad k = 1\\ \htmlClass{lc-blue}{u}\left(\dfrac{\pi}{2}, t\right) &= \htmlClass{lc-blue}{10}\\ t &= \;?\end{aligned}
100∘\htmlClass{lc-blue}{100^\circ}
10∘\htmlClass{lc-blue}{10^\circ}
0∘0^\circ
0∘0^\circ
0\htmlClass{lc-mute}{0}
π\htmlClass{lc-mute}{\pi}
π2\htmlClass{lc-mute}{\dfrac{\pi}{2}}
Text solution
Evaluate the series at the center x=π2x = \frac{\pi}{2}Substitute L=πL = \pi, k=1k = 1, and x=π2x = \frac{\pi}{2} into the flat-rod series and set the temperature equal to 10\temp{10}.
10=400πsin⁡(π2)e−t+4003πsin⁡(3π2)e−9t+4005πsin⁡(5π2)e−25t+…=400πe−t−4003πe−9t+4005πe−25t−…\displaystyle \begin{aligned} \temp{10} &= \frac{400}{\pi}\spacepart{\sin\left(\frac{\pi}{2}\right)}\timepart{e^{-t}} \\ &\quad + \frac{400}{3\pi}\spacepart{\sin\left(\frac{3\pi}{2}\right)}\timepart{e^{-9t}} \\ &\quad + \frac{400}{5\pi}\spacepart{\sin\left(\frac{5\pi}{2}\right)}\timepart{e^{-25t}} + \dots \\ &= \frac{400}{\pi}\timepart{e^{-t}} - \frac{400}{3\pi}\timepart{e^{-9t}} \\ &\quad + \frac{400}{5\pi}\timepart{e^{-25t}} - \dots \end{aligned}
Drop the higher modes and solve for ttBecause e−9t=(e−t)9\timepart{e^{-9t}} = (\timepart{e^{-t}})^9 and e−25t=(e−t)25\timepart{e^{-25t}} = (\timepart{e^{-t}})^{25} are tiny by the time the center cools to 10∘\temp{10^\circ}, keep only the n=1n = 1 term and solve for tt.
10≈400πe−te−t≈π40t≈ln⁡(40π) seconds\displaystyle \begin{aligned} \temp{10} &\approx \frac{400}{\pi}\timepart{e^{-t}} \\ \timepart{e^{-t}} &\approx \frac{\pi}{40} \\ t &\approx \ln\left(\frac{40}{\pi}\right)\text{ seconds} \end{aligned}

So the center of the rod reaches 10∘\temp{10^\circ} at t≈ln⁡(40π) secondst \approx \ln\left(\frac{40}{\pi}\right)\text{ seconds}, with the higher modes adding less than a hundred-millionth of a degree by that time.

5

Separating New PDEs and Spotting When It Fails

What if the physics of the rod changes, giving a modified partial differential equation? We want to test the product guess u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} on three new equations to see how the two ODEs change, and to see when separation of variables fails:

ut\displaystyle \rate{u_t} =kuxx−cu,ut\displaystyle = k\curv{u_{xx}} - \leak{cu}, \qquad \rate{u_t} =x2uxx,ut\displaystyle = \spacepart{x^2} \curv{u_{xx}}, \qquad \rate{u_t} =(x+t)uxx\displaystyle = (\spacepart{x} + \timepart{t})\curv{u_{xx}}

Here ut\rate{u_t} and uxx\curv{u_{xx}} are shorthand for the partial derivatives ∂u∂t\rate{\frac{\partial u}{\partial t}} and ∂2u∂x2\curv{\frac{\partial^2 u}{\partial x^2}}.

Separating New PDEs and Spotting When It Fails
u(x,t)\displaystyle \temp{u(x, t)} =X(x) T(t)\displaystyle = \spacepart{X(x)}\,\timepart{T(t)}
ut=k uxx−cu?ut=x2 uxx?ut=(x+t) uxx?\displaystyle \begin{aligned}\rate{u_t} &= k\,\curv{u_{xx}} - \leak{cu} && ?\\ \rate{u_t} &= \spacepart{x^2}\,\curv{u_{xx}} && ?\\ \rate{u_t} &= (\spacepart{x} + \timepart{t})\,\curv{u_{xx}} && ?\end{aligned}
Text solution
Heat loss through the sides (ut=kuxx−cu\rate{u_t} = k\curv{u_{xx}} - \leak{cu})Substitute u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)}, divide by kX(x)T(t)k \spacepart{X(x)}\timepart{T(t)}, and move the constant ck\frac{\leak{c}}{k} to the time side so the spatial sine modes stay the same while the time decay picks up −ct-\leak{c}t.
X(x)T′(t)=kX′′(x)T(t)−cX(x)T(t)T′(t)kT(t)+ck=X′′(x)X(x)=−λ2  ⟹  Xn(x)=sin⁡(nπxL),Tn(t)=e−(k(nπ/L)2+c)t\displaystyle \begin{aligned} \spacepart{X(x)}\rate{T'(t)} &= k \curv{X''(x)}\timepart{T(t)} \\ &\quad - \leak{c} \spacepart{X(x)}\timepart{T(t)} \\ \frac{\rate{T'(t)}}{k \timepart{T(t)}} + \frac{\leak{c}}{k} &= \frac{\curv{X''(x)}}{\spacepart{X(x)}} = -\lambda^2 \\ \implies \spacepart{X_n(x)} &= \spacepart{\sin\left(\frac{n\pi x}{L}\right)}, \\ \timepart{T_n(t)} &= \timepart{e^{-(k(n\pi/L)^2 + \leak{c})t}} \end{aligned}
Position-dependent multiplier (ut=x2uxx\rate{u_t} = \spacepart{x^2} \curv{u_{xx}})Substitute u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} and divide by X(x)T(t)\spacepart{X(x)}\timepart{T(t)}, keeping x2\spacepart{x^2} on the right with the x\spacepart{x} terms to form two ODEs.
X(x)T′(t)=x2X′′(x)T(t)T′(t)T(t)=x2X′′(x)X(x)=−λ2  ⟹  T′(t)=−λ2T(t),x2X′′(x)+λ2X(x)=0\displaystyle \begin{aligned} \spacepart{X(x)}\rate{T'(t)} &= \spacepart{x^2} \curv{X''(x)}\timepart{T(t)} \\ \frac{\rate{T'(t)}}{\timepart{T(t)}} &= \frac{\spacepart{x^2} \curv{X''(x)}}{\spacepart{X(x)}} \\ &= -\lambda^2 \\ \implies \rate{T'(t)} &= -\lambda^2 \timepart{T(t)}, \\ \spacepart{x^2} \curv{X''(x)} + \lambda^2 \spacepart{X(x)} &= 0 \end{aligned}
Sum of x\spacepart{x} and t\timepart{t} (ut=(x+t)uxx\rate{u_t} = (\spacepart{x} + \timepart{t})\curv{u_{xx}})Substitute u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} and divide by X(x)T(t)\spacepart{X(x)}\timepart{T(t)}; neither dividing by (x+t)(\spacepart{x} + \timepart{t}) nor multiplying it out can put t\timepart{t} alone on the left and x\spacepart{x} alone on the right.
T′(t)T(t)\displaystyle \frac{\rate{T'(t)}}{\timepart{T(t)}} =(x+t)X′′(x)X(x)(not separable)\displaystyle = (\spacepart{x} + \timepart{t})\frac{\curv{X''(x)}}{\spacepart{X(x)}} \quad \text{(not separable)}

So separation of variables works with new terms whenever we can get x\spacepart{x} and t\timepart{t} on opposite sides of the equation, and fails when a term keeps x\spacepart{x} and t\timepart{t} stuck together.

Key concepts

For a rod of length LL with both ends held at 0∘0^\circ, separating u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} in ∂u∂t=k∂2u∂x2\rate{\frac{\partial u}{\partial t}} = k\curv{\frac{\partial^2 u}{\partial x^2}} gives the normal modes

un(x,t)\displaystyle \temp{u_n(x, t)} =Bnsin⁡(nπxL)e−k(nπ/L)2t(n=1,2,3,… )\displaystyle = B_n \spacepart{\sin\left(\frac{n\pi x}{L}\right)} \timepart{e^{-k(n\pi/L)^2 t}} \qquad (n = 1, 2, 3, \dots)

Your first decision on any problem is how to match the starting temperature u(x,0)=f(x)\temp{u(x, 0)} = \temp{f(x)}:

When not to integrate (sine-wave starting temperature)

If u(x,0)\temp{u(x, 0)} is already a sum of sine waves that fit the rod, like u(x,0)=50sin⁡(3x)−12sin⁡(5x)\temp{u(x, 0)} = 50\spacepart{\sin(3x)} - 12\spacepart{\sin(5x)} on L=πL = \pi with k=1k = 1, do not set up the Fourier integral. At t=0t = 0, e0=1\timepart{e^0} = 1, so the starting profile already gives you nn and BnB_n; just attach each mode's exponential decay to get u(x,t)=50sin⁡(3x)e−9t−12sin⁡(5x)e−25t\temp{u(x, t)} = 50\spacepart{\sin(3x)}\timepart{e^{-9t}} - 12\spacepart{\sin(5x)}\timepart{e^{-25t}}.

When to use the Fourier sine integral (any other starting profile)

If u(x,0)=f(x)\temp{u(x, 0)} = \temp{f(x)} is not already made of sine waves, like a flat f(x)=100\temp{f(x)} = \temp{100}, sum all the modes and find the coefficients by orthogonality:

Bn\displaystyle B_n =2L∫0Lf(x)sin⁡(nπxL)dx\displaystyle = \frac{2}{L}\int_0^L \temp{f(x)}\sin\left(\frac{n\pi x}{L}\right)dx
If f(x)\temp{f(x)} is symmetric across the midpoint x=L2x = \frac{L}{2}, every even coefficient (n=2,4,6,…n = 2, 4, 6, \dots) cancels to zero.

When solving for a later time or cool temperature

Because the n2n^2 in the exponent makes higher modes decay n2n^2 times faster than the first mode, drop the n≥2n \ge 2 terms and solve the single n=1n = 1 equation, such as 10≈400πe−t\temp{10} \approx \frac{400}{\pi}\timepart{e^{-t}} at x=π2x = \frac{\pi}{2}.

When given a modified PDE

Don't reuse the old time factor without checking. Plug u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} straight into the new PDE and divide by X(x)T(t)\spacepart{X(x)}\timepart{T(t)}. If you can get all the t\timepart{t}'s on one side and all the x\spacepart{x}'s on the other (as in T′kT+ck=X′′X=−λ2\frac{\rate{T'}}{k\timepart{T}} + \frac{\leak{c}}{k} = \frac{\curv{X''}}{\spacepart{X}} = -\lambda^2 for ut=kuxx−cu\rate{u_t} = k\curv{u_{xx}} - \leak{cu}), set both sides to −λ2-\lambda^2. If a term like (x+t)(\spacepart{x} + \timepart{t}) in ut=(x+t)uxx\rate{u_t} = (\spacepart{x} + \timepart{t})\curv{u_{xx}} brings x\spacepart{x} onto the t\timepart{t} side or t\timepart{t} onto the x\spacepart{x} side no matter how you rearrange it, the PDE cannot be separated.

6

Practice

1

A rod of length L=2L = 2 with conductivity k=3k = 3 and both ends held at 0∘0^\circ starts with temperature u(x,0)=40sin⁡(3πx2)\temp{u(x, 0)} = 40 \spacepart{\sin\left(\tfrac{3\pi x}{2}\right)}. Find u(x,t)\temp{u(x, t)} for t>0t > 0, and state how many times faster this mode decays than the n=1n = 1 mode of the same rod.

Compare sin⁡(3πx2)\spacepart{\sin\left(\tfrac{3\pi x}{2}\right)} with sin⁡(nπxL)\spacepart{\sin\left(\tfrac{n\pi x}{L}\right)} when L=2L = 2: what is nn, and do you need an integral to find BnB_n?

Comparing sin⁡(3πx2)\spacepart{\sin\left(\frac{3\pi x}{2}\right)} with sin⁡(nπx2)\spacepart{\sin\left(\frac{n\pi x}{2}\right)} gives n=3n = 3 and B3=40B_3 = 40. Attaching the n=3n = 3 time decay e−k(nπ/L)2t\timepart{e^{-k(n\pi/L)^2 t}} with k=3k = 3 and L=2L = 2 gives
u(x,t)=40sin⁡(3πx2)e−3(3π/2)2t=40sin⁡(3πx2)e−27π2t/4\displaystyle \begin{aligned} \temp{u(x, t)} &= 40\spacepart{\sin\left(\frac{3\pi x}{2}\right)}\timepart{e^{-3(3\pi/2)^2 t}} \\ &= 40\spacepart{\sin\left(\frac{3\pi x}{2}\right)}\timepart{e^{-27\pi^2 t/4}} \end{aligned}
(Watch out: don't forget to divide by L=2L = 2 inside (nπL)2\left(\frac{n\pi}{L}\right)^2: using (3π)2(3\pi)^2 instead of (3π2)2\left(\frac{3\pi}{2}\right)^2 gives the wrong exponent e−27π2te^{-27\pi^2 t}, and using nn instead of n2n^2 for the relative decay speed gives 33 instead of 99.)
Because the decay exponent scales with n2n^2, this n=3n = 3 mode decays 32=93^2 = 9 times faster than the n=1n = 1 mode.
2

A rod of length L=πL = \pi with conductivity k=2k = 2 and ends held at 0∘0^\circ has starting temperature u(x,0)=25sin⁡(x)−10sin⁡(4x)\temp{u(x, 0)} = 25 \spacepart{\sin(x)} - 10 \spacepart{\sin(4x)}. Find u(x,t)\temp{u(x, t)}.

Each sine wave in the sum cools at its own rate. What value of nn matches sin⁡(x)\spacepart{\sin(x)} and what value matches sin⁡(4x)\spacepart{\sin(4x)} when L=πL = \pi?

With L=πL = \pi and k=2k = 2, the nn-th mode has time decay e−2(nπ/π)2t=e−2n2t\timepart{e^{-2(n\pi/\pi)^2 t}} = \timepart{e^{-2n^2 t}}. Matching n=1n = 1 (e−2t\timepart{e^{-2t}}) to the first wave and n=4n = 4 (e−32t\timepart{e^{-32t}}) to the second wave gives
u(x,t)\displaystyle \temp{u(x, t)} =25sin⁡(x)e−2t−10sin⁡(4x)e−32t\displaystyle = 25\spacepart{\sin(x)}\timepart{e^{-2t}} - 10\spacepart{\sin(4x)}\timepart{e^{-32t}}
(Watch out: don't forget to square n=4n = 4 in the second exponent: multiplying 2⋅42 \cdot 4 without squaring 44 gives −10sin⁡(4x)e−8t-10\sin(4x)e^{-8t}.)
3

A rod of length LL with conductivity kk and 0∘0^\circ ends is heated to 100∘\temp{100^\circ} on its left half (0<x<L20 < x < \tfrac{L}{2}) and 0∘\temp{0^\circ} on its right half (L2<x<L\tfrac{L}{2} < x < L). Find the Fourier sine coefficients BnB_n, write the series solution u(x,t)\temp{u(x, t)}, and explain why the n=2n = 2 mode appears here even though it vanished for a uniformly heated 100∘\temp{100^\circ} rod.

In Bn=2L∫0Lf(x)sin⁡(nπxL) dxB_n = \frac{2}{L}\int_0^L \temp{f(x)}\sin\left(\tfrac{n\pi x}{L}\right)\,dx, on which half of the rod is f(x)\temp{f(x)} nonzero, and what does that do to the upper limit of the integral?

Because f(x)=0\temp{f(x)} = \temp{0} from x=L2x = \frac{L}{2} to x=Lx = L, the integral stops at x=L2x = \frac{L}{2} while the factor in front stays 2L\frac{2}{L}:
Bn=2L∫0L/2100sin⁡(nπxL)dx=200L[−Lnπcos⁡(nπxL)]0L/2=200nπ(1−cos⁡(nπ2))\displaystyle \begin{aligned} B_n &= \frac{2}{L}\int_0^{L/2} \temp{100}\sin\left(\frac{n\pi x}{L}\right)dx \\ &= \frac{200}{L}\left[-\frac{L}{n\pi}\cos\left(\frac{n\pi x}{L}\right)\right]_0^{L/2} \\ &= \frac{200}{n\pi}\left(1 - \cos\left(\frac{n\pi}{2}\right)\right) \end{aligned}
(Watch out: shrinking the integration interval to [0,L2]\left[0, \frac{L}{2}\right] does not change the 2L\frac{2}{L} factor in front of the integral. Replacing 2L\frac{2}{L} with 2L2=4L\frac{2}{\tfrac{L}{2}} = \frac{4}{L} doubles every coefficient to 400nπ(1−cos⁡(nπ2))\frac{400}{n\pi}\left(1 - \cos\left(\frac{n\pi}{2}\right)\right).)
Plugging BnB_n into the series gives
u(x,t)=∑n=1∞200nπ(1−cos⁡(nπ2))sin⁡(nπxL)e−k(nπ/L)2t\displaystyle \begin{aligned} \temp{u(x, t)} = \sum_{n=1}^{\infty} &\frac{200}{n\pi}\left(1 - \cos\left(\frac{n\pi}{2}\right)\right) \\ &\spacepart{\sin\left(\frac{n\pi x}{L}\right)}\timepart{e^{-k(n\pi/L)^2 t}} \end{aligned}
The n=2n = 2 mode is nonzero (B2=200πB_2 = \frac{200}{\pi}) because the starting temperature is hotter on the left half than on the right half, matching the uneven shape of sin⁡(2πxL)\spacepart{\sin\left(\frac{2\pi x}{L}\right)} instead of canceling out across the midpoint.
4

A rod of length L=πL = \pi with k=1k = 1 and 0∘0^\circ ends starts at a uniform 50∘\temp{50^\circ}, so its temperature is u(x,t)=200πsin⁡(x)e−t+2003πsin⁡(3x)e−9t+2005πsin⁡(5x)e−25t+…\temp{u(x, t)} = \frac{200}{\pi} \spacepart{\sin(x)}\timepart{e^{-t}} + \frac{200}{3\pi} \spacepart{\sin(3x)}\timepart{e^{-9t}} + \frac{200}{5\pi} \spacepart{\sin(5x)}\timepart{e^{-25t}} + \dots. Approximately how long does it take for the center of the rod, x=π2x = \tfrac{\pi}{2}, to cool to 2∘\temp{2^\circ}?

By the time the center cools from 50∘\temp{50^\circ} down to 2∘\temp{2^\circ}, how big are the e−9t\timepart{e^{-9t}} and e−25t\timepart{e^{-25t}} terms compared to the n=1n = 1 term?

By the time the center cools from 50∘\temp{50^\circ} to 2∘\temp{2^\circ}, the n≥3n \ge 3 terms with e−9t,e−25t,…\timepart{e^{-9t}}, \timepart{e^{-25t}}, \dots are tiny. Keeping only the n=1n = 1 term at x=π2x = \frac{\pi}{2} gives
2≈200πsin⁡(π2)e−t=200πe−t\displaystyle \begin{aligned} \temp{2} &\approx \frac{200}{\pi}\spacepart{\sin\left(\frac{\pi}{2}\right)}\timepart{e^{-t}} \\ &= \frac{200}{\pi}\timepart{e^{-t}} \end{aligned}
(Watch out: use the first-mode coefficient 200π\frac{200}{\pi}, not the flat starting temperature 50\temp{50}: setting 2=50e−t2 = 50e^{-t} gives the wrong time t=ln⁡(25)t = \ln(25).)
Dividing by 200π\frac{200}{\pi} gives e−t≈π100\timepart{e^{-t}} \approx \frac{\pi}{100}, so t≈ln⁡(100π) secondst \approx \ln\left(\frac{100}{\pi}\right)\text{ seconds}.
5

Suppose a rod of length LL with 0∘0^\circ ends has an internal heat source proportional to temperature, obeying ut=kuxx+cu\rate{u_t} = k\curv{u_{xx}} + \source{cu} for a positive constant c\source{c}. Use separation of variables u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} to find the normal modes un(x,t)\temp{u_n(x, t)}, and find the values of c\source{c} for which the n=1n = 1 mode grows in time instead of decaying.

Substitute u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)}, divide every term by kX(x)T(t)k\spacepart{X(x)}\timepart{T(t)}, and move the constant ck\frac{\source{c}}{k} to the time side before setting both sides equal to −λ2-\lambda^2.

Substituting u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} into ut=kuxx+cu\rate{u_t} = k\curv{u_{xx}} + \source{cu} and dividing by kX(x)T(t)k\spacepart{X(x)}\timepart{T(t)} separates the variables:
T′(t)kT(t)−ck\displaystyle \frac{\rate{T'(t)}}{k\timepart{T(t)}} - \frac{\source{c}}{k} =X′′(x)X(x)\displaystyle = \frac{\curv{X''(x)}}{\spacepart{X(x)}} =−λ2\displaystyle = -\lambda^2
With 0∘0^\circ ends, the space equation X′′(x)=−λ2X(x)\curv{X''(x)} = -\lambda^2 \spacepart{X(x)} still gives Xn(x)=sin⁡(nπxL)\spacepart{X_n(x)} = \spacepart{\sin\left(\frac{n\pi x}{L}\right)} and λ=nπL\lambda = \frac{n\pi}{L}, while the time equation becomes T′(t)=−(k(nπL)2−c)T(t)\rate{T'(t)} = -\left(\diffusion{k\left(\frac{n\pi}{L}\right)^2} - \source{c}\right)\timepart{T(t)}. Multiplying them gives the normal modes
un(x,t)\displaystyle \temp{u_n(x, t)} =Bnsin⁡(nπxL)e−(k(nπ/L)2−c)t\displaystyle = B_n\spacepart{\sin\left(\frac{n\pi x}{L}\right)}\timepart{e^{-\left(k(n\pi/L)^2 - \source{c}\right)t}}
(Watch out: +cu+\source{cu} is a heat source, not heat loss, so −c-\source{c} appears inside the exponent −(k(nπL)2−c)t-\left(\diffusion{k\left(\frac{n\pi}{L}\right)^2} - \source{c}\right)t, and don't drop the factor of kk when clearing kT(t)k\timepart{T(t)}. Forgetting kk gives the wrong threshold c>(πL)2c > \left(\frac{\pi}{L}\right)^2.)
The n=1n = 1 mode grows in time when its exponent is positive, which happens when c>k(πL)2\source{c} > \diffusion{k\left(\frac{\pi}{L}\right)^2}.
6

Plug u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} into (a) xut=tuxxx\rate{u_t} = t\curv{u_{xx}} and (b) ut=uxx+xtu\rate{u_t} = \curv{u_{xx}} + xtu. For each PDE, either separate it into two ODEs using separation constant −λ2-\lambda^2 or show why xx and tt cannot be separated.

After dividing by X(x)T(t)\spacepart{X(x)}\timepart{T(t)}, check what extra factors of xx and tt remain. Can division get all the tt's on the left and all the xx's on the right?

(a)Substituting u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} gives xX(x)T′(t)=tX′′(x)T(t)\spacepart{x} \spacepart{X(x)}\rate{T'(t)} = \timepart{t} \curv{X''(x)}\timepart{T(t)}. Dividing both sides by xtX(x)T(t)\spacepart{x}\timepart{t} \spacepart{X(x)}\timepart{T(t)} puts t\timepart{t} alone on the left and x\spacepart{x} alone on the right:
T′(t)tT(t)\displaystyle \frac{\rate{T'(t)}}{\timepart{t} \timepart{T(t)}} =X′′(x)xX(x)\displaystyle = \frac{\curv{X''(x)}}{\spacepart{x} \spacepart{X(x)}} =−λ2\displaystyle = -\lambda^2
(Watch out: don't divide by X(x)T(t)\spacepart{X(x)}\timepart{T(t)} alone: leaving x\spacepart{x} on the left and t\timepart{t} on the right gives xT′(t)T(t)=tX′′(x)X(x)=−λ2\frac{\spacepart{x}\rate{T'(t)}}{\timepart{T(t)}} = \frac{\timepart{t}\curv{X''(x)}}{\spacepart{X(x)}} = -\lambda^2, which puts the wrong variable into each ODE: xT′+λ2T=0\spacepart{x}\rate{T'} + \lambda^2 \timepart{T} = 0 and tX′′+λ2X=0\timepart{t}\curv{X''} + \lambda^2 \spacepart{X} = 0.)
Rewriting each side gives the two ODEs T′(t)+λ2tT(t)=0\rate{T'(t)} + \lambda^2 \timepart{t} \timepart{T(t)} = 0 and X′′(x)+λ2xX(x)=0\curv{X''(x)} + \lambda^2 \spacepart{x} \spacepart{X(x)} = 0.
(b)Substituting u(x,t)=X(x)T(t)\temp{u(x, t)} = \spacepart{X(x)}\timepart{T(t)} and dividing by X(x)T(t)\spacepart{X(x)}\timepart{T(t)} gives
T′(t)T(t)\displaystyle \frac{\rate{T'(t)}}{\timepart{T(t)}} =X′′(x)X(x)+xt\displaystyle = \frac{\curv{X''(x)}}{\spacepart{X(x)}} + \spacepart{x}\timepart{t}
Because the added term xt\spacepart{x}\timepart{t} multiplies x\spacepart{x} and t\timepart{t} together, neither subtracting xt\spacepart{x}\timepart{t} nor dividing by x\spacepart{x} or t\timepart{t} can get t\timepart{t} alone on the left and x\spacepart{x} alone on the right, so (b) is not separable.