27.1 Meet the Fokker-Planck Equation
Let’s start with a general way to express a stochastic differential equation:
dx=a(x,t)dt+b(x,t)dW(t)
The “solution” to this SDE will be a probability density function f(x,t). Our goal is to have a function that describes the evolution of f(x,t) in both time and space. Based on our work with birth-death processes, the probability density function f(x,t) should have the following properties:
- E[f(x,t)] is the deterministic solution to dxdt=a(x,t).
- Var[f(x,t)] is proportional to b(x,t).
We determine the probability density function through solution of the following differential equation, which is called the Fokker-Planck Equation:
∂f∂t=−∂∂x(f(x,t)⋅a(x,t))+12∂2∂x2(f(x,t)⋅(b(x,t))2)
We can write this equation in shorthand, dropping the dependence of x and t for f(x,t), a(x,t) and b(x,t): ft=−(f⋅a)x+12(f⋅b2)xx.
Solution. In this case a(x,t)=0 and b(x,t)=1, so the Fokker-Planck Equation is:
ft=σ22fxx.
This equation should look familiar - it is the partial differential equation for diffusion!11 The solution to this SDE is given by Equation (27.1).
f(x,t)=1√2πσ2te−x2/(2σ2t)
I didn’t mention the initial condition for Equation (27.1). For this SDE the initial condition is a special function called the Dirac delta Function. We denote the Diract delta function as δ(x). This function is a special type of probability density function, which you may study in a courses such as Functional Analysis (or Analysis). We can plot the evolution of this solution in Figure 27.1:

Figure 27.1: The solution to SDE dx=dW(t).
Now that we have a handle on the SDE dx=dW(t), let’s extend this next example a little more.
27.1.1 Another Fokker-Planck Equation
Consider the SDE dx=rdt+σdW(t), where r and σ are constants. As a first step, let’s take a look at the deterministic equation: dx=rdt. This is the differential equation dxdt=r, which has a linear function x(t)=rt+x0 as its solution.
We will apply the Fokker-Planck equation to characterize the solution f(x,t). In this case, the Fokker-Planck equation is
ft=−rfx+σ22fxx
Equation (27.2) is an example of a diffusion-advection equation. Amazingly this equation can be reduced to a diffusion equation through a change of variables and application of the multivariable change of variables. Let’s get to work to figure this out.
First, let z=x−rt and τ=t. This change of variables may seem odd, but our goal here is to write f(x,t)=f(z,τ) and to develop expressions for ft fx, and fxx with this change of variables. But in order to do that, we will need to apply the multivariate chain rule (see Figure 27.2).

Figure 27.2: Multivariable chain rule
By the multivariable chain rule we can develop expressions for ft and fx:
∂f∂t=∂f∂τ⋅∂τ∂t+∂f∂z⋅∂z∂t∂f∂x=∂f∂z⋅∂z∂x
Now let’s consider the partial derivatives ∂τ∂t, ∂z∂t, and ∂z∂x.
Remember that z=x−rτ. By direct differentiation zτ=−r and zx=1. Also since τ=t then τt=1. With these substitutions, we can now re-write ft and fxx:
∂f∂t=∂f∂τ⋅∂τ∂t+∂f∂z⋅∂z∂t=∂f∂τ−r∂f∂z∂f∂x=∂f∂z→∂2f∂x2=∂2f∂z2
So if we re-write our original Fokker-Planck equation with the variables z and τ we have:
ft=−rfx+σ22fxxfτ−rfz=−rfz+σ22fzzfτ=σ22fzz
Ok: I’ll admit that doing change of variables may seem like it doesn’t help the situation. But guess what: with this change of variables our Fokker-Planck equation becomes a diffusion equation in the variables z and τ! So if we can write down the solution with the variables z and τ, we can write the solution f(x,t)! Here how we do this: f(z,τ)=1√2πσ2τe−z2/(2σ2τ), and then transform back into the original variables x and t:
f(x,t)=1√2πσ2te−(x−rt)2/(2σ2t)
Now that we have an equation, next let’s visualize the solution. Let’s take a look at some representative plots in Figure 27.3:

Figure 27.3: Representative plots for the solution to the SDE dx=rdt+σdW(t).
Based on what we know of this distribution is that it should look like a normal distribution with mean μ=rt and variance σ2t. What the mean and variance tells us that the mean is shifting and growing more diffuse as time increases. Remember that our solution to the deterministic equation was linear, and the mean of our distribution grows linearly as well!
Also notice in Figure 27.3 as t increases the solution shifts (“advects”) to the right. The differential equation is an example of a diffusion-advection equation, or a solution that drifts as time increases.
The examples we study here are just a few examples of how to build a deeper understanding of stochastic processes and differential equations. There is a lot of power in understanding the theoretical distribution for some test cases. Stochastic differential equations is a fascinating field of study with a lot of interesting mathematics - I hope what you learned here will make you want to study it further!
To remind you, the solution to pt=Dpxx is p(x,t)=1√4πDte−x2/(4Dt). So in this case D=σ2/2.↩︎