Langevin Equation

The Langevin equation provides the foundational stochastic differential equation (SDE) for modelling noisy dynamics in urban systems. We derive it from microscopic jump processes, explore the Itô and Stratonovich interpretations, and simulate noise-induced transitions in bistable urban potentials.

1. From Master Equation to Langevin

Consider a continuous-time random walk on a lattice with spacing \(\Delta x\). The probability \(P(n, t)\) of being at site \(n\) obeys the master equation:

$$\frac{\partial P(n,t)}{\partial t} = W_{n-1 \to n} P(n-1,t) + W_{n+1 \to n} P(n+1,t) - (W_{n \to n-1} + W_{n \to n+1}) P(n,t)$$

where \(W_{m \to n}\) are transition rates. Setting \(x = n \Delta x\) and performing a Kramers-Moyal expansion (Taylor expand the transition probabilities to second order in \(\Delta x\)):

$$\frac{\partial P(x,t)}{\partial t} = -\frac{\partial}{\partial x}\bigl[a_1(x) P\bigr] + \frac{1}{2}\frac{\partial^2}{\partial x^2}\bigl[a_2(x) P\bigr] + \mathcal{O}(\Delta x^3)$$

where the jump moments are:

$$a_k(x) = \lim_{\Delta t \to 0} \frac{1}{\Delta t} \langle (\Delta x)^k \rangle_x = \int (x' - x)^k \, W(x'|x) \, dx'$$

Truncating at second order gives the Fokker-Planck equation. The equivalent stochastic process at the individual trajectory level is the Langevin equation:

$$dx = a(x)\,dt + b(x)\,dW_t$$

where \(a(x) = a_1(x)\) is the drift coefficient,\(b(x) = \sqrt{a_2(x)}\) is the diffusion coefficient, and \(W_t\) is the standard Wiener process with \(\langle dW_t \rangle = 0\) and\(\langle dW_t^2 \rangle = dt\).

2. Properties of the Wiener Process

The Wiener process \(W_t\) (Brownian motion) has the following properties:

  • \(W_0 = 0\)
  • Independent increments: \(W_t - W_s\) is independent of \(\{W_u : u \leq s\}\) for \(t > s\)
  • Gaussian increments: \(W_t - W_s \sim \mathcal{N}(0, t-s)\)
  • Continuous but nowhere differentiable paths

The crucial property for stochastic calculus is the quadratic variation:

$$(dW_t)^2 = dt, \qquad dW_t \cdot dt = 0, \qquad (dt)^2 = 0$$

These "Itô calculus rules" are the foundation of all subsequent manipulations. The fact that \((dW)^2 = dt\) rather than zero (as in ordinary calculus) is what makes stochastic calculus fundamentally different.

3. Itô vs Stratonovich Interpretation

The SDE \(dx = a\,dt + b\,dW\) is ambiguous when \(b\) depends on \(x\). The two standard interpretations differ in how the stochastic integral is evaluated:

Itô Interpretation

Evaluate the integrand at the left endpoint:

$$\int_0^T b(x_t)\,dW_t \approx \sum_k b(x_{t_k})(W_{t_{k+1}} - W_{t_k})$$

This gives a martingale: \(\langle \int b \, dW \rangle = 0\).

Stratonovich Interpretation

Evaluate at the midpoint:

$$\int_0^T b(x_t) \circ dW_t \approx \sum_k b\!\left(\frac{x_{t_k} + x_{t_{k+1}}}{2}\right)(W_{t_{k+1}} - W_{t_k})$$

The ordinary chain rule applies, but the integral is no longer a martingale.

The two are related by a drift correction:

$$dx = a_S \, dt + b \circ dW_t = \underbrace{\left(a_S - \frac{1}{2}b\frac{db}{dx}\right)}_{a_I} dt + b \, dW_t$$

