Multivariable-Calculus Β· Unit 14 Β· Video 1 Β· Interactive Practice

The Heat Equation: A First Partial Differential Equation

IKey Formulas

FormulaNameWhat it says
βˆ‚fβˆ‚t=k(βˆ‚2fβˆ‚x2+βˆ‚2fβˆ‚y2+βˆ‚2fβˆ‚z2)\dfrac{\partial f}{\partial t} = k\left(\dfrac{\partial^2 f}{\partial x^2} + \dfrac{\partial^2 f}{\partial y^2} + \dfrac{\partial^2 f}{\partial z^2}\right)Heat equationf(x,y,z,t)f(x, y, z, t) is the temperature; k>0k > 0 is the thermal diffusivity (larger kk, faster spreading)
βˆ‚fβˆ‚t=kβ€‰βˆ‚2fβˆ‚x2\dfrac{\partial f}{\partial t} = k\,\dfrac{\partial^2 f}{\partial x^2}One space directionfxx>0f_{xx} > 0 (bends up): the spot warms; fxx<0f_{xx} < 0 (bends down): the spot cools
f(x,t)=eβˆ’ktsin⁑xf(x, t) = e^{-kt}\sin xOne solutionft=βˆ’keβˆ’ktsin⁑x=kfxxf_t = -k e^{-kt}\sin x = k f_{xx}, so both sides agree

Key Insight: The solution of a PDE is a whole function, not a number. A PDE has many solutions; the initial temperature distribution and the conditions at the boundary pick out the one that describes a real situation.

IIVisualization 1 β€” Bending Decides Warming or Cooling

The sign of βˆ‚2f/βˆ‚x2\partial^2 f/\partial x^2 tells whether a spot warms or cools: each point moves toward its neighbours' average.

IIIVisualization 2 β€” A Solution Flattening Out

In f(x,t)=eβˆ’ktsin⁑xf(x, t) = e^{-kt}\sin x every peak cools and every trough warms, faster when kk is larger.

IVVisualization 3 β€” Is It a Solution?

A function solves ft=kfxxf_t = k f_{xx} only if the two sides agree at every xx and at every tt.

VQuiz Questions

Problem 1 Β· The Right Side

Given: f(x,t)=eβˆ’4ktsin⁑2xf(x, t) = e^{-4kt}\sin 2x. Find the right side of the heat equation, kβ€‰βˆ‚2fβˆ‚x2k\,\dfrac{\partial^2 f}{\partial x^2}.

βœ… Correct! Each xx-derivative brings out a factor 22, and sin⁑→cosβ‘β†’βˆ’sin⁑\sin \to \cos \to -\sin. Since ft=βˆ’4k eβˆ’4ktsin⁑2xf_t = -4k\,e^{-4kt}\sin 2x as well, this ff is a solution.
❌ One chain factor missing. Differentiating twice brings out the inner factor 22 twice: 2β‹…2=42 \cdot 2 = 4, not 22.
❌ That is kfxk f_x. fx=2eβˆ’4ktcos⁑2xf_x = 2e^{-4kt}\cos 2x is only the first partial; differentiate once more in xx.
❌ Check the sign. The derivative of cos⁑2x\cos 2x is βˆ’2sin⁑2x-2\sin 2x, so two derivatives of sin⁑2x\sin 2x give βˆ’4sin⁑2x-4\sin 2x.
❌ Not quite. Treat eβˆ’4kte^{-4kt} as a constant and differentiate sin⁑2x\sin 2x twice in xx.
Show solution

With tt held fixed, eβˆ’4kte^{-4kt} is a constant factor:

fx=2eβˆ’4ktcos⁑2x,fxx=βˆ’4eβˆ’4ktsin⁑2x.f_x = 2e^{-4kt}\cos 2x, \qquad f_{xx} = -4e^{-4kt}\sin 2x. k fxx=βˆ’4k eβˆ’4ktsin⁑2x.k\,f_{xx} = -4k\,e^{-4kt}\sin 2x.

