4.7.19Partial Differential Equations

Solving PDEs with Fourier transforms (heat equation on infinite domain)

1,836 words8 min readdifficulty · medium

WHY use Fourier transforms here?


WHAT is the Fourier transform (our convention)


HOW to solve ut=αuxxu_t=\alpha u_{xx} — full derivation from scratch

Problem: solve ut=αuxx,<x<, t>0,u(x,0)=f(x),u_t=\alpha\,u_{xx},\qquad -\infty<x<\infty,\ t>0,\qquad u(x,0)=f(x), with α>0\alpha>0 the thermal diffusivity, and u0u\to 0 as x|x|\to\infty.

Step 1 — Transform in xx. Define u^(k,t)=u(x,t)eikxdx\hat u(k,t)=\int u(x,t)e^{-ikx}dx. Why this step? It freezes tt and acts only on xx, converting xx-derivatives to algebra.

Transforming both sides (using F{uxx}=k2u^\mathcal F\{u_{xx}\}=-k^2\hat u and noting t\partial_t commutes with the xx-integral): u^t=αk2u^(k,t).\frac{\partial \hat u}{\partial t}=-\alpha k^2\,\hat u(k,t). Why this step? This is now a first-order linear ODE in tt, with kk a constant parameter.

Step 2 — Solve the ODE. A separable/linear ODE u^t=αk2u^\hat u_t=-\alpha k^2\hat u gives u^(k,t)=u^(k,0)eαk2t.\hat u(k,t)=\hat u(k,0)\,e^{-\alpha k^2 t}. Why this step? Standard exponential decay solution; the initial value u^(k,0)=f^(k)\hat u(k,0)=\hat f(k) is the transform of the initial profile.

So u^(k,t)=f^(k)eαk2t.\boxed{\hat u(k,t)=\hat f(k)\,e^{-\alpha k^2 t}.}

Step 3 — Invert. The solution in xx is a product f^(k)G^(k)\hat f(k)\cdot \hat G(k) where G^(k)=eαk2t\hat G(k)=e^{-\alpha k^2 t}. A product of transforms = convolution of functions (Convolution Theorem): F1{f^G^}=fG,(fG)(x)=f(y)G(xy)dy.\mathcal F^{-1}\{\hat f\,\hat G\}=f*G,\qquad (f*G)(x)=\int_{-\infty}^{\infty} f(y)\,G(x-y)\,dy. Why this step? We avoid doing a hard inverse transform of the product directly; we just need G(x,t)=F1{eαk2t}G(x,t)=\mathcal F^{-1}\{e^{-\alpha k^2 t}\}.

Step 4 — Invert the Gaussian. We need G(x,t)=12πeαk2teikxdk.G(x,t)=\frac{1}{2\pi}\int_{-\infty}^{\infty} e^{-\alpha k^2 t}\,e^{ikx}\,dk. Complete the square in the exponent: with a=αta=\alpha t, ak2+ikx=a(kix2a)2x24a.-ak^2+ikx=-a\Big(k-\tfrac{ix}{2a}\Big)^2-\frac{x^2}{4a}. Using the Gaussian integral ea(kc)2dk=π/a\int e^{-a(k-c)^2}dk=\sqrt{\pi/a} (valid for the shifted contour), G(x,t)=12πex2/(4a)πa=14παtex2/(4αt).G(x,t)=\frac{1}{2\pi}\,e^{-x^2/(4a)}\sqrt{\frac{\pi}{a}}=\frac{1}{\sqrt{4\pi\alpha t}}\,e^{-x^2/(4\alpha t)}. Why this step? The Fourier transform of a Gaussian is a Gaussian — completing the square is the trick that turns the integral into the standard form.

Step 5 — Final solution. u(x,t)=f(y)14παte(xy)2/(4αt)dy.\boxed{\,u(x,t)=\int_{-\infty}^{\infty} f(y)\,\frac{1}{\sqrt{4\pi\alpha t}}\,e^{-(x-y)^2/(4\alpha t)}\,dy.\,}

Figure — Solving PDEs with Fourier transforms (heat equation on infinite domain)

Worked Example 1 — Point (delta) initial condition

Take f(x)=δ(x)f(x)=\delta(x) (all heat concentrated at the origin).

  • u(x,t)=δ(y)G(xy,t)dy=G(x,t)=14παtex2/(4αt).u(x,t)=\int \delta(y)\,G(x-y,t)\,dy = G(x,t)=\dfrac{1}{\sqrt{4\pi\alpha t}}e^{-x^2/(4\alpha t)}.

Why this step? The delta sifts out y=0y=0, so the solution is the heat kernel. This confirms the kernel is the response to a unit point source — the "Green's function" interpretation.

Forecast-then-Verify: Predict the peak height as tt grows. Peak is at x=0x=0: u(0,t)=1/4παt0u(0,t)=1/\sqrt{4\pi\alpha t}\to 0. Width σ=2αt\sigma=\sqrt{2\alpha t}\to\infty. Heat spreads and cools — verified. ✅


