Techniques for Solving Stochastic Differential Equations¶
In the previous chapter we discussed what it means to solve an SDE and why explicit solutions are rare. We now examine the main techniques used to solve the classes of SDEs that do admit tractable analytical representations.
Toy mechanism: match the structure, pick the transform
Solving an SDE is rarely a calculation — it is a recognition followed by a substitution. The four canonical structures each have a canonical transformation:
- additive noise (\(\sigma\) constant) → integrate the noise directly;
- multiplicative noise (\(\sigma \propto X\)) → take \(\log X\), which has constant diffusion;
- linear mean-reverting drift → multiply by \(e^{at}\), which cancels the drift;
- state-dependent diffusion → Lamperti transform \(h'(x) = 1/\sigma(x)\), which forces the diffusion to be \(1\).
Each transformation is engineered to make one specific term disappear, leaving a simpler SDE underneath. The toy version is GBM: the multiplicative noise problem \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\) becomes the additive-noise problem \(d(\log S_t) = (\mu - \tfrac{1}{2}\sigma^2)\,dt + \sigma\,dW_t\) in one step. The four solved examples below are the same one-step routine applied to BM-with-drift, GBM, Vasicek, and CIR.
Learning Goals
After completing this chapter you should be able to:
- solve additive-noise SDEs by direct integration
- use Itô transformations to simplify multiplicative-noise equations
- solve linear SDEs with integrating factors
- understand how the Lamperti transform simplifies diffusion terms
- recognize when to stop searching for closed forms and switch to other methods
1. Direct Integration¶
For SDEs where the coefficients depend only on time,
the solution is obtained by direct integration:
This is the stochastic analogue of integrating an ordinary differential equation, except that the random forcing enters through the Itô integral.
2. Itô Transformations¶
A central idea in solving SDEs is to choose a transformed variable \(Y_t = f(X_t)\) so that the new SDE becomes simpler.
Recall (see § Itô's Lemma): the governing rule is
The extra second-derivative term \(\frac{1}{2}\sigma^2 f_{xx}\) is what distinguishes stochastic calculus from ordinary calculus. Choosing \(f\) to cancel state-dependence in the diffusion or to linearize the drift is the core idea of this approach.
3. Integrating Factors for Linear SDEs¶
Consider the linear SDE
Here \(a(t)\), \(b(t)\), and \(c(t)\) are deterministic time-varying coefficients — \(b(t)\) is a generic linear drift coefficient, not the OU long-run mean.
Define the integrating factor
By the Itô product rule, \(d(M(t)X_t) = M(t)\,dX_t + X_t\,dM(t)\). Since \(M(t)\) is a deterministic function of finite variation, no quadratic covariation term appears. Substituting \(dX_t = [a(t) + b(t)X_t]\,dt + c(t)\,dW_t\):
Choosing \(M\) so that \(dM + b(t)M\,dt = 0\), i.e. \(M(t) = \exp\!\left(-\int_0^t b(s)\,ds\right)\), the \(X_t\)-term vanishes:
Integrating and solving for \(X_t\):
$$ X_t = e^{\int_0^t b(u)\,du}\left[ X_0
- \int_0^t e^{-\int_0^s b(u)\,du}a(s)\,ds
- \int_0^t e^{-\int_0^s b(u)\,du}c(s)\,dW_s \right] $$
Connection to Ordinary Calculus
This is the stochastic analogue of the integrating factor method for linear ODEs.
4. Lamperti Transform¶
The Lamperti transform converts state-dependent diffusion into constant diffusion, making the equation easier to analyze.
For an SDE of the form
define \(Y_t = h(X_t)\) where \(h'(x) = 1/\sigma(x)\). By Itô's lemma:
The diffusion term becomes \(h'(X_t)\sigma(X_t)\,dW_t = \frac{\sigma(X_t)}{\sigma(X_t)}\,dW_t = dW_t\), so the transformed process has unit diffusion coefficient. The drift of \(Y_t\) changes but is now the only remaining structure to handle.
This does not always produce a fully explicit elementary solution, but it often reduces the equation to a more analyzable form — notably for the CIR process, where the Lamperti transform reveals a connection to Bessel processes.
5. Core Solvable Examples¶
We now illustrate the main methods on classical models.
Example 1: Brownian Motion with Drift¶
SDE¶
Solution¶
Integrating from \(0\) to \(t\) gives
Distribution¶
Interpretation¶
This model represents a particle subject to constant drift \(\mu\) and random shocks \(\sigma\,dW_t\).
Technique Used
Direct integration works because the noise term does not depend on the state.
Example 2: Geometric Brownian Motion¶
SDE¶
Method¶
Multiplicative noise rules out direct integration. Apply the log transform \(Y_t = \log S_t\).
Recall (see § Itô Calculus Applications): applying Itô's lemma to \(\log S_t\) yields \(d(\log S_t) = (\mu - \tfrac{\sigma^2}{2})\,dt + \sigma\,dW_t\), so
The Itô correction \(-\sigma^2/2\) arises because \((dW_t)^2 = dt\) produces an extra drift when expanding \(d(\log S_t)\) — the source of the log-normal law.
Example 3: Vasicek Model (Ornstein–Uhlenbeck)¶
SDE¶
Parameters: \(\theta\) is the long-run mean, \(a > 0\) is the speed of mean reversion, \(\sigma\) is the volatility.
Integrating Factor Method¶
Rewrite the equation as
Multiply by the integrating factor \(e^{at}\). Since \(e^{at}\) is a deterministic function with finite variation, the Itô product rule gives \(d(e^{at}r_t) = ae^{at}r_t\,dt + e^{at}dr_t\) with no extra quadratic covariation term. Substituting \(dr_t = a(\theta - r_t)\,dt + \sigma\,dW_t\):
Solution¶
Integrating and multiplying by \(e^{-at}\):
Interpretation¶
The solution contains three components: decay of the initial condition \(r_0 e^{-at}\), pull toward the long-run mean \(\theta\), and accumulated stochastic shocks. The exponential kernel \(e^{-a(t-s)}\) ensures that shocks fade over time, which creates the mean-reverting behavior.
6. Example Atlas¶
| Model | SDE | Method |
|---|---|---|
| Brownian motion with drift | \(dX = \mu\,dt + \sigma\,dW\) | direct integration |
| GBM | \(dS = \mu S\,dt + \sigma S\,dW\) | log transform |
| Vasicek / OU | \(dr = a(\theta-r)\,dt + \sigma\,dW\) | integrating factor |
| CIR | \(dr = a(\theta-r)\,dt + \sigma\sqrt{r}\,dW\) | Lamperti transform; Bessel-type analysis |
flowchart TD
A[Start with SDE]
A --> B{Additive noise?}
B -->|Yes| C[Direct integration]
B -->|No| D{Multiplicative noise?}
D -->|Yes| E[Log transform / Itô lemma]
D -->|No| F{Linear equation?}
F -->|Yes| G[Integrating factor]
F -->|No| H{State-dependent diffusion?}
H -->|Yes| I[Lamperti transform]
H -->|No| J[Use numerical or transform methods]
7. Mental Checklist for Solving an SDE¶
When encountering a new stochastic differential equation, the most important step is to recognize its structure.
Step 1 — Identify the Structure¶
Start from \(dX_t = \mu(X_t, t)\,dt + \sigma(X_t, t)\,dW_t\) and ask:
| Question | If Yes | Technique |
|---|---|---|
| Does the noise term depend only on time? | additive noise | direct integration |
| Is the diffusion proportional to the state? | multiplicative noise | log / Itô transform |
| Is the drift linear in \(X_t\)? | linear SDE | integrating factor |
| Does the diffusion depend on \(X_t\)? | state-dependent diffusion | Lamperti transform |
Step 2 — Try a Transformation¶
| Transformation | Purpose |
|---|---|
| \(Y = \log X\) | remove multiplicative noise |
| \(Y = X^{1-\beta}\) | simplify power diffusion |
| integrating factor | eliminate linear drift |
| Lamperti transform | normalize diffusion coefficient |
Step 3 — Solve the Transformed Equation¶
After transformation, check if the new equation reduces to a standard additive form \(dY_t = \alpha(t)\,dt + \beta(t)\,dW_t\), then solve by direct integration.
Step 4 — Invert the Transformation¶
For example: \(Y_t = \log S_t \;\Rightarrow\; S_t = e^{Y_t}\).
Step 5 — Verify the Solution¶
Always check the result by applying Itô's lemma. If the original SDE is recovered, the solution is correct.
Step 6 — If No Closed Form Exists¶
If the equation does not simplify after standard transformations, switch to:
- Euler–Maruyama simulation
- Milstein scheme
- PDE methods
- characteristic-function approaches
8. Common Mistakes¶
Recall (see § Verifying SDE Solutions § Common Pitfalls): forgetting the Itô correction \(\tfrac{1}{2}\sigma^2 f_{xx}\), treating \(dW_t/dt\) as a derivative, and skipping verification are the recurring traps. Two further pitfalls specific to solving:
- Confusing additive and multiplicative noise. Compare \(dX_t = \mu\,dt + \sigma\,dW_t\) with \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\) — only the second suggests \(Y_t = \log S_t\).
- Assuming closed forms always exist. Most SDEs do not admit elementary pathwise solutions; switch to numerical simulation, PDE methods, moment analysis, or characteristic functions.
9. Final Perspective¶
Solving SDEs is rarely about brute-force calculation. The essential skill is to
- recognize the structure of the equation
- choose the right transformation or technique
- verify the result carefully
- know when to stop and switch to other analytical or numerical tools
That combination of structural recognition and technical fluency is the heart of solving stochastic differential equations.
Exercises¶
Exercise 1. Solve the following SDE by direct integration:
Write down the distribution of \(X_t\).
Solution to Exercise 1
The SDE \(dX_t = (3t^2 + 1)\,dt + e^{-t}\,dW_t\) has coefficients that depend only on time (not on \(X_t\)), so we solve by direct integration:
The stochastic integral \(\int_0^t e^{-s}\,dW_s\) is a Gaussian random variable with mean zero and variance, by Itô isometry,
Therefore:
Exercise 2. Solve the geometric Brownian motion SDE
by applying Itô's lemma to \(Y_t = \ln V_t\). Show all steps of the transformation, including the Itô correction term.
Solution to Exercise 2
Let \(Y_t = \ln V_t\). We apply Itô's lemma with \(f(V) = \ln V\), so \(f'(V) = 1/V\) and \(f''(V) = -1/V^2\).
Step 1. Write Itô's lemma:
Step 2. Substitute \(dV_t = rV_t\,dt + \sigma V_t\,dW_t\):
Step 3. Compute \((dV_t)^2 = \sigma^2 V_t^2\,dt\) (using \((dW_t)^2 = dt\) and dropping higher-order terms):
Step 4. Combine:
This is Brownian motion with drift. Integrating from \(0\) to \(t\):
Exponentiating:
The Itô correction term \(-\sigma^2/2\) arises from the second derivative \(f''(V) = -1/V^2\) combined with the quadratic variation \((dV_t)^2 = \sigma^2 V_t^2\,dt\).
Exercise 3. Consider the multiplicative-noise SDE
(a) Apply Itô's lemma to \(Y_t = \ln X_t\).
(b) Solve explicitly for \(X_t\).
(c) Find the distribution of \(\ln X_t\).
Solution to Exercise 3
Let \(Y_t = \ln X_t\). Since \(f(x) = \ln x\), we have
By Itô's lemma,
Substitute \(dX_t = 2X_t\,dt + 3X_t\,dW_t\):
Also,
so the second-order Itô correction term is
Therefore,
Integrating from \(0\) to \(t\),
Hence,
Since \(Y_t = \ln X_t\) is an affine function of Brownian motion, it is normally distributed:
Exercise 4. Solve the linear SDE
(a) Write down the integrating factor.
(b) Derive an explicit formula for \(X_t\).
(c) Compute \(\mathbb{E}[X_t]\).
Solution to Exercise 4
We are given
This is a linear SDE of the form
with
(a) Integrating factor
We look for an integrating factor \(M(t)\) depending only on time. This ensures that \(M\) is deterministic, so the Itô product rule has no quadratic covariation term:
Substituting \(dX_t = (1+t-2X_t)\,dt + e^t\,dW_t\) and grouping:
We choose \(M\) so that the coefficient of \(X_t\) vanishes, i.e. \(dM_t = 2M_t\,dt\). This gives \(M(t) = e^{2t}\).
(b) Explicit solution
With \(M(t) = e^{2t}\) the \(X_t\)-term is gone, so
Integrating from \(0\) to \(t\),
Since \(X_0 = 1\),
Now compute the deterministic integral:
so
Therefore,
Dividing by \(e^{2t}\),
(c) Expectation
The stochastic integral has mean zero, so
Exercise 5. Consider the SDE with state-dependent diffusion
(a) What is the Lamperti transform \(h(x) = \int^x \frac{1}{\sigma s^\beta}\,ds\) for this SDE?
(b) Apply Itô's lemma to \(Y_t = h(X_t)\) and verify that the diffusion coefficient of \(Y_t\) is constant.
Solution to Exercise 5
(a) The Lamperti transform requires \(h'(x) = 1/\sigma(x) = 1/(\sigma x^\beta)\). Integrating:
(valid for \(\beta \neq 1\)).
(b) Let \(Y_t = h(X_t) = \frac{X_t^{1-\beta}}{\sigma(1-\beta)}\). We have \(h'(x) = \frac{x^{-\beta}}{\sigma}\) and \(h''(x) = \frac{-\beta x^{-\beta-1}}{\sigma}\).
By Itô's lemma:
Substituting \(dX_t = \mu X_t\,dt + \sigma X_t^\beta\,dW_t\):
$$\begin{array}{lll} dY_t &=&\displaystyle h'(X_t)\mu X_t\,dt
- h'(X_t)\sigma X_t^\beta\,dW_t
-
\frac{1}{2}h''(X_t)\sigma^2 X_t^{2\beta}\,dt\ &=&\displaystyle \left( h'(X_t)\mu X_t + \frac{1}{2}h''(X_t)\sigma^2 X_t^{2\beta}\right)\,dt
-
h'(X_t)\sigma X_t^\beta\,dW_t \end{array}$$
The diffusion coefficient of \(Y_t\) is:
This confirms that the diffusion coefficient of \(Y_t\) is the constant \(1\), independent of \(X_t\).
The drift of \(Y_t\) is:
which in terms of \(Y_t\) becomes a generally nonlinear function of \(Y_t\), but the diffusion is constant as required.
Exercise 6. Consider the SDE
Attempt to apply each of the four standard techniques (direct integration, log transform, integrating factor, Lamperti transform). Explain why none of them reduces this equation to a standard solvable form.
Solution to Exercise 6
We attempt each standard technique on \(dX_t = X_t^2\,dt + X_t^2\,dW_t\):
Direct integration: This requires coefficients that depend only on time, not on \(X_t\). Here both \(b(X_t) = X_t^2\) and \(\sigma(X_t) = X_t^2\) are nonlinear functions of the state. Direct integration does not apply.
Log transform: Set \(Y_t = \log X_t\). By Itô's lemma:
The coefficients still depend on \(X_t = e^{Y_t}\) in a nonlinear way, so the equation is not simplified to a standard solvable form.
Integrating factor: The integrating factor method applies to linear SDEs where the drift is affine in \(X_t\). Here the drift \(X_t^2\) is quadratic, so the method does not apply.
Lamperti transform: Set \(h'(x) = 1/x^2\), giving \(h(x) = -1/x\) and \(Y_t = -1/X_t\). By Itô's lemma with \(h'(x) = 1/x^2\) and \(h''(x) = -2/x^3\):
$$\begin{array}{lll} dY_t &=&\displaystyle \frac{1}{X_t^2}(X_t^2\,dt + X_t^2\,dW_t)
- \frac{1}{2}!\left(-\frac{2}{X_t^3}\right)X_t^4\,dt\ &=&\displaystyle (1 - X_t)\,dt + dW_t \end{array}$$
Since \(X_t = -1/Y_t\), we get
The diffusion is now constant, but the drift contains the nonlinear term \(1/Y_t\), which does not correspond to a standard solvable form.
None of the four techniques reduces this SDE to a known explicitly solvable equation. Numerical methods or PDE approaches would be needed.
Exercise 7. Consider the time-varying linear SDE
(a) Find an integrating factor \(M(t)\) depending only on time such that \(d(M(t)X_t)\) contains no term proportional to \(X_t\).
(b) Use this integrating factor to solve the SDE explicitly.
Solution to Exercise 7
We seek an integrating factor \(M(t)\) depending only on time. This is important because then \(M\) is deterministic and of finite variation, so the Itô product rule is simple:
with no quadratic covariation term.
Substituting \(dX_t = [-a(t)X_t + b(t)]\,dt + c(t)\,dW_t\):
Rearranging,
We choose \(M\) so that the coefficient of \(X_t\) vanishes:
Hence \(M\) must solve the ODE \(dM/dt = a(t)M(t)\), so
With this choice,
Integrating from \(0\) to \(t\) and noting \(M(0) = 1\):
Therefore,
that is,
$$ X_t = \exp!\left(-\int_0^t a(u)\,du\right) \left[ X_0
- \int_0^t \exp!\left(\int_0^s a(u)\,du\right)b(s)\,ds
- \int_0^t \exp!\left(\int_0^s a(u)\,du\right)c(s)\,dW_s \right]. $$
This is the explicit solution.