# Fokker-Planck and Langevin's equations

In studying the diffusion equation we have neglected the possible presence of any external force. We could ask, however, what happens if we include them; as we will see here, we will obtain the so called Fokker-Planck equation. So, let's go back to the beginning and start with the same assumptions we made in The diffusion equation, with the difference that this time we also include an external force $F$ . Therefore if $x(t)$ is the position of the particle at time $t$ , after a little time interval $\Delta t$ it will be:

$x(t+\Delta t)=x(t)+\ell (t)+F\gamma \Delta t$ where $\gamma$ is the so called mobility of the particles.

Depending on the nature of the system, the expression of the mobility $\gamma$ can vary. For example, if our particles are diffusing through a dense fluid, the mobility will be essentially related to the viscosity of the fluid itself; in fact, it is a known fact that the equation of motion of a body in a fluid is (in one dimension):

$m{\ddot {x}}=F-k\eta v$ where $v={\dot {x}}$ is the velocity of the body, $\eta$ the viscosity of the fluid and $k$ a geometric factor (for example, from Stokes's law in the case of spherical bodies we have $k=6\pi r$ , with $r$ the radius of the sphere). In this case if $F$ is constant the body will rapidly acquire a drift velocity:
${\ddot {x}}=0\quad \Rightarrow \quad {\dot {x}}=v_{\infty }={\frac {F}{k\eta }}\quad \Rightarrow \quad x(t+\Delta t)=x(t)+{\frac {F}{k\eta }}\Delta t$ so in the case of particles diffusing through a viscous fluids we have $\gamma =1/k\eta$ . On the other hand, in the case of a dilute fluid, supposing again that $F$ is constant (or equivalently that the free mean path of the particles is much smaller than the scales over which $F$ varies) we will have:
$x(t+\Delta t)=x(t)+{\frac {1}{2}}\Delta t^{2}{\frac {F}{m}}$ where we are only considering the drift due to $F$ (we have neglected the possible term $v\Delta t$ , where $v$ is the velocity of the particle after a scattering, since it is isotropic and so it does not contribute to the net displacement of the particles). Now, since $D=a^{2}/2\Delta t$ :
${\frac {1}{2}}\Delta t^{2}{\frac {F}{m}}={\frac {1}{2}}\Delta t^{2}{\frac {F}{m}}{\frac {2\Delta tD}{a^{2}}}={\frac {F\Delta t}{m(a/\Delta t)^{2}}}D:=F\gamma \Delta t$ and remembering also that ${\textstyle \left\langle \ell \right\rangle =a^{2}}$ , so that the mean displacement after a scattering is ${\textstyle \Delta x={\sqrt {\left\langle \ell ^{2}\right\rangle }}=a}$ and therefore ${\textstyle (a/\Delta t)^{2}=\left\langle v^{2}\right\rangle }$ (the mean square velocity of the particles) we have:
$\gamma ={\frac {D}{m\left\langle v^{2}\right\rangle }}={\frac {D}{2E_{\text{kin}}}}$ where of course $E_{\text{kin}}$ is the kinetic energy of the particles.

Now that we also know what the mobility is, we can proceed to determine how the diffusion equation changes with the presence of the external and static force $F$ . Consider an arbitrary function $f(x)$ ; then:

$\left\langle f(x(t))\right\rangle =\int \rho (x,t)f(x)dx$ Therefore, computing $\left\langle f(x(t+\Delta t))\right\rangle$ we get:
{\begin{aligned}\left\langle f(x(t+\Delta t))\right\rangle =\left\langle f(x(t)+\ell +F\gamma \Delta t)\right\rangle \quad \Rightarrow \\\Rightarrow \quad \int \rho (x,t+\Delta t)f(x)dx=\int \rho (x,t)f(x+\ell +\gamma F\Delta t)\chi (\ell )dxd\ell \end{aligned}} where the presence of $\chi (\ell )$ and the integration over $\ell$ are due to the fact that at time $t+\Delta t$ the coordinate $x$ will be equal to $x+\ell +\gamma F\Delta t$ with probability $\chi (\ell )$ (just like we have seen in the derivation of the diffusion equation in The diffusion equation). Since $\Delta t$ and $\ell$ are small, we can expand $f$ in the right hand side:

{\begin{aligned}\int \rho (x,t+\Delta t)f(x)dx=\\=\int \chi (\ell )\rho (x,t)\left[f(x)+{\frac {\partial f}{\partial x}}(\gamma F\Delta t+\ell )+{\frac {1}{2}}{\frac {\partial ^{2}f}{\partial x^{2}}}(\gamma F\Delta t+\ell )^{2}+\cdots \right]dxd\ell =\\=\int \rho (x,t)\left[f(x)+{\frac {\partial f}{\partial x}}\gamma F\Delta t+{\frac {\partial f}{\partial x}}\left\langle \ell \right\rangle +{\frac {1}{2}}{\frac {\partial ^{2}f}{\partial x^{2}}}(\gamma F\Delta t)^{2}+\right.\\\left.+{\frac {\partial ^{2}f}{\partial x^{2}}}\gamma F\Delta t\left\langle \ell \right\rangle +{\frac {1}{2}}{\frac {\partial ^{2}f}{\partial x^{2}}}\left\langle \ell ^{2}\right\rangle +\cdots \right]dx\end{aligned}} Neglecting all the higher order terms and remembering that $\left\langle \ell \right\rangle =0$ and $\left\langle \ell ^{2}\right\rangle =a^{2}$ , we get:
$\int \rho (x,t+\Delta t)f(x)dx=\int \rho (x,t)\left(f(x)+\gamma F\Delta t{\frac {\partial f}{\partial x}}+{\frac {a^{2}}{2}}{\frac {\partial ^{2}f}{\partial x^{2}}}\right)dx$ Integrating by parts:
{\begin{aligned}\int \rho (x,t+\Delta t)f(x)dx=\int f(x)\left(\rho -\gamma \Delta t{\frac {\partial }{\partial x}}(F\rho )+{\frac {a^{2}}{2}}{\frac {\partial ^{2}\rho }{\partial x^{2}}}\right)dx+\\+\left.\rho (x,t)f(x)F\gamma \Delta t\right|_{-\infty }^{+\infty }+{\frac {a^{2}}{2}}\left.\left(\rho (x,t){\frac {\partial f}{\partial x}}+{\frac {\partial \rho }{\partial x}}f(x)\right)\right|_{-\infty }^{+\infty }\end{aligned}} Assuming that $\rho$ and $\partial \rho /\partial x$ vanish sufficiently fast at infinity, the last two terms are null so that we are left with:
$\int \rho (x,t+\Delta t)f(x)dx=\int f(x)\left(\rho -\gamma \Delta t{\frac {\partial }{\partial x}}(F\rho )+{\frac {a^{2}}{2}}{\frac {\partial ^{2}\rho }{\partial x^{2}}}\right)dx$ Since $f(x)$ is arbitrary, this equality holds if the remaining part of the integrands are equal; therefore, dividing also by $\Delta t$ :
${\frac {\rho (x,t+\Delta t)-\rho (x,t)}{\Delta t}}=-\gamma {\frac {\partial }{\partial x}}(\rho F)+{\frac {a^{2}}{2\Delta t}}{\frac {\partial ^{2}\rho }{\partial x^{2}}}$ and taking the limits $a\to 0$ and $\Delta t\to 0$ with $a^{2}/2\Delta t=D={\text{const.}}$ , we have:
${\frac {\partial }{\partial t}}\rho (x,t)={\frac {\partial }{\partial x}}\left(-\gamma \rho (x,t)F+D{\frac {\partial }{\partial x}}\rho (x,t)\right)$ This is the so called Fokker-Planck equation, while ${\textstyle x(t+\Delta t)=x(t)+\ell (t)+F\gamma \Delta t}$ is Langevin's equation.

Let us note that this is still compatible with a continuity equation, but this time the flow of particles is given (in three dimensions) by:

${\vec {J}}=\gamma \rho {\vec {F}}-D{\vec {\nabla }}\rho$ where the first term is the flow due to the external force, while the second one is the usual diffusive term due to the density inhomogeneities of the system.

Just to see the Fokker-Planck equation at work in a very simple case, let us determine its stationary solution $\rho ^{*}(x)$ when $F$ is a uniform gravitational force, with $x$ being the vertical coordinate (which is the only significant one; we assume that the positive $x$ direction is that pointing downwards); since $F=mg$ (with $m$ the mass of the particles), then $\partial \rho ^{*}/\partial t=0$ if:

$-\rho ^{*}\gamma mg+D{\frac {\partial \rho ^{*}}{\partial x}}=0\quad \Rightarrow \quad \rho ^{*}(x)=e^{{\frac {m\gamma g}{D}}x}\rho ^{*}(0)=e^{-{\frac {\gamma }{D}}U(x)}\rho ^{*}(0)$ where $U(x)=-mgx$ is the gravitational potential.

1. Of course, we could have equivalently solved the equation from a direct application of , namely from $-\gamma mg\partial \rho ^{*}/\partial x+D\partial ^{2}\rho ^{*}/\partial x^{2}=0$ .