Statistical Mechanics
Langevin Equation
Newton's second law plus a coin flip — how a single noisy line of physics turns molecular chaos into Brownian motion
The Langevin equation is the stochastic equation of motion m dv/dt = -γv + ξ(t): a friction drag plus a random thermal force that model Brownian motion.
- Equationm dv/dt = -γv + ξ(t)
- Noise correlation⟨ξ(t)ξ(t')⟩ = 2γkBT δ(t-t')
- Velocity relaxation timeτ = m/γ
- Diffusion constantD = kBT/γ (Stokes-Einstein)
- Equilibrium check⟨½mv²⟩ = ½kBT
- OriginPaul Langevin, 1908
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Definition
In 1827 the botanist Robert Brown watched pollen grains jitter endlessly in water under his microscope. For eighty years nobody could say why. In 1905 Einstein explained the statistics of the jitter; three years later Paul Langevin wrote down the equation of motion for a single grain — and called his own derivation "infinitely more simple." It is just Newton's second law with one extra term:
m (dv/dt) = -γ·v + ξ(t)
- m (dv/dt) — mass times acceleration, the familiar left-hand side.
- -γ·v — the systematic friction (drag) force. It always opposes motion and drains momentum. For a sphere of radius a in a fluid of viscosity η, Stokes gives γ = 6πηa.
- ξ(t) — the random force: the net effect of ~10²¹ molecular collisions per second, a rapidly fluctuating term with zero average.
The genius is splitting one physical thing — molecular bombardment — into two mathematical pieces: a smooth average (friction) and a fluctuating remainder (noise). Both come from the same molecules, and that shared origin is the whole story.
The fluctuation-dissipation theorem
You cannot choose the friction and the noise independently. The molecules that randomly kick the particle (fluctuation) are the very same molecules that drag it to a halt (dissipation). If you crank up the kicks without increasing the drag, the particle heats up forever; if you increase drag without kicks, it freezes. Equilibrium pins the two together.
The random force is idealized as Gaussian white noise: zero mean and delta-correlated in time,
⟨ξ(t)⟩ = 0
⟨ξ(t)·ξ(t')⟩ = 2·γ·k_B·T·δ(t − t')
The amplitude 2γkBT is not a free parameter — it is forced by demanding that the particle thermalize to the equipartition value ⟨½mv²⟩ = ½kBT per degree of freedom. That single requirement derives the noise strength from the friction γ and the temperature T. This locked relationship is the fluctuation-dissipation theorem (Nyquist 1928, Callen–Welton 1951): noise and dissipation are two faces of one coin.
How it works — solving for the velocity
The velocity equation is a first-order linear stochastic ODE. Its formal solution is an exponentially-weighted memory of every past kick:
v(t) = v(0)·e^(−t/τ) + (1/m)·∫₀ᵗ e^(−(t−s)/τ)·ξ(s) ds, τ = m/γ
The deterministic part decays with the velocity relaxation time τ = m/γ. Squaring and averaging over the noise (using the white-noise correlation above) gives the velocity autocorrelation function:
⟨v(0)·v(t)⟩ = (k_B·T / m)·e^(−|t|/τ)
Two facts fall out immediately. At t = 0 the autocorrelation equals kBT/m, i.e. ⟨v²⟩ = kBT/m, which is exactly equipartition — the equation thermalizes correctly. And the memory of the initial velocity decays exponentially with time constant τ. The particle forgets where it was going after a few multiples of m/γ.
Integrate the autocorrelation twice and you recover the mean-square displacement. At short times the motion is ballistic, ⟨x²⟩ ≈ (kBT/m)·t²; at long times (t ≫ τ) it crosses over to diffusive,
⟨x²(t)⟩ = 2·D·t, with D = k_B·T/γ
That is the Stokes-Einstein relation, obtained without ever touching a partial differential equation — Einstein's 1905 result in three lines of Langevin's algebra.
Worked example — a 1-micron bead in water
Take a polystyrene microsphere of radius a = 0.5 µm in water at room temperature, T = 298 K. Water's viscosity is η ≈ 1.0×10⁻³ Pa·s, the bead density ≈ 1050 kg/m³.
| Quantity | Formula | Value |
|---|---|---|
| Mass | m = (4/3)πa³ρ | ≈ 5.5 × 10⁻¹⁶ kg |
| Friction coefficient | γ = 6πηa | ≈ 9.4 × 10⁻⁹ kg/s |
| Velocity relaxation time | τ = m/γ | ≈ 5.9 × 10⁻⁸ s (~60 ns) |
| Thermal energy | kBT | ≈ 4.1 × 10⁻²¹ J |
| RMS thermal speed | √(kBT/m) | ≈ 2.7 mm/s |
| Diffusion constant | D = kBT/γ | ≈ 4.4 × 10⁻¹³ m²/s |
Now the punchline. The bead's RMS instantaneous speed is a respectable few millimeters per second — but it reverses direction every ~60 nanoseconds. No optical microscope (millisecond shutter, micron resolution) can resolve a 60-ns ballistic flight; you only ever see the smeared-out diffusion. In 1 second the bead's net wander is just √(2Dt) ≈ √(2·4.4×10⁻¹³·1) ≈ 0.94 µm — about one body-length. The particle is sprinting, but it is sprinting in a new random direction millions of times a second, so it gets almost nowhere. That gulf between instantaneous speed and net displacement is the signature of the Langevin world.
Variants and regimes
| Variant | Equation / change | When to use |
|---|---|---|
| Underdamped (full) | m dv/dt = -γv + ξ(t) | Inertia matters: gas-phase aerosols, trapped ions, τ comparable to observation time |
| Overdamped (Brownian) | γ dx/dt = -∂U/∂x + ξ(t) | Set m dv/dt → 0; soft matter, optical traps, biophysics where τ is negligible |
| With external potential | m dv/dt = -γv − ∂U/∂x + ξ(t) | Particle in an optical trap, double-well, harmonic confinement |
| Generalized Langevin | memory kernel ∫ K(t−s)v(s) ds replaces -γv | Colored noise; fluid has memory, collisions not instantaneous |
| Multiplicative noise | noise amplitude depends on x or v | Position-dependent friction; requires Itô vs Stratonovich care |
| Active Langevin | adds self-propulsion velocity v₀ n̂(t) | Active matter: swimming bacteria, Janus colloids |
Integrating it numerically
The delta-correlated noise has a subtle consequence: over a finite step Δt the integrated random force has variance proportional to Δt, so the kick scales as √Δt, not Δt. The simplest scheme, Euler-Maruyama, reads:
// Underdamped Langevin: m dv/dt = -gamma*v + xi(t)
// Euler-Maruyama integration of one trajectory.
function gaussian() { // Box-Muller standard normal
let u = 0, v = 0;
while (u === 0) u = Math.random();
while (v === 0) v = Math.random();
return Math.sqrt(-2 * Math.log(u)) * Math.cos(2 * Math.PI * v);
}
function simulateLangevin({ m, gamma, kBT, dt, steps }) {
let x = 0, v = 0;
// Fluctuation-dissipation: noise variance = 2*gamma*kBT*dt
const noiseAmp = Math.sqrt(2 * gamma * kBT * dt) / m;
const traj = [];
for (let i = 0; i < steps; i++) {
// NOTE the sqrt(dt) hidden in noiseAmp — using dt here zeroes the temperature.
v += (-gamma * v / m) * dt + noiseAmp * gaussian();
x += v * dt;
traj.push({ t: i * dt, x, v });
}
return traj;
}
// 1-micron bead in water, reduced units
const traj = simulateLangevin({ m: 1, gamma: 1, kBT: 1, dt: 0.01, steps: 200000 });
// Verify equipartition: should approach kBT/m = 1
const meanV2 = traj.reduce((s, p) => s + p.v * p.v, 0) / traj.length;
console.log(" =", meanV2.toFixed(3), "(expected 1.000)");
// Verify diffusion: /(2t) should approach D = kBT/gamma = 1
const last = traj[traj.length - 1];
console.log("D_est =", (last.x * last.x / (2 * last.t)).toFixed(3), "(noisy single run)");
A single trajectory's D estimate is wildly noisy — you must average ⟨x²⟩ over an ensemble of independent runs (the interactive above shows ten at once). The equipartition check ⟨v²⟩ → kBT/m converges much faster because it is a time average over one long run.
Where the Langevin equation shows up
- Brownian motion and colloid science. Its founding application — pollen, latex beads, nanoparticle tracking, dynamic light scattering all rest on it.
- Molecular dynamics thermostats. The "Langevin thermostat" couples every atom to a fictitious heat bath to hold a simulation at constant temperature without the artifacts of velocity rescaling.
- Optical-trap and single-molecule biophysics. The overdamped form models a bead in an optical tweezer, DNA stretching, kinesin stepping, and protein folding along a reaction coordinate.
- Johnson-Nyquist noise. In a resistor the "particle" is charge and the friction is resistance R; the fluctuation-dissipation theorem gives the famous thermal voltage noise ⟨V²⟩ = 4kBT·R·Δf.
- Finance and beyond. The Ornstein-Uhlenbeck process — the Langevin equation with a linear restoring force — models mean-reverting interest rates, neuron membrane potentials, and animal foraging.
- Stochastic thermodynamics. Modern fluctuation theorems (Jarzynski, Crooks) are built directly on Langevin trajectories of small driven systems.
Common pitfalls and misconceptions
- Scaling the noise by Δt instead of √Δt. White noise integrates to variance ∝ Δt, so the kick amplitude is √(2γkBT·Δt). Use Δt and you silently simulate T = 0 — the particle just coasts to a halt.
- Treating friction and noise as independent knobs. They are bound by the fluctuation-dissipation theorem. Change γ and you must change the noise amplitude in lockstep, or you leave equilibrium.
- Confusing white noise with the velocity. ξ(t) is delta-correlated (infinite variance, no memory); v(t) is exponentially correlated with finite variance kBT/m. The noise is the input, the velocity is the smoothed output.
- Forgetting the ballistic-to-diffusive crossover. ⟨x²⟩ ∝ t² only for t ≪ τ = m/γ. The clean ⟨x²⟩ = 2Dt holds only at long times; mixing the regimes gives wrong diffusion constants.
- Ignoring the Itô-vs-Stratonovich choice. With multiplicative (state-dependent) noise the two stochastic calculi give physically different answers. For additive noise (the standard Langevin equation) they coincide, so it rarely bites beginners — until they add position-dependent friction.
- Believing the white-noise idealization is exact. Real collisions last ~10⁻¹³ s. If you resolve that timescale the noise is "colored" and you need the generalized Langevin equation with a memory kernel.
Performance and derivation analysis
Why is the Langevin picture so cheap compared to simulating every solvent molecule? A direct molecular-dynamics run of a 1-µm bead in water would track ~10¹¹ water molecules — utterly impossible. The Langevin equation integrates out the solvent, replacing 10¹¹ degrees of freedom with two numbers, γ and T, plus a random-number generator. The cost per step drops from O(N²) pair forces to O(1). That is the entire reason coarse-grained and implicit-solvent simulations exist.
The trade is timestep stability. Because the velocity relaxes over τ = m/γ, an explicit Euler-Maruyama scheme needs Δt ≪ τ for accuracy; in the overdamped regime, where τ is tiny, this is restrictive, and practitioners switch to specialized integrators (BAOAB, the GJF integrator) that remain exact in the harmonic limit even at large Δt. The √Δt noise scaling means error analysis follows strong and weak convergence orders from stochastic calculus, not the ordinary Taylor-series orders of deterministic ODEs: plain Euler-Maruyama is only strong-order 0.5 even though it is weak-order 1.
The deepest payoff is conceptual. By deriving the noise amplitude 2γkBT from the single demand ⟨½mv²⟩ = ½kBT, Langevin showed that thermal fluctuations and dissipation are not separate phenomena to be modeled by hand — they are mathematically inseparable. Every modern fluctuation-dissipation relation, from Johnson noise in resistors to the linear-response theory of Kubo, is a descendant of this one little equation.
Frequently asked questions
What is the Langevin equation?
It is the stochastic Newton's second law for a particle in a fluid: m dv/dt = -γv + ξ(t). The -γv term is the systematic Stokes drag (friction), and ξ(t) is a rapidly fluctuating random force from molecular collisions. It was written by Paul Langevin in 1908 as a remarkably simple alternative to Einstein's 1905 diffusion treatment of Brownian motion, and it reproduces all of Einstein's results in a few lines of algebra.
What is the fluctuation-dissipation theorem in the Langevin equation?
The same molecular collisions that randomly kick the particle (fluctuation) are also what drag it to a stop (dissipation), so the noise strength and the friction cannot be chosen independently. Demanding that the particle reach thermal equilibrium with ⟨½mv²⟩ = ½kBT forces the white-noise correlation to be ⟨ξ(t)ξ(t')⟩ = 2γkBT δ(t-t'). The noise amplitude is locked to both the friction coefficient γ and the temperature T — that linkage is the fluctuation-dissipation theorem.
What is the velocity relaxation time?
It is τ = m/γ, the time over which a velocity perturbation decays by a factor of e. The velocity autocorrelation function falls off as ⟨v(0)·v(t)⟩ = (kBT/m) exp(-|t|/τ). For a 1-micron polystyrene bead in water, γ ≈ 9.4×10⁻⁹ kg/s and m ≈ 5.5×10⁻¹⁶ kg, giving τ ≈ 60 nanoseconds — far shorter than any optical microscope can resolve, which is why the particle looks purely diffusive.
How does the Langevin equation give Einstein's diffusion law?
Multiply the equation by position, average over the noise, and use ⟨½mv²⟩ = ½kBT. At times much longer than the relaxation time τ = m/γ, the mean-square displacement grows linearly: ⟨x²(t)⟩ = 2Dt in one dimension, with the diffusion constant D = kBT/γ. This is exactly the Stokes-Einstein relation, derived without ever solving a partial differential equation.
What is the difference between the Langevin and Fokker-Planck equations?
They describe the same physics from two viewpoints. The Langevin equation is a stochastic differential equation for a single trajectory v(t) — you integrate it with random kicks and watch one realization. The Fokker-Planck (Kramers) equation is a deterministic partial differential equation for the probability density P(v, t) of the whole ensemble. The Fokker-Planck equation is derived by averaging the Langevin equation over the noise; its steady-state solution is the Maxwell-Boltzmann distribution.
What is the overdamped (Brownian) limit?
When the relaxation time m/γ is much shorter than the timescale you care about, the inertial term m dv/dt becomes negligible and you can set it to zero. The equation collapses to the overdamped Langevin equation γ dx/dt = -∂U/∂x + ξ(t), used throughout soft-matter and biophysics — optical traps, polymer dynamics, protein folding — because at micron scales inertia is utterly irrelevant.
Why is the random force modeled as white noise?
Each molecular collision lasts roughly 10⁻¹³ s, while the particle's velocity relaxes over 10⁻⁸ s — five orders of magnitude slower. On the timescale of the particle's motion the kicks are effectively instantaneous and uncorrelated, so they are idealized as Gaussian white noise: zero mean ⟨ξ(t)⟩ = 0 and a delta-correlated spectrum ⟨ξ(t)ξ(t')⟩ ∝ δ(t-t'). If you resolve the collision timescale this breaks down and you need a memory kernel — the generalized Langevin equation.
How do you integrate the Langevin equation numerically?
Because the noise has a delta-function correlation, the discretized random force scales as the square root of the timestep, not the timestep itself. The simplest scheme (Euler-Maruyama) updates velocity as v += (-γv/m) dt + sqrt(2γkBT/m² · dt) · N(0,1), where N(0,1) is a fresh standard-normal sample each step. Using dt instead of sqrt(dt) for the noise is the single most common bug — it silently sets the temperature to zero.