The left side is ft=βˆ’4k eβˆ’4ktsin⁑2xf_t = -4k\,e^{-4kt}\sin 2x too, so ff satisfies ft=kfxxf_t = k f_{xx}.

Problem 2 Β· A Hot Spot

Given: along a rod with k=2k = 2, the temperature above the reference value at time 00 is f(x,0)=x3βˆ’3xf(x, 0) = x^3 - 3x. At x=βˆ’1x = -1 the profile has a peak, f=2f = 2. Find βˆ‚fβˆ‚t\dfrac{\partial f}{\partial t} at x=βˆ’1x = -1 at that moment.

βœ… Correct! fxx=6x=βˆ’6f_{xx} = 6x = -6 at the peak, so ft=2β‹…(βˆ’6)=βˆ’12f_t = 2 \cdot (-6) = -12: the hot spot cools.
❌ That is the slope, not the bending. fx=3x2βˆ’3=0f_x = 3x^2 - 3 = 0 at the peak, but the heat equation uses the second derivative, fxx=βˆ’6f_{xx} = -6.
❌ Check the sign. A peak bends down, so fxx<0f_{xx} < 0 and the spot cools: ftf_t must be negative.
❌ Missing kk. βˆ’6-6 is fxxf_{xx}; the rate is kfxxk f_{xx} with k=2k = 2.
❌ Not quite. Compute fxxf_{xx} at x=βˆ’1x = -1 and multiply by kk.
Show solution

fx=3x2βˆ’3f_x = 3x^2 - 3 and fxx=6xf_{xx} = 6x. At x=βˆ’1x = -1: fx=0f_x = 0 (a peak) and fxx=βˆ’6f_{xx} = -6.

βˆ‚fβˆ‚t=kβ€‰βˆ‚2fβˆ‚x2=2β‹…(βˆ’6)=βˆ’12.\frac{\partial f}{\partial t} = k\,\frac{\partial^2 f}{\partial x^2} = 2 \cdot (-6) = -12.

The profile bends down at the peak, so the temperature there falls, at 1212 degrees per unit time at this instant.

Problem 3 Β· Decay Rate and Half-Life

Given: f(x,t)=ectsin⁑3xf(x, t) = e^{ct}\sin 3x and the heat equation ft=kfxxf_t = k f_{xx} with k=12k = \tfrac{1}{2}. Find the constant cc that makes ff a solution, then the time at which the amplitude ecte^{ct} has fallen to half.

What is c?

When does the amplitude halve?

βœ… Correct! c=βˆ’9k=βˆ’92c = -9k = -\tfrac{9}{2}, and eβˆ’4.5t=12e^{-4.5t} = \tfrac{1}{2} gives t=ln⁑24.5β‰ˆ0.154t = \tfrac{\ln 2}{4.5} \approx 0.154.
❌ Missing a factor of 3. Two xx-derivatives of sin⁑3x\sin 3x bring out 3β‹…3=93 \cdot 3 = 9, so fxx=βˆ’9ff_{xx} = -9f, not βˆ’3f-3f.
❌ Check the sign. fxx=βˆ’9ff_{xx} = -9f, so cf=kfxxc f = k f_{xx} forces c<0c < 0: the sine profile decays, it does not grow.
❌ Missing kk. cf=kfxx=βˆ’9kfc f = k f_{xx} = -9k f, and k=12k = \tfrac{1}{2}, so c=βˆ’92c = -\tfrac{9}{2}.
❌ Check c. Substitute: ft=cff_t = c f and fxx=βˆ’9ff_{xx} = -9f, then match cf=kfxxc f = k f_{xx}.
❌ Multiplied instead of divided. 4.5ln⁑2β‰ˆ3.124.5\ln 2 \approx 3.12; solving 4.5t=ln⁑24.5t = \ln 2 gives t=ln⁑2/4.5t = \ln 2 / 4.5.
❌ That uses c=βˆ’32c = -\tfrac{3}{2}. ln⁑2/1.5β‰ˆ0.462\ln 2 / 1.5 \approx 0.462; with the correct c=βˆ’92c = -\tfrac{9}{2} the decay is three times faster.
❌ That uses c=βˆ’9c = -9. ln⁑2/9β‰ˆ0.077\ln 2 / 9 \approx 0.077 leaves out k=12k = \tfrac{1}{2}; the rate is 4.54.5, not 99.
❌ Check the time. Solve eβˆ’4.5t=12e^{-4.5t} = \tfrac{1}{2} by taking logarithms.
Show solution

