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.
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.
The governing rule is Itô's lemma:
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, and the computation reduces to
Integrating and solving for \(X_t\):
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¶
This model describes stock prices in the Black–Scholes framework.
Key Idea¶
The equation contains multiplicative noise, so naive direct integration is not sufficient. Instead we apply the transformation \(Y_t = \log S_t\).
Apply Itô's Lemma¶
For \(f(S) = \log S\), we have \(f'(S) = 1/S\) and \(f''(S) = -1/S^2\). Itô's lemma gives
Substituting \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\) and using \((dS_t)^2 = \sigma^2 S_t^2\,dt\):
This is Brownian motion with drift.
Solution¶
Integrating and exponentiating:
Distribution¶
Result
\(S_t\) follows a log-normal distribution.
Why the Itô Correction Appears¶
In stochastic calculus \((dW_t)^2 = dt\), so squaring the diffusion term produces \((\sigma S_t\,dW_t)^2 = \sigma^2 S_t^2\,dt\). This generates the additional drift correction \(-\frac{\sigma^2}{2}\,dt\) in the logarithmic equation.
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:
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 When Solving SDEs¶
Mistake 1 — Forgetting the Itô Correction Term¶
When applying Itô's lemma, the second-derivative term must be included:
Students often incorrectly use the ordinary chain rule and omit \(\frac{1}{2}\sigma^2 f_{xx}\).
Key Difference from Ordinary Calculus
In stochastic calculus \((dW_t)^2 = dt\), which produces the additional second-derivative term.
Mistake 2 — Treating Brownian Motion Like an Ordinary Function¶
Brownian motion is not differentiable. Expressions like \(dW_t/dt\) do not exist in the classical sense. The correct object is the stochastic differential \(dW_t\).
Mistake 3 — Confusing Additive and Multiplicative Noise¶
Compare \(dX_t = \mu\,dt + \sigma\,dW_t\) (additive) with \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\) (multiplicative). The second equation naturally suggests \(Y_t = \log S_t\).
Mistake 4 — Ignoring State-Dependent Diffusion¶
Some SDEs contain diffusion terms like \(\sigma\sqrt{X_t}\). These usually cannot be solved by direct integration. One instead looks for the Lamperti transform or for known structural representations such as the CIR–Bessel connection.
Mistake 5 — Forgetting to Verify the Solution¶
After solving an SDE, the result should always be checked by applying Itô's lemma.
Mistake 6 — Assuming Closed-Form Solutions Always Exist¶
Most SDEs do not admit elementary explicit pathwise solutions. When standard transformations fail, appropriate alternatives include numerical simulation, PDE methods, moment analysis, and characteristic-function techniques.
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 \(\int_0^t e^{-2s}\,ds = \frac{1}{2}(1 - e^{-2t})\) by Ito 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 Ito's lemma with \(f(V) = \ln V\), so \(f'(V) = 1/V\) and \(f''(V) = -1/V^2\).
Step 1. Write Ito's lemma:
Step 2. Substitute \(dV_t = rV_t\,dt + \sigma V_t\,dW_t\):
Step 3. Compute \((dV_t)^2 = (\sigma V_t)^2\,dt = \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 Ito 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 linear SDE
(a) Identify the mean-reversion speed \(a\), long-term mean \(\theta\), and volatility \(\sigma\).
(b) Solve using the integrating factor method. Write the integrating factor explicitly.
(c) Compute \(\mathbb{E}[X_t]\) and \(\operatorname{Var}[X_t]\).
Solution to Exercise 3
The SDE \(dX_t = (2 - 3X_t)\,dt + 4\,dW_t\) is an Ornstein-Uhlenbeck process.
(a) Rewrite the drift as \(a(\theta - X_t) = 3(\frac{2}{3} - X_t)\), so:
- Mean-reversion speed: \(a = 3\)
- Long-term mean: \(\theta = 2/3\)
- Volatility: \(\sigma = 4\)
(b) The integrating factor is \(M(t) = e^{3t}\). Define \(Y_t = e^{3t}X_t\). By the Ito product rule (no quadratic covariation since \(e^{3t}\) is deterministic):
Integrating: \(Y_t = Y_0 + \int_0^t 2e^{3s}\,ds + \int_0^t 4e^{3s}\,dW_s = 0 + \frac{2}{3}(e^{3t} - 1) + 4\int_0^t e^{3s}\,dW_s\)
Dividing by \(e^{3t}\):
(c) The expectation is (the stochastic integral has zero mean):
The variance is computed via Ito isometry:
Exercise 4. 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 4
(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 Ito's lemma:
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 5. Solve the Vasicek model
(a) Write the explicit solution for \(r_t\).
(b) Find the stationary distribution.
(c) Compute \(\mathbb{E}[r_1]\) and \(\operatorname{Var}[r_1]\).
Solution to Exercise 5
The Vasicek model \(dr_t = 0.5(0.04 - r_t)\,dt + 0.01\,dW_t\) has \(a = 0.5\), \(\theta = 0.04\), \(\sigma = 0.01\), \(r_0 = 0.03\).
(a) The explicit solution is:
(b) The stationary distribution is \(r_\infty \sim \mathcal{N}\!\left(\theta, \frac{\sigma^2}{2a}\right)\):
The stationary standard deviation is \(\sqrt{0.0001} = 0.01 = 1\%\).
(c) At \(t = 1\):
Exercise 6. Consider the SDE \(dX_t = X_t^2\,dt + X_t^2\,dW_t\). 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 Ito's lemma:
The coefficients still depend on \(X_t = e^{Y_t}\) in a nonlinear way (\(e^{Y_t}\) and \(e^{2Y_t}\) terms), 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 Ito's lemma with \(h'(x) = 1/x^2\) and \(h''(x) = -2/x^3\):
Since \(X_t = -1/Y_t\), we get \(dY_t = (1 + 1/Y_t)\,dt + dW_t\). The diffusion is now constant, but the drift contains the nonlinear term \(1/Y_t\), which does not correspond to any 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. Verify that the solution to the time-varying linear SDE
is given by
where \(\Phi(t) = \exp\!\left(-\int_0^t a(u)\,du\right)\). Apply Itô's product rule to \(\Phi(t)^{-1} X_t\) to derive the result.
Solution to Exercise 7
Define \(Z_t = \Phi(t)^{-1} X_t\) where \(\Phi(t)^{-1} = \exp\!\left(\int_0^t a(u)\,du\right)\).
Since \(\Phi(t)^{-1}\) is a deterministic function of finite variation, we apply the Ito product rule with no quadratic covariation term:
We have \(d(\Phi(t)^{-1}) = a(t)\Phi(t)^{-1}\,dt\), so:
The terms involving \(a(t)X_t\) cancel, leaving:
Integrating from \(0\) to \(t\) (noting \(Z_0 = \Phi(0)^{-1}X_0 = X_0\)):
Multiplying both sides by \(\Phi(t)\):
This confirms the stated solution.