Tutorials › Stochastic Calculus › Deriving Stationary Densities from the Fokker-Planck Equation

Stability, Invariant Measures and Long-Time Behavior · Tutorial 280 of 600

Deriving Stationary Densities from the Fokker-Planck Equation

Learn how probability current leads from the stationary Fokker–Planck equation to the zero-current density formula, and how to check and normalize the resulting candidates.

Advanced 12 min read

What You'll Learn

  • Derive the Fokker–Planck equation from the generator using Itô’s formula.
  • Express the stationary equation as constancy of probability current.
  • Solve the zero-current equation for a one-dimensional diffusion.
  • Identify when the formal solution can be normalized as a probability density.
  • Check candidate densities directly by computing their probability current.
  • Distinguish a stationary-equation solution from a proof of invariance.

From Probability Flow to a Stationary Density

A stationary density is a probability density that does not change with time under the diffusion. The Fokker–Planck equation describes how a density evolves; at stationarity, it says that the probability current is constant in space. Setting that current to zero gives a first-order differential equation whose solution is the familiar one-dimensional density formula. The zero-current condition is an additional choice: stationarity alone implies constant current, not necessarily zero current.

Throughout, work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a standard Brownian motion \(B_t\). Consider a nonexplosive solution, taking values in an open interval \(I\subseteq\mathbb{R}\), of \(dX_t=b(X_t)\,dt+\sigma(X_t)\,dB_t\). Here \(b\) is the drift coefficient, \(\sigma\) is the diffusion coefficient, and \(a(x)=\sigma(x)^2\). Assume for the density derivation that \(b\) and \(\sigma\) are locally regular enough for the displayed derivatives and integrals to exist, and that a classical density \(p(t,x)\) exists and has the derivatives used below. In the formula for a zero-current density, assume \(a(x)>0\) and \(b,a\) are continuous on \(I\).