where \(a_S\) is the Stratonovich drift and \(a_I\) is the Itô drift. The noise-induced drift \(-\frac{1}{2}b b'\) is called the spurious drift or noise-induced drift.

4. Itô's Lemma

The chain rule for stochastic calculus. If \(x_t\) satisfies the Itô SDE \(dx = a\,dt + b\,dW\) and \(f(x,t)\) is a twice-differentiable function, then:

$$df = \left(\frac{\partial f}{\partial t} + a\frac{\partial f}{\partial x} + \frac{1}{2}b^2 \frac{\partial^2 f}{\partial x^2}\right)dt + b\frac{\partial f}{\partial x}\,dW_t$$

Derivation

Taylor expand \(f(x + dx, t + dt)\) to second order:

$$df = f_t \, dt + f_x \, dx + \frac{1}{2}f_{xx}(dx)^2 + f_{xt}\,dx\,dt + \cdots$$

Substitute \(dx = a\,dt + b\,dW\):

$$(dx)^2 = (a\,dt + b\,dW)^2 = a^2(dt)^2 + 2ab\,dt\,dW + b^2(dW)^2$$

Apply the Itô rules: \((dt)^2 = 0\), \(dt \cdot dW = 0\),\((dW)^2 = dt\):

$$(dx)^2 = b^2 \, dt$$

Collecting terms of order \(dt\) and \(dW\) yields the lemma. The \(\frac{1}{2}b^2 f_{xx}\) term -- absent in ordinary calculus -- is the hallmark of stochastic calculus and arises directly from \((dW)^2 = dt \neq 0\).

5. Euler-Maruyama Simulation

The simplest numerical scheme for an Itô SDE is the Euler-Maruyama method:

$$x_{n+1} = x_n + a(x_n)\,\Delta t + b(x_n)\,\Delta W_n, \qquad \Delta W_n \sim \mathcal{N}(0, \Delta t)$$

The strong order of convergence is \(1/2\) and the weak order is \(1\). For the Stratonovich interpretation, we use the Heun method(predictor-corrector):

$$\tilde{x}_{n+1} = x_n + b(x_n)\,\Delta W_n$$

$$x_{n+1} = x_n + a(x_n)\,\Delta t + \frac{1}{2}\bigl[b(x_n) + b(\tilde{x}_{n+1})\bigr]\,\Delta W_n$$

We now simulate Langevin dynamics in a bistable urban potential, modelling a city that can exist in two stable states (e.g., high-density vs low-density equilibrium).

Langevin Dynamics: Euler-Maruyama and Ito vs Stratonovich

Python
script.py135 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

6. Noise-Induced Transitions

In the bistable potential, noise enables transitions between the two stable states. The mean transition time is given by Kramers' escape rate:

$$\tau_{\text{escape}} \sim \frac{2\pi}{\sqrt{|V''(x_{\text{unstable}})| \cdot V''(x_{\text{stable}})}} \exp\!\left(\frac{2\Delta V}{\sigma^2}\right)$$

where \(\Delta V = V(x_{\text{unstable}}) - V(x_{\text{stable}})\) is the barrier height. For our potential \(V(x) = x^4/4 - x^2/2\):

  • Stable points: \(x_{\pm} = \pm 1\), with \(V(\pm 1) = -1/4\)
  • Unstable point: \(x_0 = 0\), with \(V(0) = 0\)
  • Barrier height: \(\Delta V = 1/4\)
  • \(V''(\pm 1) = 2\), \(V''(0) = -1\)

$$\tau_{\text{escape}} \sim \frac{2\pi}{\sqrt{2}} \exp\!\left(\frac{1}{2\sigma^2}\right)$$

For urban systems, this means that a city in one equilibrium (e.g., sprawl) will spontaneously transition to another (e.g., compact) only on exponentially long timescales unless external shocks push it over the barrier. The noise amplitude \(\sigma\) represents the intensity of random perturbations (economic shocks, policy changes, migration waves).