Solution to Diffusion Equations (II)
2026-01-26
Key ideas from last lecture:
Just to solve Laplace equation \(\nabla^2 c = 0\). But \(\nabla^2\) terms depend on the coordinate system!
\(k_1, k_2\) are determined by the boundary conditions.
After today’s lecture, you will be able to:
Different strategies (review)
Analysis of many diffusion problems will benefit by transforming into dimensionless forms
Diffusion length scale \(\sqrt{Dt}\) (or \(\sqrt{4Dt}\))
Dimensionless variable \(\eta = \frac{x}{\sqrt{Dt}}\)
Transform from ODE to PDE
\[\begin{align} \frac{\partial c}{\partial t} &= D \frac{\partial^2 c}{\partial x^2} \\ \frac{\partial c}{\partial \eta} &= -\frac{\eta}{2}\frac{\partial^2 c}{\partial \eta^2} \end{align}\]Step 1: Let \(u = \frac{\partial c}{\partial \eta}\)
\[ u = C_1 \exp(-\frac{1}{4} \eta^2) \]
Step 2: integrate \(u = \frac{\partial c}{\partial \eta}\)
\[ c(\eta) = K_1 + K_2 \operatorname{erf}(\frac{\eta}{2}) \\ \]
where \(\operatorname{erf}(\xi) = \frac{2}{\sqrt{\pi}} \int_0^\xi e^{-x^2} dx\) is the error function
Step 3: fit initial condition and boundary conditions (the hardest part!)
How do the solution look like?
Geometry: \(x\ge 0\)
I.C.
Solution form
\[ c(x,t)=\frac{c_L + c_R}{2} + \frac{c_L-c_R}{2}\,\operatorname{erf}\left(\frac{x}{\sqrt{4Dt}}\right) \]
How do we get here?
Notes: “line source” can be built from two semi-infinite problems. For a line source with concentration \(c_0\) and thickness \(\delta\), solution \(c(x, t)\) follows
\[ c(x, t) = c_1(x, t) + c_2(x, t) \]
Idea:
is obtained by superposition and is valid under the following conditions:
Initial conditions
\[ c(x,0)=N\,\delta(x) \]
Solution (thin-film limit)
\[ c(x,t)=\frac{N}{\sqrt{4\pi Dt}} \exp\left(-\frac{x^2}{4Dt}\right) \]
\[ \sigma^2 = 2Dt \]
So width \(\sigma\sim\sqrt{2Dt}\).
Define
\[ \operatorname{erf}(z)=\frac{2}{\sqrt{\pi}}\int_0^{z}e^{-s^2}\,ds \]
and
\[ \operatorname{erfc}(z)=1-\operatorname{erf}(z) \]
These appear in semi-infinite diffusion solutions.
Finite step (width \(\Delta x\)) can be treated as
\(c\) is separabile across axes!
For 3D infinite space
\[ c(x,y,z,t)=\frac{N}{(4\pi Dt)^{3/2}} \exp\left(-\frac{x^2+y^2+z^2}{4Dt}\right) \]
Because diffusion equation is linear (for constant \(D\))
Hard part
Used often for finite domains
Assume product form
\[ c(x,t)=X(x)\,T(t) \]
Substitute into
\[ \frac{\partial c}{\partial t}=D\frac{\partial^2 c}{\partial x^2} \]
gives
\[ \frac{1}{DT}\frac{dT}{dt}=\frac{1}{X}\frac{d^2X}{dx^2}=-\lambda^2 \]
Time ODE
\[ \frac{dT}{dt}=-\lambda^2 D\,T \Rightarrow T(t)=\exp(-\lambda^2 Dt) \]
Space ODE
\[ \frac{d^2X}{dx^2}+\lambda^2 X=0 \]
Solutions depend on BCs (sine/cosine, etc.).
Physical meaning in notes
Superposition over modes
\[ c(x,t)=\sum_{n=0}^{\infty} A_n X_n(x)\,e^{-\lambda_n^2Dt} \]
Coefficients \(A_n\) from initial condition projection.
Notes: convert time-dependence into algebraic parameter \(p\)
Define
\[ \hat c(x,p)=\mathcal{L}\{c(x,t)\} =\int_{0}^{\infty} e^{-pt}c(x,t)\,dt \]
Laplace transform replaces time derivative with initial-value term.
Using integration by parts (as in notes)
\[ \mathcal{L}\left\{\frac{\partial c}{\partial t}\right\} = p\hat c(x,p) - c(x,0) \]
Spatial derivatives remain derivatives in \(x\):
\[ \mathcal{L}\left\{\frac{\partial^2 c}{\partial x^2}\right\} =\frac{\partial^2 \hat c}{\partial x^2} \]
Transform
\[ \frac{\partial c}{\partial t}=D\frac{\partial^2 c}{\partial x^2} \]
becomes
\[ p\hat c(x,p)-c(x,0)=D\frac{\partial^2 \hat c}{\partial x^2} \]
Now an ODE in \(x\) (parameter \(p\)).
From notes example
Boundary conditions in Laplace domain
\[ \hat c(0,p)=\frac{c_0}{p}, \qquad \hat c(\infty,p)=0 \]
With \(c(x,0)=0\), equation reduces to
\[ D\frac{\partial^2 \hat c}{\partial x^2}-p\hat c=0 \]
General solution
\[ \hat c(x,p)=A e^{+\sqrt{p/D}\,x}+B e^{-\sqrt{p/D}\,x} \]
Semi-infinite boundedness ⇒ \(A=0\).
At \(x=0\)
\[ \hat c(0,p)=B=\frac{c_0}{p} \]
So
\[ \hat c(x,p)=\frac{c_0}{p}\exp\left(-\sqrt{\frac{p}{D}}\,x\right) \]
Inverse Laplace yields the erfc solution (notes)
\[ c(x,t)=c_0\,\operatorname{erfc}\left(\frac{x}{2\sqrt{Dt}}\right) \]
Interpretation
From your sketch (page 17)
Conceptual plots