# Diffusion equation

The diffusion equation is a partial differential equation which describes density dynamics in a material undergoing diffusion. It is also used to describe processes exhibiting diffusive-like behaviour, for instance the 'diffusion' of alleles in a population in population genetics.

## Statement

The equation is usually written as:

where ϕ(r, t) is the density of the diffusing material at location r and time t and D(ϕ, r) is the collective diffusion coefficient for density ϕ at location r; and ∇ represents the vector differential operator del. If the diffusion coefficient depends on the density then the equation is nonlinear, otherwise it is linear.

More generally, when D is a symmetric positive definite matrix, the equation describes anisotropic diffusion, which is written (for three dimensional diffusion) as:

If D is constant, then the equation reduces to the following linear differential equation:

${\frac {\partial \phi ({\mathbf {r} },t)}{\partial t}}=D\nabla ^{2}\phi ({\mathbf {r} },t),$ also called the heat equation.

## Historical origin

The particle diffusion equation was originally derived by Adolf Fick in 1855.

## Derivation

The diffusion equation can be derived in a straightforward way from the continuity equation, which states that a change in density in any part of the system is due to inflow and outflow of material into and out of that part of the system. Effectively, no material is created or destroyed:

${\frac {\partial \phi }{\partial t}}+\nabla \cdot \mathbf {j} =0,$ where j is the flux of the diffusing material. The diffusion equation can be obtained easily from this when combined with the phenomenological Fick's first law, which states that the flux of the diffusing material in any part of the system is proportional to the local density gradient:

$\mathbf {j} =-D(\phi ,\mathbf {r} )\,\nabla \phi (\mathbf {r} ,t).$ If drift must be taken into account, the Smoluchowski equation provides an appropriate generalization.