Every Itô integral here is understood with an adapted, progressively measurable integrand in \(\mathcal{L}^2\) on the time interval in question: \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\). For the test-function calculation below, \(H_s=\varphi'(X_s)\sigma(X_s)\); if \(\varphi\) is smooth with compact support and \(\sigma\) is locally bounded, this integrand is bounded and hence satisfies that condition.

Definition: A stationary density is a nonnegative density \(p\) with \(\int_I p(x)\,dx=1\) such that, when \(X_0\) has density \(p\), \(X_t\) has density \(p\) for every \(t\ge0\). A solution of the stationary Fokker–Planck equation is a density-shaped function satisfying the stationary differential equation; this equation alone does not establish that it is an invariant probability density.

Deriving the Stationary Probability-Current Equation

For a smooth compactly supported test function \(\varphi\), Itô’s formula has \(f'(x)=\varphi'(x)\) and \(f''(x)=\varphi''(x)\), and gives

$$ d\varphi(X_t) = \varphi'(X_t)b(X_t)\,dt +\varphi'(X_t)\sigma(X_t)\,dB_t +\tfrac12\varphi''(X_t)\sigma(X_t)^2\,dt. $$

The stochastic integral has mean zero: its integrand is progressively measurable and square-integrable, so the Itô integral is a square-integrable martingale. Taking expectations and using the density of \(X_t\) yields the weak form of the Fokker–Planck equation. Integration by parts, with no boundary terms because \(\varphi\) has compact support in \(I\), gives the classical equation when \(p\) is sufficiently smooth.

$$ \partial_t p(t,x) = -\frac{\partial}{\partial x}\big(b(x)p(t,x)\big) +\frac12\frac{\partial^2}{\partial x^2}\big(a(x)p(t,x)\big). $$

Define the probability current \(J(t,x)\) as the net density flow to the right: drift transports density at rate \(bp\), while diffusion contributes the derivative term below. Then the Fokker–Planck equation is a conservation law.

Definition: The probability current associated with a density \(p(t,x)\) is \(J(t,x)=b(x)p(t,x)-\tfrac12\frac{\partial}{\partial x}(a(x)p(t,x))\). With this definition, the Fokker–Planck equation is \(\partial_t p=-\partial_x J\).
Proposition: If \(p(t,x)=p(x)\) is a classical stationary density on a connected interval \(I\), then its probability current is constant on \(I\).

Proof. Stationarity makes \(\partial_t p=0\). Substituting into the conservation equation gives \(\partial_xJ(x)=0\) throughout \(I\). A differentiable function with zero derivative on a connected interval is constant there, so \(J(x)=j\) for some constant \(j\). This argument does not imply \(j=0\); that value requires a zero-current condition, often motivated by the boundary behavior of a particular model. \(\square\)

Solving the Zero-Current Equation

Now impose \(J(x)=0\). This is the stationary probability-current equation with zero flux, and it reduces to an ordinary differential equation. Fix any reference point \(x_0\in I\).

Theorem: Suppose \(a=\sigma^2>0\) and \(a,b\) are continuous on a connected interval \(I\). The nonzero, nonnegative solutions of the zero-current equation are exactly the positive constant multiples of \(a(x)^{-1}\exp\!\left(\int_{x_0}^{x}\frac{2b(y)}{a(y)}\,dy\right)\). Such a solution is a probability density on \(I\) precisely when its integral over \(I\) is finite; in that case its normalizing constant is the reciprocal of that integral.

Proof. The equation \(J=0\) means \(bp-\tfrac12(ap)'=0\), or \((ap)'=(2b/a)(ap)\). Set \(q=ap\), which is positive for any positive solution because \(a>0\). Dividing by \(q\) gives \(q'/q=2b/a\). Integrating from \(x_0\) to \(x\) gives \(q(x)=q(x_0)\exp(\int_{x_0}^{x}2b(y)/a(y)\,dy)\). Dividing by \(a(x)\) proves the stated form with a positive multiplicative constant. Conversely, differentiating that expression gives \((ap)'=(2b/a)(ap)=2bp\), so its current is zero. The identically zero solution is also a solution of the differential equation, but is not a nonzero density. Finally, a positive multiple can have integral one exactly when the displayed function has finite positive integral; choosing its reciprocal as the constant gives total mass one. This proves both directions of the claim. \(\square\)

The formula is local to the interval where \(a>0\); it does not settle how the process behaves at endpoints or whether the candidate density is invariant for the SDE. Those questions require additional boundary and process-level conditions. Also, if a stationary solution has \(J=j\ne0\), it solves a different inhomogeneous first-order equation, so the zero-current formula does not describe every stationary solution.

Worked Densities and Direct Current Checks

Worked Example: A Normalizable Density on the Real Line

Take \(I=\mathbb{R}\), \(b(x)=-x/(1+x^2)\), and \(\sigma(x)=1\). Find the zero-current density and verify its current.

Here \(a(x)=1\), so the exponent in the formula is \(\int_0^x -2y/(1+y^2)\,dy=-\ln(1+x^2)\). Thus the unnormalized candidate is \(1/(1+x^2)\). Its integral is \(\int_{-\infty}^{\infty}(1+x^2)^{-1}\,dx =[\arctan x]_{-\infty}^{\infty}=\pi\), so the normalized candidate is \(p(x)=1/(\pi(1+x^2))\).

To check the current, \(p'(x)=-2x/(\pi(1+x^2)^2)\) and \(b(x)p(x)=-x/(\pi(1+x^2)^2)\). Therefore

$$ J(x)=b(x)p(x)-\tfrac12p'(x) =-\frac{x}{\pi(1+x^2)^2}+\frac{x}{\pi(1+x^2)^2}=0. $$

Check: the density integrates to \(\pi/\pi=1\), and the direct current calculation gives zero for every \(x\). This verifies the stationary zero-current equation; establishing invariance for a diffusion also requires the appropriate process and boundary conditions.

Worked Example: A Uniform Candidate on a Bounded Interval

On \(I=(0,1)\), let \(b(x)=\tfrac12-x\) and \(\sigma(x)=\sqrt{x(1-x)}\). Compute and normalize the zero-current solution, then check the current.

In the interior, \(a(x)=x(1-x)>0\), and \(\frac{2b(x)}{a(x)}=\frac{1-2x}{x(1-x)}=\frac1x-\frac1{1-x}\). An antiderivative is \(\ln x+\ln(1-x)\). The exponential factor is \(x(1-x)\), which cancels the prefactor \(1/a(x)\). Hence the candidate is the constant \(C\). Since \(\int_0^1 C\,dx=C\), normalization gives \(C=1\), so \(p(x)=1\) on \((0,1)\).

For a direct check, \((ap)'=(x(1-x))'=1-2x\). Consequently

$$ J(x)=\left(\tfrac12-x\right)\cdot1-\tfrac12(1-2x) =\tfrac12-x-\tfrac12+x=0. $$

Check: the mass is \(\int_0^1 1\,dx=1\), and the displayed current vanishes throughout the open interval. The calculation is an interior density calculation; the behavior at the endpoints is a separate issue.

Worked Example: A Logarithmic-Scale Candidate

On \(I=(0,\infty)\), take \(b(x)=x(1-\ln x)\) and \(\sigma(x)=x\). Find the normalized zero-current candidate and verify it directly.

Now \(a(x)=x^2\), and \(\frac{2b(x)}{a(x)}=\frac{2(1-\ln x)}{x}\). An antiderivative is \(2\ln x-(\ln x)^2\). Dividing its exponential by \(x^2\) gives the unnormalized function \(\exp(-(\ln x)^2)\).

To normalize, substitute \(y=\ln x\), so \(dx=e^y\,dy\). Completing the square gives

$$ \int_0^\infty e^{-(\ln x)^2}\,dx =\int_{-\infty}^{\infty}e^{-y^2+y}\,dy =e^{1/4}\int_{-\infty}^{\infty}e^{-(y-1/2)^2}\,dy =e^{1/4}\sqrt{\pi}. $$

Thus \(p(x)=e^{-1/4}\pi^{-1/2}\exp(-(\ln x)^2)\). For the current check, logarithmic differentiation gives \(p'(x)/p(x)=-2\ln x/x\). Therefore \((x^2p)'=2xp+x^2p'=2x(1-\ln x)p\), and

$$ J(x)=x(1-\ln x)p(x)-\tfrac12(x^2p(x))'=0. $$

Check: the substitution and Gaussian integral give total mass \(e^{-1/4}\pi^{-1/2}\cdot e^{1/4}\sqrt{\pi}=1\); the derivative check gives zero current.

When the Formula Does Not Give a Probability Density

The formula produces a positive solution of an ordinary differential equation wherever its assumptions hold, but a stationary probability density must also have finite integral. For example, if \(b(x)=\mu\) and \(\sigma(x)=s>0\) on \(\mathbb{R}\), the zero-current solution is proportional to \(\exp(2\mu x/s^2)\). If \(\mu=0\), this is constant and has infinite integral on \(\mathbb{R}\). If \(\mu>0\), it grows as \(x\to\infty\); if \(\mu<0\), it grows as \(x\to-\infty\). None of these cases is normalizable on the whole real line. A formal solution is not automatically an invariant probability density.

A common error is to infer that every stationary density must have zero current. The stationary equation only says \(J'=0\). For instance, replacing that conclusion by \(J=0\) silently discards the possible constant \(j\ne0\). A second error is to use the exponential factor alone and omit \(1/a(x)\). The zero-current equation is \((ap)'=(2b/a)(ap)\), so it is \(ap\), not \(p\), that satisfies the simple logarithmic derivative equation. Both distinctions matter when diffusion varies with position.

StepEquation or testWhat it establishes
Stationarity\(\partial_xJ=0\)Current is constant on the interval
Zero-current choice\(J=0\)First-order equation for \(ap\)
Candidate formula\(p\propto a^{-1}\exp(\int 2b/a)\)Positive solution of the zero-current equation
Normalization\(\int_I p(x)\,dx<\infty\)A probability density can be formed

Check Your Understanding

For each question, distinguish what follows from stationarity alone from what additionally requires zero current or normalization.

  1. Starting from \(\partial_t p=-\partial_xJ\), what conclusion follows about \(J\) when \(p\) is stationary on a connected interval?
  2. For \(a(x)=1\) and \(b(x)=-c\), where \(c>0\), derive the unnormalized zero-current solution. Is it integrable on \(\mathbb{R}\)?
  3. Explain why the factor \(1/a(x)\) appears in the stationary zero-current formula.
  4. For the uniform candidate in the bounded-interval example, compute \(J(x)\) directly from \(bp-\tfrac12(ap)'\).
  5. What additional fact, beyond solving the stationary differential equation, is needed before a positive candidate can be a probability density?