Skip to content
Part IA Michaelmas, Lent, Easter Term

Diffusion Equation

The Equation

ϕt=D2ϕx2\frac{\partial \phi}{\partial t} = D\frac{\partial^2 \phi}{\partial x^2}

Or: ϕt=Dϕxx\phi_t = D\phi_{xx}

DD is the diffusion coefficient (or thermal diffusivity for heat).


Physical Derivation

Fick’s law: Diffusive flux J=DCxJ = -D\frac{\partial C}{\partial x} (down concentration gradient).

Conservation: Rate of change = -net flux out:

Ct=D2Cx2\frac{\partial C}{\partial t} = D\frac{\partial^2 C}{\partial x^2}

Heat equation: From Fourier’s law (J=kTJ = -k\nabla T):

Tt=D2T\frac{\partial T}{\partial t} = D\nabla^2 T

where D=k/(ρcp)D = k/(\rho c_p).


Three Fundamental Solutions

1. Diffusion from Step Function

Initially: ϕ(x,0)={0x<01x>0\phi(x, 0) = \begin{cases} 0 & x < 0 \\ 1 & x > 0 \end{cases}

Step function initial condition and its smooth diffusion over time

Solution:

ϕ(x,t)=12[1erf(x2Dt)]\phi(x, t) = \frac{1}{2}\left[1 - \text{erf}\left(\frac{x}{2\sqrt{Dt}}\right)\right]

where erf(z)=2π0zeu2du\text{erf}(z) = \frac{2}{\sqrt{\pi}}\int_0^z e^{-u^2}du.

Interpretation: Smooth spreading of the initial discontinuity.


2. Point Source (Green’s Function)

Initially: ϕ(x,0)=δ(x)\phi(x, 0) = \delta(x) (concentrated at origin)

Solution:

ϕ(x,t)=14πDtexp(x24Dt)\phi(x, t) = \frac{1}{\sqrt{4\pi Dt}}\exp\left(-\frac{x^2}{4Dt}\right)

Gaussian spreading over time - narrow spike at t=0, wider and lower at later times

Properties:

  • Gaussian shape at all times
  • Spreads: width Dt\sim \sqrt{Dt}
  • Mass conserved: ϕdx=1\int_{-\infty}^{\infty}\phi\,dx = 1

3. Semi-Infinite System with Absorbing Wall

Domain: 0<x<L0 < x < L with ϕ(0,t)=0\phi(0, t) = 0 (absorbing boundary).

Solution:

ϕ(x,t)=n oddAnsin(nπx2L)exp(n2π2Dt4L2)\phi(x, t) = \sum_{n\text{ odd}} A_n \sin\left(\frac{n\pi x}{2L}\right) \exp\left(-\frac{n^2\pi^2 D t}{4L^2}\right)

Long-time behaviour: Dominated by n=1n = 1 mode, decays as eπ2Dt/4L2e^{-\pi^2 Dt/4L^2}.


Separation of Variables

Try ϕ(x,t)=X(x)T(t)\phi(x, t) = X(x)T(t):

XT=DXTXT' = DX''T

TDT=XX=k2\frac{T'}{DT} = \frac{X''}{X} = -k^2

Time: T(t)=eDk2tT(t) = e^{-Dk^2 t}

Space: X(x)=Asin(kx)+Bcos(kx)X(x) = A\sin(kx) + B\cos(kx)

Apply boundary conditions to determine kk.


Example: Finite Rod with Fixed Ends

ϕ(0,t)=ϕ(L,t)=0\phi(0, t) = \phi(L, t) = 0

X(0)=0B=0X(0) = 0 \Rightarrow B = 0

X(L)=0sin(kL)=0X(L) = 0 \Rightarrow \sin(kL) = 0, so k=nπ/Lk = n\pi/L

Solution:

ϕ(x,t)=n=1Ansin(nπxL)exp(n2π2DtL2)\phi(x, t) = \sum_{n=1}^{\infty} A_n \sin\left(\frac{n\pi x}{L}\right) \exp\left(-\frac{n^2\pi^2 Dt}{L^2}\right)


Fourier Coefficients

For initial condition ϕ(x,0)=f(x)\phi(x, 0) = f(x):

An=2L0Lf(x)sin(nπxL)dxA_n = \frac{2}{L}\int_0^L f(x)\sin\left(\frac{n\pi x}{L}\right) dx

Each mode decays exponentially; higher modes decay faster.


Long-Time Behaviour

At large tt, the n=1n = 1 mode dominates:

ϕsin(πx/L)exp(π2Dt/L2)\phi \propto \sin(\pi x/L) \exp(-\pi^2 Dt/L^2)

Characteristic decay time: τ=L2/(π2D)\tau = L^2/(\pi^2 D)


Comparison with Wave Equation

PropertyWaveDiffusion
Equationytt=c2yxxy_{tt} = c^2 y_{xx}ϕt=Dϕxx\phi_t = D\phi_{xx}
Order in ttSecondFirst
EnergyConservedDissipated
InformationPropagates at speed ccDiffuses, spreads

Why the Diffusion Equation Matters

  • Heat conduction
  • Particle diffusion
  • Chemical transport
  • Financial mathematics (Black-Scholes)
  • Biological processes (morphogen gradients)

The diffusion equation describes how things spread out and dissipate — a universal phenomenon in nature.