Worked Example 2 — Step (rectangular) initial temperature

Let f(x)=T0f(x)=T_0 for x<L|x|<L and 00 otherwise.

u(x,t)=T04παtLLe(xy)2/(4αt)dy.u(x,t)=\frac{T_0}{\sqrt{4\pi\alpha t}}\int_{-L}^{L}e^{-(x-y)^2/(4\alpha t)}\,dy. Substitute s=xy4αts=\dfrac{x-y}{\sqrt{4\alpha t}}, ds=dy/4αtds=-dy/\sqrt{4\alpha t}:

=\frac{T_0}{2}\!\left[\operatorname{erf}\!\frac{x+L}{\sqrt{4\alpha t}}-\operatorname{erf}\!\frac{x-L}{\sqrt{4\alpha t}}\right].$$ *Why this step?* The substitution maps the Gaussian convolution into the **error function** $\operatorname{erf}(z)=\frac{2}{\sqrt\pi}\int_0^z e^{-s^2}ds$, the standard antiderivative of a Gaussian. **Forecast-then-Verify:** At $t\to 0^+$ the erf-difference reproduces the sharp box; at large $t$ it becomes a wide smooth bump. ✅ --- ## Worked Example 3 — Gaussian initial condition stays Gaussian Let $f(x)=e^{-x^2/(2\sigma_0^2)}$. Convolving two Gaussians gives a Gaussian whose variances **add**: $$u(x,t)=\frac{\sigma_0}{\sqrt{\sigma_0^2+2\alpha t}}\,\exp\!\left(-\frac{x^2}{2(\sigma_0^2+2\alpha t)}\right).$$ *Why this step?* Convolution of $N(0,\sigma_0^2)$ with the kernel $N(0,2\alpha t)$ gives $N(0,\sigma_0^2+2\alpha t)$ — variance addition is the cleanest "diffusion = spreading" statement. --- ## Common Mistakes (Steel-manned) > [!mistake] "$\mathcal F\{u_{xx}\}=k^2\hat u$ (no minus sign)." > **Why it feels right:** squaring usually kills signs. **Fix:** each $\partial_x$ gives $ik$, so two give $(ik)^2=i^2k^2=-k^2$. The **minus is essential** — it makes the ODE *decay* ($e^{-\alpha k^2 t}$) instead of blow up. With $+k^2$ you'd get growth and an ill-posed problem. > [!mistake] "Just multiply the transforms back and you're done — it equals $f\cdot G$." > **Why it feels right:** in $k$-space we genuinely have a product $\hat f\hat G$. **Fix:** a product in frequency space is a **convolution** in real space, $f*G$, *not* a pointwise product. Mixing these up loses the smoothing integral entirely. > [!mistake] "Width grows linearly in time." > **Why it feels right:** waves travel at constant speed $\Rightarrow$ linear. **Fix:** diffusion is **not** wave-like. $\sigma=\sqrt{2\alpha t}\propto\sqrt t$. Doubling spread needs **four times** the time. This $\sqrt t$ law is the signature of diffusion. > [!mistake] "Forgot the $\dfrac{1}{\sqrt{4\pi\alpha t}}$ normalisation." > **Why it feels right:** the exponential looks like the whole answer. **Fix:** the prefactor keeps total heat conserved ($\int u\,dx$ constant). Drop it and energy/heat is not conserved. --- ## Active Recall > [!recall]- What does the Fourier transform turn $u_{xx}$ into, and why does that help? > Into $-k^2\hat u$ (multiplication). The PDE becomes an ODE in $t$ for each $k$: $\hat u_t=-\alpha k^2\hat u$. > [!recall]- Why do high frequencies decay fastest? > Decay rate is $\alpha k^2$, which grows with $k$. Sharp features = high $k$ = smoothed quickly. > [!recall]- How does the spreading width scale with time? > $\sigma=\sqrt{2\alpha t}\propto\sqrt t$ (sub-linear). Quadruple time to double spread. > [!recall]- Explain like I'm 12 (Feynman) > Imagine a drop of ink in still water. The Fourier trick is like saying: instead of tracking the whole ink blob, watch each "ripple size" separately. Tiny ripples (sharp edges) blur away almost instantly; big slow ripples last longest. Add all the surviving ripples back up and you get a smooth, ever-widening smudge — that's heat (or ink) spreading. The blob's width grows like the square root of time, so it slows down as it spreads. > [!mnemonic] Memory hook > **"FRIDGE"** — **F**ourier turns derivatives to **k**, **R**eplace $u_{xx}\to -k^2$, **I**ntegrate the easy ODE, **D**ecay $e^{-\alpha k^2 t}$, **G**aussian kernel back, **E**rror-function for boxes. Also: *"Diffusion spreads like √time, smooths like a Gaussian."* --- ## Connections - [[Fourier Transform]] — the engine; derivative & convolution theorems. - [[Convolution Theorem]] — why the answer is $f*G$. - [[Gaussian Integral]] — completing the square to invert $e^{-\alpha k^2 t}$. - [[Heat Equation Separation of Variables]] — the finite-domain counterpart (Fourier *series*). - [[Green's Function]] — the heat kernel is the Green's function of $\partial_t-\alpha\partial_{xx}$. - [[Error Function erf]] — appears for step initial data. - [[Diffusion vs Wave Equation]] — $\sqrt t$ spreading vs constant-speed propagation. --- #flashcards/maths Fourier transform of $f'(x)$ ::: $ik\,\hat f(k)$ Fourier transform of $u_{xx}$ ::: $-k^2\hat u(k,t)$ The transformed heat equation (ODE in $t$) ::: $\hat u_t=-\alpha k^2\hat u$ Solution of that ODE ::: $\hat u(k,t)=\hat f(k)\,e^{-\alpha k^2 t}$ Decay rate of frequency $k$ ::: $\alpha k^2$ (high $k$ decays fastest) Heat kernel $G(x,t)$ ::: $\dfrac{1}{\sqrt{4\pi\alpha t}}e^{-x^2/(4\alpha t)}$ Inverse transform trick for $\hat f\,\hat G$ ::: convolution $f*G=\int f(y)G(x-y)\,dy$ Full solution $u(x,t)$ ::: $\int_{-\infty}^{\infty} f(y)\,\dfrac{e^{-(x-y)^2/(4\alpha t)}}{\sqrt{4\pi\alpha t}}\,dy$ Std deviation of the spreading profile ::: $\sigma=\sqrt{2\alpha t}\propto\sqrt t$ Solution for $f=\delta(x)$ ::: the heat kernel $G(x,t)$ itself Solution for a box initial condition uses ::: the error function $\operatorname{erf}$ Why the minus sign in $-k^2$ matters ::: gives decay $e^{-\alpha k^2 t}$; $+k^2$ would blow up (ill-posed) What is conserved over time ::: total heat $\int u\,dx$ (kernel has area 1) ## 🖼️ Concept Map ```mermaid flowchart TD HE[Heat equation ut equals alpha uxx] -->|posed on| DOM[Infinite domain R] DOM -->|no boundaries so use| FT[Fourier transform] FT -->|derivative rule| DR[F of f'' equals -k^2 fhat] DR -->|turns PDE into| ODE[ODE in t per frequency k] ODE -->|decoupled per| K[Each wavenumber k] ODE -->|solve exponential| SOL[uhat equals fhat times e^-alpha k^2 t] IC[Initial profile f x] -->|transforms to| FHAT[fhat k] FHAT -->|initial value| SOL SOL -->|high k decay fastest| SMOOTH[Sharp features smoothed] SOL -->|inverse transform| GAUSS[Gaussian spreading solution] GAUSS -->|widens over| TIME[Time t] ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, heat equation $u_t=\alpha u_{xx}$ batati hai ki temperature time ke saath kaise "phailta" aur smooth hota hai. Infinite domain par koi boundary nahi hoti, isliye Fourier transform best tool hai. Iska magic ye hai: $\partial_{xx}$ jaisi mushkil derivative ko Fourier transform $-k^2$ se multiply karne mein badal deta hai. Matlab ek complicated PDE ban jaati hai har frequency $k$ ke liye ek simple ODE: $\hat u_t=-\alpha k^2\hat u$. Iska solution turant $\hat u=\hat f(k)\,e^{-\alpha k^2 t}$. > > Yahan dhyan do: decay rate $\alpha k^2$ hai, yaani **badi frequency (sharp edges) sabse jaldi mar jaati hai**. Isi wajah se diffusion sab kuch smooth kar deta hai. Wapas $x$-space mein jaane ke liye, $\hat f\cdot e^{-\alpha k^2 t}$ ek product hai — aur product in $k$-space ka matlab real space mein **convolution** hota hai. $e^{-\alpha k^2 t}$ ka inverse transform ek Gaussian nikalta hai jise heat kernel kehte hain: $G(x,t)=\frac{1}{\sqrt{4\pi\alpha t}}e^{-x^2/4\alpha t}$. > > Final answer: $u(x,t)=\int f(y)\,G(x-y,t)\,dy$. Iska seedha matlab — kisi point $x$ ka temperature aas-paas ke initial temperatures ka Gaussian-weighted average hai, aur ye width $\sqrt{4\alpha t}$ ke saath time ke saath badhti jaati hai. Yaad rakho: spreading **$\sqrt t$** ki tarah hota hai, linear nahi — double phailne ke liye 4 guna time chahiye. Bas yahi diffusion ki pehchaan hai, aur isiliye ye method exams aur real physics dono mein super important hai. ![[audio/4.7.19-Solving-PDEs-with-Fourier-transforms-(heat-equation-on-infinite-domain).mp3]]

Test yourself — Partial Differential Equations

Connections