Emergence of the exponential solution in diffusion

Rigorous mathematical derivation and interactive simulation showing how the gaussian exponential kernel arises from Fick's second law

Time progression
Elapsed diffusion time (t) 0.00 s
Physical parameters
Diffusion coefficient (D) 2.00 µm²/s
Initial pulse width (σ₀) 1.20 µm
Visual overlays
Physical space: concentration along diffusion axis, C(z, t)
Analytical gaussian
Numerical solution
Initial pulse (t = 0)
Similarity space: Boltzmann transform, f(η) = exp(−η²)
Similarity kernel: exp(−η²)
Selected probe coordinate
Step 1: Governing partial differential equation

In one dimension, non-steady-state mass diffusion is governed by Fick's second law with constant diffusivity D:

∂C / ∂t = D × (∂²C / ∂z²)

Because there is no inherent spatial scale imposed by an infinite boundary condition, dimensional analysis dictates that position z and time t must combine into an invariant similarity group.

Step 2: Boltzmann similarity transformation

We introduce the dimensionless similarity variable η:

η = z / [2 √(D t)]

Applying the chain rule to the partial derivatives with respect to t and z:

∂η / ∂t = −z / [4 √(D) t^(3/2)] = −η / (2 t)
∂η / ∂z = 1 / [2 √(D t)]

Expressing the partial derivatives of concentration C(η) using ∂C/∂t = (dC/dη) × (∂η/∂t) yields:

∂C / ∂t = −(η / 2t) × (dC / dη)
∂C / ∂z = [1 / (2 √(Dt))] × (dC / dη)
∂²C / ∂z² = [1 / (4 D t)] × (d²C / dη²)
Step 3: Reduction to an ordinary differential equation

Substituting these transformed partial derivatives back into Fick's second law:

−(η / 2t) × (dC / dη) = D × [1 / (4 D t)] × (d²C / dη²)
−2 η × (dC / dη) = d²C / dη²

Rearranging into canonical form completely removes explicit time t, reducing the PDE to an invariant ODE:

d²C / dη² + 2 η (dC / dη) = 0
Step 4: First integration yielding the exponential function

Let p(η) = dC/dη. The equation becomes first-order separable:

dp / dη = −2 η p
dp / p = −2 η dη
ln(p) = −η² + c₁
p(η) = dC / dη = A × exp(−η²)
Key mathematical takeaway: The exponential function exp(−η²) is not an arbitrary choice or empirical curve; it is the unique mathematical consequence of integrating the linear factor (−2η) generated directly by the similarity chain rule ∂η/∂t.
Step 5: Second integration and mass conservation

Integrating p(η) gives the complementary error function for step boundaries, or the fundamental Gaussian kernel for point sources under total mass conservation:

C(z, t) = [M / √(4 π D t)] × exp(−z² / (4 D t))

When starting from a finite pulse of initial width σ₀ at zero time, the variance broadens linearly with time as σ²(t) = σ₀² + 2Dt, approaching the exact fundamental exponential kernel smoothly without any singularity at t = 0.