Differentiate:

ft=c ectsin⁑3x=cf,fxx=βˆ’9ectsin⁑3x=βˆ’9f.f_t = c\,e^{ct}\sin 3x = c f, \qquad f_{xx} = -9e^{ct}\sin 3x = -9f.

The heat equation needs cf=kfxx=βˆ’9kfc f = k f_{xx} = -9k f for every xx and tt, so c=βˆ’9k=βˆ’92c = -9k = -\tfrac{9}{2}.

The amplitude is eβˆ’4.5te^{-4.5t}. Setting it equal to 12\tfrac{1}{2}:

βˆ’4.5t=ln⁑12=βˆ’ln⁑2β‡’t=ln⁑24.5β‰ˆ0.154.-4.5t = \ln\tfrac{1}{2} = -\ln 2 \quad\Rightarrow\quad t = \frac{\ln 2}{4.5} \approx 0.154.

Problem 4 Β· Diffusion in Two Directions

Given: the concentration of dye in a thin layer obeys the diffusion equation βˆ‚fβˆ‚t=k(βˆ‚2fβˆ‚x2+βˆ‚2fβˆ‚y2)\dfrac{\partial f}{\partial t} = k\left(\dfrac{\partial^2 f}{\partial x^2} + \dfrac{\partial^2 f}{\partial y^2}\right). Find the constant aa for which f(x,y,t)=eatsin⁑xcos⁑2yf(x, y, t) = e^{at}\sin x\cos 2y is a solution.

βœ… Correct! fxx=βˆ’ff_{xx} = -f and fyy=βˆ’4ff_{yy} = -4f, so af=k(βˆ’fβˆ’4f)=βˆ’5kfa f = k(-f - 4f) = -5k f.
❌ The factor 2 must be squared. Two yy-derivatives of cos⁑2y\cos 2y give βˆ’4cos⁑2y-4\cos 2y, so fyy=βˆ’4ff_{yy} = -4f, not βˆ’2f-2f.
❌ Check the sign. Both second partials are negative multiples of ff, so the concentration pattern must decay: a<0a < 0.
❌ Only the xx-direction. βˆ’k-k comes from fxx=βˆ’ff_{xx} = -f alone; the diffusion equation also adds fyy=βˆ’4ff_{yy} = -4f.
❌ Not quite. Express ftf_t, fxxf_{xx} and fyyf_{yy} as multiples of ff, then match both sides.
Show solution
ft=af,fxx=βˆ’eatsin⁑xcos⁑2y=βˆ’f,fyy=βˆ’4eatsin⁑xcos⁑2y=βˆ’4f.f_t = a f, \qquad f_{xx} = -e^{at}\sin x\cos 2y = -f, \qquad f_{yy} = -4e^{at}\sin x\cos 2y = -4f.

The equation requires af=k(fxx+fyy)=k(βˆ’fβˆ’4f)=βˆ’5kfa f = k(f_{xx} + f_{yy}) = k(-f - 4f) = -5k f at every point, so a=βˆ’5ka = -5k.

The same PDE describes heat (with ff a temperature) and diffusion (with ff a concentration): the pattern fades at rate 5k5k and the dye blends toward uniform.

Solved: 0 / 4