The Equation and Its Solution
This page is devoted to a single stochastic differential equation, the one
among the solvable examples with the deepest reach into statistics and
machine learning. The concept of an SDE, the conventions, and the working
notion of solution are all inherited unchanged from the
previous page.
Standard one-dimensional Brownian motion \(w_t\) comes with its Brownian
filtration \(\{\mathcal{F}_t\}_{t \geq 0}\) containing all null sets,
integrals denote continuous versions, and every equation is read in the
Itô sense. A solution means an explicitly exhibited Itô
process verified against the integral equation, with uniqueness deferred
to the general theory.
The worked equations of that page solve two placements of the unknown, both with the
noise proportional to the state. The remaining basic configuration places the unknown in
the drift and leaves the noise additive,
\[
dX_t = \mu X_t\, dt + \sigma\, dw_t ,
\quad X_0 \in \mathbb{R} \text{ a given constant} ,
\]
with \(\mu, \sigma \in \mathbb{R}\). This is the Ornstein-Uhlenbeck
equation, also called the Langevin equation, and its original
physical content makes the parameters concrete. Take \(X_t\) to be the velocity of a
heavy particle suspended in a fluid. The drift \(\mu X_t\) with \(\mu \lt 0\) is
friction, always opposing the current velocity in proportion to it, while
\(\sigma\, dw_t\) is the relentless bombardment by fluid molecules, whose strength does
not depend on how fast the particle moves.
Because the noise term no longer involves the unknown, the integrating
factor sheds its randomness. Multiply by \(e^{-\mu t}\) and run the now familiar
informal product rule. The cross term vanishes outright, since \(d(e^{-\mu t})\) carries
only \(dt\), and
\[
d \bigl( e^{-\mu t} X_t \bigr)
= e^{-\mu t}\, \sigma\, dw_t ,
\]
so that integrating and multiplying back by \(e^{\mu t}\) produces the candidate
\(X_t = e^{\mu t} X_0 + \sigma \int_0^t e^{\mu (t - s)}\, dw_s\). The stochastic term is
now an integral of a deterministic integrand, exactly the kind of Wiener integral
whose Gaussian law was established for the representation theorem, and this is what gives the
Ornstein-Uhlenbeck family its complete statistical transparency.
Theorem: The Ornstein-Uhlenbeck Process
Let \(\mu, \sigma \in \mathbb{R}\) and let \(X_0 \in \mathbb{R}\) be a constant.
Define
\[
X_t = e^{\mu t} \Bigl( X_0 + \sigma \int_0^t e^{-\mu s}\, dw_s \Bigr) ,
\quad t \geq 0 ,
\]
so that, for each fixed \(t\),
\(X_t = e^{\mu t} X_0 + \sigma \int_0^t e^{\mu (t - s)}\, dw_s\) almost surely. Then
the following hold.
(i)
\(X\) is an Itô process, and for every \(t \geq 0\), almost surely,
\[
X_t = X_0 + \int_0^t \mu X_s\, ds + \sigma\, w_t ,
\]
so \(X\) solves \(dX_t = \mu X_t\, dt + \sigma\, dw_t\).
(ii)
For each \(t \gt 0\), the random variable \(X_t\) is Gaussian with
\[
\begin{align*}
\mathbb{E}[X_t] &= e^{\mu t} X_0 , \\\\
\operatorname{Var}[X_t]
&=
\begin{cases}
\dfrac{\sigma^2}{2 \mu} \bigl( e^{2 \mu t} - 1 \bigr) , & \mu \neq 0 , \\
\sigma^2 t , & \mu = 0 .
\end{cases}
\end{align*}
\]
Proof.
The two factors as Itô processes.
The integrand \(e^{-\mu s}\) is deterministic and continuous, hence progressively
measurable by the
continuity criterion.
Since \(\mathbb{E} \int_0^T e^{-2 \mu s}\, ds \lt \infty\) for every
\(T \gt 0\), we have \(e^{-\mu s} \in \mathcal{V}(0, T)\), and
\(M_t = \int_0^t e^{-\mu s}\, dw_s\) is an Itô process with \(u^M = 0\)
and \(v^M = e^{-\mu s}\), taken in its continuous version. Consequently
\(B_t = X_0 + \sigma M_t\) is an Itô process with \(u^B = 0\) and
\(v^B = \sigma e^{-\mu s}\). The factor \(D_t = e^{\mu t}\) is deterministic and
continuously differentiable, so \(D_t = 1 + \int_0^t \mu e^{\mu s}\, ds\)
pathwise. Being continuous and deterministic, the integrand \(\mu e^{\mu s}\) is
progressively measurable by the same criterion, and \(D\) is an Itô
process with \(u^D = \mu e^{\mu s}\) and \(v^D = 0\). By construction
\(X = D B\).
The product rule.
The membership hypothesis of the
stochastic product rule
concerns the process
\(D_s\, v^B + B_s\, v^D = e^{\mu s} \cdot \sigma e^{-\mu s} = \sigma\), a
deterministic constant, which lies in \(\mathcal{V}(0, T)\) for every \(T \gt 0\)
trivially. The rule then gives, for every \(t \geq 0\), almost surely,
\[
\begin{align*}
X_t
&= D_0 B_0
+ \int_0^t \bigl( D_s\, u^B + B_s\, u^D + v^D v^B \bigr)\, ds
+ \int_0^t \bigl( D_s\, v^B + B_s\, v^D \bigr)\, dw_s \\\\
&= X_0 + \int_0^t \mu\, e^{\mu s} B_s\, ds + \int_0^t \sigma\, dw_s \\\\
&= X_0 + \int_0^t \mu X_s\, ds + \sigma\, w_t .
\end{align*}
\]
The drift coefficient \(\mu X_s\) has continuous paths, hence is pathwise integrable
on bounded intervals, and the diffusion coefficient is the constant \(\sigma\), so
\(X\) is an Itô process of exactly the equation's form, which is claim (i). The
identification of the two displayed forms of \(X_t\) at fixed \(t\) is the
linearity
of the integral applied to the constant \(e^{\mu t}\).
The law at a fixed time.
Fix \(t \gt 0\). By the expanded form,
\(X_t - e^{\mu t} X_0 = \int_0^t h(s)\, dw_s\) with
\(h(s) = \sigma e^{\mu (t - s)}\), a deterministic member of \(L^2([0, t])\). The
Gaussian law of Wiener integrals
makes this centered Gaussian with variance
\[
\int_0^t \sigma^2 e^{2 \mu (t - s)}\, ds
=
\begin{cases}
\dfrac{\sigma^2}{2 \mu} \bigl( e^{2 \mu t} - 1 \bigr) , & \mu \neq 0 , \\
\sigma^2 t , & \mu = 0 ,
\end{cases}
\]
and adding the constant \(e^{\mu t} X_0\) shifts the mean without disturbing
Gaussianity or variance, which is claim (ii). When \(\sigma = 0\) the variance
vanishes and \(X_t\) is the constant \(e^{\mu t} X_0\), which we count as a
degenerate Gaussian of variance zero, as the theorem on Wiener integrals already does
for a zero integrand.
Take \(\sigma \neq 0\). The friction regime \(\mu \lt 0\) is where the family does its
real work. The mean \(e^{\mu t} X_0\) forgets the initial condition exponentially fast,
while the variance rises from zero and saturates at \(\sigma^2 / (2 \lvert \mu \rvert)\),
the level at which dissipation and noise injection balance. The process neither settles
nor explodes. It equilibrates, and this makes it the basic model of a quantity that
fluctuates persistently around a rest state. For \(\mu \gt 0\) the same formula describes
exponential instability seeded by noise, and for \(\mu = 0\) the equation degenerates to
\(dX_t = \sigma\, dw_t\), whose solution \(X_0 + \sigma w_t\) is scaled Brownian motion
started at \(X_0\).
Mean Reversion and Diffusion Models
Applications rarely relax toward zero. The mean-reverting form of the
equation pulls the state toward a level \(m \in \mathbb{R}\) at rate \(\theta \gt 0\),
\[
dX_t = \theta \bigl( m - X_t \bigr)\, dt + \sigma\, dw_t ,
\quad X_0 \in \mathbb{R} \text{ a given constant} ,
\]
and reduces to the theorem by recentering. Let \(\widetilde{X}\) denote the solution of
the theorem with \(\mu = - \theta\) and initial value \(X_0 - m\). Then
\(X_t = m + \widetilde{X}_t\) differs from \(\widetilde{X}_t\) by a constant, so it is an
Itô process with the same coefficients, and
\[
\begin{align*}
dX_t
&= - \theta \widetilde{X}_t\, dt + \sigma\, dw_t \\\\
&= \theta ( m - X_t )\, dt + \sigma\, dw_t .
\end{align*}
\]
Written out explicitly, the solution is
\[
X_t = m + e^{- \theta t} \bigl( X_0 - m \bigr)
+ \sigma \int_0^t e^{- \theta (t - s)}\, dw_s ,
\]
Gaussian at each time with
\[
\begin{align*}
\mathbb{E}[X_t] &= m + e^{- \theta t} \bigl( X_0 - m \bigr) , \\\\
\operatorname{Var}[X_t] &= \frac{\sigma^2}{2 \theta} \bigl( 1 - e^{- 2 \theta t} \bigr) .
\end{align*}
\]
The mean glides from \(X_0\) to \(m\) and the variance saturates at
\(\sigma^2 / (2 \theta)\), so the process forgets where it started and fluctuates around
the level it is pulled toward. The unit-rate case \(\theta = 1\) is a common
normalization. Carrying \(\theta\) explicitly costs nothing and is repaid immediately
below by machine learning, and again by the covariance of the next section.
Insight: The SDE Inside Diffusion Models
A time-dependent version of the mean-reverting equation is the continuous-time object
behind the forward corruption process of variance-preserving diffusion models. The
forward diffusion kernel
perturbs data by
\(q ( \mathbf{x}_t \mid \mathbf{x}_{t-1} )
= \mathcal{N} \bigl( \sqrt{ 1 - \beta_t }\, \mathbf{x}_{t-1},\ \beta_t \mathbf{I} \bigr)\).
Consider the Ornstein-Uhlenbeck type equation with level \(m = 0\), time-dependent
rate \(\tfrac{1}{2} \beta(t)\), and noise strength \(\sqrt{\beta(t)}\), run
componentwise. Each component is driven by the matching coordinate of a standard
Brownian motion
\(\mathbf{w}_t\) of the same dimension, and the coordinates of \(\mathbf{w}_t\) are
independent. The unit-step Euler discretization of the equation updates
\(\mathbf{x}_{t-1}\) to \(( 1 - \tfrac{1}{2} \beta_t ) \mathbf{x}_{t-1}\) plus
Gaussian noise of covariance \(\beta_t \mathbf{I}\). Since
\(\sqrt{ 1 - \beta_t } = 1 - \tfrac{1}{2} \beta_t + O ( \beta_t^2 )\), the kernel's
mean factor agrees with the Euler factor up to an error of order \(\beta_t^2\) for
the small step sizes used in practice.
The
closed-form kernel
\(q ( \mathbf{x}_t \mid \mathbf{x}_0 )
= \mathcal{N} \bigl( \sqrt{ \bar{\alpha}_t }\, \mathbf{x}_0,\ ( 1 - \bar{\alpha}_t ) \mathbf{I} \bigr)\)
is the discrete shadow of the same integrating-factor computation as the one on
this page. Run with rate \(\tfrac{1}{2} \beta(t)\), the method gives the
conditional law at time \(t\) as Gaussian with mean
\(e^{- \frac{1}{2} \int_0^t \beta(s)\, ds }\, \mathbf{x}_0\) and variance
\(1 - e^{- \int_0^t \beta(s)\, ds }\) per component. Thus \(\bar{\alpha}_t\) plays
the role of \(e^{- \int_0^t \beta(s)\, ds }\), the mean factor
\(\sqrt{\bar{\alpha}_t}\) the role of the decayed initial condition, and
\(1 - \bar{\alpha}_t\) the saturating variance of the theorem. The noise
schedule of a variance-preserving diffusion model thus plays the role of a
reparametrized reversion rate.
The Langevin name carries a second connection, this one about sampling
rather than corruption. Given a strictly positive, differentiable density
\(p\) on \(\mathbb{R}^d\) with
score function
\(\mathbf{s} = \nabla \log p\), the Langevin dynamics
is the equation
\[
d \mathbf{x}_t = \tfrac{1}{2}\, \mathbf{s} ( \mathbf{x}_t )\, dt + d \mathbf{w}_t
\]
driven by a \(d\)-dimensional standard Brownian motion \(\mathbf{w}_t\). This
equation is engineered so that, under regularity conditions on \(p\) that we do
not state, \(p\) is its invariant density and long runs of the dynamics produce
samples from \(p\). Knowing a density only through its score therefore suffices to
sample from it. That observation is the continuous-time template behind
score-based generative sampling.
With \(\sigma = 1\) and \(d = 1\), the mean-reverting equation is exactly the Langevin
dynamics of the Gaussian \(p = \mathcal{N} \bigl( m, 1 / ( 2 \theta ) \bigr)\), since then
\(\tfrac{1}{2}\, \mathbf{s}(x) = \theta ( m - x )\). For general \(\sigma \neq 0\) it is
the Langevin dynamics of \(\mathcal{N} \bigl( m, \sigma^2 / ( 2 \theta ) \bigr)\) with
drift \(\tfrac{\sigma^2}{2}\, \mathbf{s}\) and noise \(\sigma\, dw_t\). The mean-reverting
equation is the one case whose limiting law this page exhibits in closed form, as the
limit of the laws computed above. The invariance of that law, like the invariance claim in
general, belongs to the Fokker-Planck circle of ideas,
where the equation governing the evolving density of an SDE is derived and the
reverse-time machinery of diffusion models is built on top of it.
The Gaussian Process Reading
Claim (ii) of the theorem describes one time point in isolation. In fact the whole
process is Gaussian in the sense of the
Gaussian process
definition, meaning that every finite collection \((X_{t_1}, \ldots, X_{t_k})\)
is jointly Gaussian.
The reduction is short. For constants \(c_1, \ldots, c_k\) and times
\(t_1 \lt \cdots \lt t_k\), the
additivity and linearity
of the integral assemble the combination \(\sum_i c_i X_{t_i}\) into a constant plus
a single Wiener integral \(\int_0^{t_k} h\, dw_s\). The integrand \(h\) is
deterministic and piecewise continuous, equal on each interval \([t_{j-1}, t_j)\),
with \(t_0 = 0\), to the sum \(\sum_{i \geq j} c_i \sigma e^{\mu ( t_i - s )}\) of
the integrands still active there.
Every affine combination of the family is therefore Gaussian, with the degenerate case of
variance zero included, as for claim (ii). We take on faith the standard characterization
that a family with this property has jointly Gaussian finite-dimensional laws, where
joint Gaussianity likewise admits a singular covariance matrix, as happens whenever
\(t_1 = 0\), and so reaches beyond the density definition of the multivariate normal. The
verification is a characteristic-function argument belonging to the multivariate Gaussian
toolkit rather than to this track.
A Gaussian process is determined by its mean and covariance functions, and the mean is
already known, so only the covariance remains. Two earlier results assemble it. For
deterministic \(f, g \in L^2([0, T])\), linearity and the
Itô isometry
combine into a polarization identity,
\[
\begin{align*}
\mathbb{E} \Bigl[ \int_0^T f\, dw \int_0^T g\, dw \Bigr]
&= \tfrac{1}{4}\, \mathbb{E} \Bigl[ \Bigl( \int_0^T ( f + g )\, dw \Bigr)^2 \Bigr]
- \tfrac{1}{4}\, \mathbb{E} \Bigl[ \Bigl( \int_0^T ( f - g )\, dw \Bigr)^2 \Bigr] \\\\
&= \tfrac{1}{4} \int_0^T ( f + g )^2\, ds - \tfrac{1}{4} \int_0^T ( f - g )^2\, ds \\\\
&= \int_0^T f g\, ds .
\end{align*}
\]
Apply this to the mean-reverting solution with rate \(\theta \gt 0\), whose
fluctuation at time \(t\) is the Wiener integral of
\(u \mapsto \sigma e^{- \theta ( t - u )}\, \mathbf{1}_{[0, t]}(u)\). For \(s \leq t\),
\[
\begin{align*}
\operatorname{Cov} ( X_s, X_t )
&= \sigma^2 \int_0^s e^{- \theta ( s - u )}\, e^{- \theta ( t - u )}\, du \\\\
&= \sigma^2 e^{- \theta ( s + t )} \, \frac{ e^{2 \theta s} - 1 }{ 2 \theta } \\\\
&= \frac{ \sigma^2 }{ 2 \theta }
\Bigl( e^{- \theta ( t - s )} - e^{- \theta ( t + s )} \Bigr) .
\end{align*}
\]
For times far from the start, with the lag \(t - s\) held fixed, the second term dies and
the covariance approaches the stationary covariance
\[
\operatorname{Cov} ( X_s, X_t )
\longrightarrow
\frac{ \sigma^2 }{ 2 \theta }\, e^{- \theta \lvert t - s \rvert } ,
\]
a function of the lag alone. Up to the variance scale \(\sigma^2 / ( 2 \theta )\), this
is the exponential kernel \(\exp ( - \lvert t - s \rvert / \ell )\) with length-scale
\(\ell = 1 / \theta\). In the Matérn family it is the case
\(\nu = \tfrac{1}{2}\), the roughest of the closed forms listed on the Gaussian process
page. The equilibrated Ornstein-Uhlenbeck process is thus a dynamical construction of a
kernel that regression practice usually postulates directly. The reversion rate is the
reciprocal length-scale, and the exponential decay of memory in the kernel is the
exponential forgetting of the friction term.
Beyond Closed Forms
Two pages have now produced three equations, three placements of the unknown, and three
closed forms. What the family shares is linearity. In every case the coefficients were
affine in the state, a single explicit change of variables absorbed the difficult term,
and the solution emerged as an explicit functional of the driving path. This closing
section asks how far that reach extends, and what must replace it where it ends.
One further solved equation has already appeared on this track, and no such change of variables
produced it. The radial part of Brownian motion in
dimension \(n \geq 2\), started away from the origin, was shown by the multidimensional
Itô formula to satisfy
\[
dR_t
= \sum_{i=1}^{n} \frac{w_t^{(i)}}{R_t}\, dw_t^{(i)}
+ \frac{n - 1}{2 R_t}\, dt ,
\]
an equation whose drift is nonlinear in \(R_t\) and singular at \(R = 0\). The noise
coefficients of this equation involve the coordinates \(w_t^{(i)}\) rather than \(R_t\)
alone. Read from the present perspective, the logic ran backwards. None of the methods
of these two pages could have produced \(R_t\) from its equation. The process came
first, as a transformation of one already understood, and the Itô formula then
disclosed which equation it solves. That reversed route is a solution method in its own
right. Our heuristics were miniature instances of it. Each guessed a transformation
under which the unknown becomes a process already in hand, the logarithm for geometric
Brownian motion and an integrating factor for the other two equations.
When no such transformation is available, one needs theorems, and the deterministic case,
in which the noise term vanishes, already shows what any general theory must rule out.
The innocent-looking quadratic equation \(dX_t / dt = X_t^2\) with \(X_0 = 1\) is solved
on \([0, 1)\) by \(X_t = 1 / (1 - t)\), as differentiation checks, and this solution
escapes to infinity as \(t\) approaches \(1\). Growth faster than linear can drive a
solution to infinity in finite time, so global existence is not free.
The equation \(dX_t / dt = 3 X_t^{2/3}\) with \(X_0 = 0\) is solved by the zero function,
and equally, for every \(a \gt 0\), by the function that stays at zero up to time \(a\)
and continues as \((t - a)^3\) afterwards. The check, including the smooth fit at
\(t = a\), is again one line. Infinitely many solutions sprout from a single initial
value. A drift that is continuous but not Lipschitz at one point can fail to pin the
solution down, so uniqueness is not free either.
The general theory answers both threats at once. For coefficients Lipschitz in the state
and growing at most linearly, an iteration of Picard type produces a solution for every
square-integrable initial condition independent of the driving noise, and a comparison
inequality of Gronwall type shows there is only one.
The two counterexamples above mark exactly where those hypotheses bite. Linear growth
forbids finite-time escape, and the Lipschitz condition forbids branching.