Skip to content

Verifying SDE Solutions

Given a stochastic differential equation and a proposed solution, we need to verify whether the solution indeed satisfies the SDE. This verification process is fundamental in stochastic calculus: it confirms the correctness of analytical solutions before using them in applications such as pricing, risk management, and simulation.

Verification is typically easier than solving an SDE itself. Once a candidate solution is known, checking it requires only Itô calculus.

Toy mechanism: differentiate the guess and match

The whole verification game is one line. Take the ODE analogue: claim \(x(t) = e^t\) solves \(\dot x = x\). To check, differentiate \(e^t\) and see whether the result equals \(x(t)\). For SDEs the differentiation is Itô's lemma instead of ordinary calculus — that single replacement is the only nontrivial step. The cleanest example: claim \(S_t = S_0 e^{\sigma W_t}\) solves \(dS_t = \tfrac{1}{2}\sigma^2 S_t\,dt + \sigma S_t\,dW_t\). Apply Itô to \(f(x) = S_0 e^{\sigma x}\): the \(\tfrac{1}{2}f''\sigma^2\) correction produces exactly the \(\tfrac{1}{2}\sigma^2 S_t\,dt\) drift on the right-hand side, and the \(f'\) term produces the \(\sigma S_t\,dW_t\) diffusion. Match coefficients, check \(S_0\), done. The three worked examples below are this same three-step procedure for the canonical models.

Learning Goals

After completing this section you should be able to:

  • apply Itô's lemma to compute the differential of a proposed solution
  • match drift and diffusion coefficients to verify correctness
  • recognize common pitfalls in SDE verification

1. The Verification Idea

Given the solution concept from the previous section, verification asks a direct question: does a proposed process actually satisfy a given SDE? Under conditions ensuring existence and uniqueness, any adapted process whose Itô differential has the correct drift and diffusion coefficients, and satisfies the initial condition, must coincide with the unique solution.

The verification procedure is:

  1. Compute \(dX_t\) using Itô's lemma
  2. Compare the resulting drift and diffusion coefficients with the original SDE
  3. Confirm the initial condition

2. Itô's Lemma

Recall (see § Itô's Lemma): for an Itô process \(dX_t = \mu_t\,dt + \sigma_t\,dW_t\) and \(f \in C^{2,1}\),

\[ df(X_t, t) = \left(\frac{\partial f}{\partial t} + \mu_t \frac{\partial f}{\partial x} + \frac{1}{2}\sigma_t^2 \frac{\partial^2 f}{\partial x^2}\right)dt + \sigma_t \frac{\partial f}{\partial x}\,dW_t \]

The extra \(\frac{1}{2}\sigma_t^2 f_{xx}\,dt\) term — the Itô correction — arises because \((dW_t)^2 = dt\) rather than zero (see § Quadratic Variation). This formula is the central tool for verification: it replaces the ordinary chain rule when stochastic terms are present.


3. Worked Examples

The following examples illustrate the verification procedure for several important models in quantitative finance.

Example 1: Geometric Brownian Motion

SDE

\[ dS_t = \mu S_t\,dt + \sigma S_t\,dW_t \]

with \(S_0 > 0\).

Proposed Solution

\[ S_t = S_0 \exp\left[\left(\mu - \frac{\sigma^2}{2}\right)t + \sigma W_t\right] \]

Verification

Write the solution as \(S_t = f(W_t, t)\) with

\[ f(x, t) = S_0 \exp\left[\left(\mu - \frac{\sigma^2}{2}\right)t + \sigma x\right] \]

Step 1. Compute partial derivatives.

\[ \frac{\partial f}{\partial t} = \left(\mu - \frac{\sigma^2}{2}\right) S_t, \qquad \frac{\partial f}{\partial x} = \sigma\,S_t, \qquad \frac{\partial^2 f}{\partial x^2} = \sigma^2 S_t \]

Step 2. Apply Itô's lemma (special case with \(X_t = W_t\)).

\[ dS_t = \left[\left(\mu - \frac{\sigma^2}{2}\right)S_t + \frac{1}{2}\sigma^2 S_t\right]dt + \sigma S_t\,dW_t = \mu S_t\,dt + \sigma S_t\,dW_t \checkmark \]

Step 3. Check the initial condition: \(f(0, 0) = S_0\). \(\checkmark\)

The proposed process satisfies the SDE.

Interpretation

The \(-\frac{\sigma^2}{2}\) term in the exponent is the Itô correction, arising from the second-order term in Itô's lemma. In ordinary calculus \((dW_t)^2\) would be negligible, but in stochastic calculus \((dW_t)^2 = dt\), producing a nonzero contribution to the drift.

Where the Itô Correction Comes From

flowchart LR

A["S_t = f(W_t, t)"]

A --> B["First derivative f_x"]
A --> C["Second derivative f_xx"]

B --> D["σ S_t dW_t"]
C --> E["½ σ² S_t (dW_t)²"]

E --> F["½ σ² S_t dt"]

D --> G["Diffusion term"]
F --> H["Extra drift (Itô correction)"]

G --> I["dS_t = μ S_t dt + σ S_t dW_t"]
H --> I

The first derivative produces the diffusion term, while the second derivative produces extra drift. The \(-\sigma^2/2\) term in the exponent exactly cancels this extra drift, making the solution consistent with the original SDE.


Example 2: Ornstein–Uhlenbeck Process

SDE

\[ dX_t = a(\theta - X_t)\,dt + \sigma\,dW_t \]

where \(a > 0\) is the speed of mean reversion, \(\theta\) is the long-term mean, and \(\sigma > 0\) is the volatility.

Proposed Solution

\[ X_t = X_0\,e^{-at} + \theta(1 - e^{-at}) + \sigma \int_0^t e^{-a(t-s)}\,dW_s \]

Verification

Rewrite the SDE in terms of the deviation from \(\theta\):

\[ d(X_t - \theta) = -a(X_t - \theta)\,dt + \sigma\,dW_t \]

We cancel the deterministic decay term using an integrating factor. Define \(Y_t = e^{at}(X_t - \theta)\). The factor \(e^{at}\) is chosen precisely because it converts the \(-a Y_t\,dt\) drift into zero: by the Itô product rule (noting that \(e^{at}\) has finite variation, so no extra quadratic covariation term appears),

\[ dY_t = ae^{at}(X_t - \theta)\,dt + e^{at}\,d(X_t - \theta) \]

Substituting \(d(X_t - \theta) = -a(X_t - \theta)\,dt + \sigma\,dW_t\):

\[ dY_t = ae^{at}(X_t - \theta)\,dt + e^{at}\left[-a(X_t - \theta)\,dt + \sigma\,dW_t\right] = \sigma\,e^{at}\,dW_t \]

The drift terms cancel completely. Integrating from \(0\) to \(t\):

\[ Y_t = Y_0 + \sigma \int_0^t e^{as}\,dW_s \]

Since \(Y_0 = X_0 - \theta\), dividing by \(e^{at}\) recovers the proposed solution:

\[ X_t = \theta + (X_0 - \theta)\,e^{-at} + \sigma \int_0^t e^{-a(t-s)}\,dW_s \checkmark \]

Why the Integrating Factor Works

flowchart LR

A["Mean-reverting SDE
d(X_t−θ) = −a(X_t−θ)dt + σ dW_t"] A --> B["Multiply by e^{at}"] B --> C["Y_t = e^{at}(X_t−θ)"] C --> D["Itô product rule"] D --> E["Drift terms cancel"] E --> F["dY_t = σ e^{at} dW_t"] F --> G["Integrate directly"]

The mean-reverting term causes exponential decay toward \(\theta\). Multiplying by \(e^{at}\) cancels this decay, converting the process into a pure stochastic integral that can be integrated directly.

Properties

Conditional mean: \(\mathbb{E}[X_t \mid X_0] = X_0\,e^{-at} + \theta(1 - e^{-at})\)

Conditional variance: \(\operatorname{Var}[X_t \mid X_0] = \dfrac{\sigma^2}{2a}(1 - e^{-2at})\)

Long-term behavior: \(\lim_{t \to \infty} \mathbb{E}[X_t] = \theta\), \(\quad \lim_{t \to \infty} \operatorname{Var}[X_t] = \dfrac{\sigma^2}{2a}\)

Vasicek Model

The Vasicek interest rate model \(dr_t = a(\theta - r_t)\,dt + \sigma\,dW_t\) uses the same notation as the OU process above. Its solution and verification follow the same steps.


Example 3: CIR Model — Transformation and Distribution

SDE

\[ dr_t = a(\theta - r_t)\,dt + \sigma\sqrt{r_t}\,dW_t \]

where \(a, \theta, \sigma > 0\) and the Feller condition \(2a\theta \geq \sigma^2\) ensures \(r_t \geq 0\) for all \(t\).

Verification of the Square-Root Transformation

The CIR model does not admit a simple explicit pathwise solution in elementary functions. However, we can verify useful transformations.

Claim. Let \(X_t = \sqrt{r_t}\). We derive the SDE for \(X_t\).

Apply Itô's lemma to \(f(r) = \sqrt{r}\), with \(f'(r) = \tfrac{1}{2\sqrt{r}}\) and \(f''(r) = -\tfrac{1}{4r^{3/2}}\):

\[ dX_t = \left[\frac{a(\theta - r_t)}{2\sqrt{r_t}} - \frac{\sigma^2}{8\sqrt{r_t}}\right]dt + \frac{\sigma}{2}\,dW_t \]

Writing everything in terms of \(X_t = \sqrt{r_t}\):

\[ dX_t = \left[\frac{a\theta - \sigma^2/4}{2\,X_t} - \frac{a}{2}\,X_t\right]dt + \frac{\sigma}{2}\,dW_t \]

The diffusion coefficient is now constant (\(\sigma/2\)). The transformed process is closely related to squared Bessel processes, which is useful for analytical study.

Transition Distribution

Conditional on \(r_0\), the distribution of \(r_t\) for \(t > 0\) is a scaled noncentral chi-square distribution:

\[ r_t \sim \frac{\sigma^2(1-e^{-at})}{4a}\;\chi^2_d\!\left(\lambda(t)\right) \]

where \(d = \frac{4a\theta}{\sigma^2}\) is the degrees of freedom and

\[ \lambda(t) = \frac{4a\,e^{-at}}{\sigma^2(1-e^{-at})}\,r_0 \]

is the noncentrality parameter (standard convention: the argument of \(\chi^2_d\) is the noncentrality parameter, not the per-degree-of-freedom value). This distribution can be verified by checking that the corresponding density satisfies the Fokker–Planck equation (forward Kolmogorov equation):

\[ \frac{\partial p}{\partial t} = -\frac{\partial}{\partial r}[a(\theta-r)\,p] + \frac{1}{2}\frac{\partial^2}{\partial r^2}[\sigma^2 r\,p] \]

4. Verification Workflow

flowchart TD

A[Start with SDE and proposed solution]

A --> B[Express proposed solution in terms of Brownian motion or stochastic integrals]

B --> C["Compute derivatives or apply Itô rules"]

C --> D[Apply Itô's lemma]

D --> E{Drift coefficients match?}

E -->|No| F[Solution is incorrect — revise candidate derivation]

E -->|Yes| G{Diffusion coefficients match?}

G -->|No| F

G -->|Yes| H{Initial condition satisfied?}

H -->|No| F

H -->|Yes| I[Solution is verified]

Step-by-Step Checklist

Step Action Check
1 Write down the SDE \(dX_t = \mu(X_t, t)\,dt + \sigma(X_t, t)\,dW_t\)
2 Identify the proposed solution may involve stochastic integrals
3 Compute derivatives or apply Itô rules as needed \(f_t\), \(f_x\), \(f_{xx}\), product rule
4 Apply Itô's lemma include the \(\frac{1}{2}\sigma^2 f_{xx}\) term
5 Match drift coefficients \(dt\) terms must agree
6 Match diffusion coefficients \(dW_t\) terms must agree
7 Verify the initial condition \(X_0 = f(W_0, 0)\) or equivalent

5. Common Pitfalls

Forgetting the Itô Correction

The \(\frac{1}{2}\sigma^2 f_{xx}\) term is essential. Omitting it amounts to using the ordinary chain rule, which does not hold in stochastic calculus because \((dW_t)^2 = dt\).

Incorrect Sign in Mean Reversion

In mean-reverting models, the sign convention matters. The drift \(a(\theta - X_t)\) pulls the process toward \(\theta\), while \(a(X_t - \theta)\) would push it away. Confusing these signs is a frequent source of errors.

Assuming Solutions Depend Only on the Current Brownian Value

Many SDE solutions involve stochastic integrals over the entire Brownian path, such as \(\sigma \int_0^t e^{-a(t-s)}\,dW_s\). These cannot be written as functions of \(W_t\) alone. Verification must account for the full path dependence.

Ignoring Regularity Conditions

Itô's lemma requires \(f \in C^{2,1}\). If the transformation is not sufficiently smooth (for example, \(f(x) = |x|\) at \(x = 0\)), the standard lemma does not apply.

Forgetting That Finite-Variation Processes Have No Itô Term

Deterministic functions such as \(e^{at}\) have finite variation. When computing \(d(e^{at} X_t)\) using the product rule, no additional Itô correction appears from the deterministic factor — only the stochastic terms in \(dX_t\) contribute to quadratic covariation.

Key Takeaway

Verifying SDE solutions reduces to computing the differential of the proposed process using Itô's lemma and matching the resulting drift and diffusion coefficients with the original equation.


6. Unified View: Three Transformation Patterns

The three examples above are instances of the same strategy: transform the process to simplify its SDE, then verify the result using Itô calculus.

flowchart TD

A[Start with SDE]

A --> B{Identify structure}

B --> C[Multiplicative noise]
B --> D[Linear mean reversion]
B --> E[State-dependent volatility]

C --> F["Log transform
Y = log S"] F --> G["GBM → Brownian motion with drift"] D --> H["Integrating factor
Y = e^{at}(X−θ)"] H --> I["OU → pure stochastic integral"] E --> J["Square-root transform
Y = √r"] J --> K["CIR → constant diffusion"] G --> L[Verify using Itô's lemma] I --> L K --> L
Structure Transformation Effect Model
multiplicative noise \(Y_t = \log S_t\) removes state dependence GBM
linear mean reversion \(Y_t = e^{at}(X_t - \theta)\) cancels deterministic drift OU / Vasicek
square-root diffusion \(Y_t = \sqrt{X_t}\) makes diffusion constant CIR

Recognizing which transformation applies is the key step. Verification then confirms the result mechanically.


Exercises

Exercise 1. Verify that \(X_t = X_0 + \mu t + \sigma W_t\) solves the SDE \(dX_t = \mu\,dt + \sigma\,dW_t\) by applying Itô's lemma to \(f(x, t) = X_0 + \mu t + \sigma x\) with \(X_t = W_t\).

Solution to Exercise 1

Write \(X_t = f(W_t, t) = X_0 + \mu t + \sigma W_t\) where \(f(x, t) = X_0 + \mu t + \sigma x\).

Compute partial derivatives:

\[ \frac{\partial f}{\partial t} = \mu, \qquad \frac{\partial f}{\partial x} = \sigma, \qquad \frac{\partial^2 f}{\partial x^2} = 0 \]

Apply Ito's lemma (special case with \(X_t = W_t\), so \(\mu_t = 0\), \(\sigma_t = 1\)):

\[ dX_t = \left(\mu + \frac{1}{2} \cdot 1^2 \cdot 0\right)dt + \sigma \cdot 1\,dW_t = \mu\,dt + \sigma\,dW_t \; \checkmark \]

Initial condition: \(f(0, 0) = X_0 + 0 + 0 = X_0\). \(\checkmark\)

The proposed solution satisfies the SDE.


Exercise 2. A student claims that \(S_t = S_0 \exp(\mu t + \sigma W_t)\) solves the GBM equation \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\). Apply Itô's lemma to check this claim. What drift do you actually obtain? Identify the missing correction term and write the correct solution.

Solution to Exercise 2

The student claims \(S_t = S_0 \exp(\mu t + \sigma W_t)\) solves \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\).

Write \(f(x, t) = S_0 \exp(\mu t + \sigma x)\). Compute derivatives:

\[ f_t = \mu S_t, \qquad f_x = \sigma S_t, \qquad f_{xx} = \sigma^2 S_t \]

Apply Ito's lemma:

\[ dS_t = \left(\mu S_t + \frac{1}{2}\sigma^2 S_t\right)dt + \sigma S_t\,dW_t = \left(\mu + \frac{\sigma^2}{2}\right)S_t\,dt + \sigma S_t\,dW_t \]

The drift is \((\mu + \sigma^2/2)S_t\), not \(\mu S_t\). The claim is incorrect.

The missing correction is \(-\sigma^2/2\) in the exponent. The correct solution is:

\[ S_t = S_0 \exp\!\left[\left(\mu - \frac{\sigma^2}{2}\right)t + \sigma W_t\right] \]

With this correction, \(f_t = (\mu - \sigma^2/2)S_t\), and the Ito lemma gives drift \((\mu - \sigma^2/2)S_t + \frac{1}{2}\sigma^2 S_t = \mu S_t\), which matches the SDE.


Exercise 3. Consider the SDE

\[ dX_t = -\alpha X_t\,dt + \sigma\,dW_t, \qquad X_0 = x_0 \]

A proposed solution is \(X_t = x_0\,e^{-\alpha t} + \sigma \int_0^t e^{-\alpha(t-s)}\,dW_s\).

(a) Define \(Y_t = e^{\alpha t} X_t\) and compute \(dY_t\) using the Itô product rule.

(b) Verify that the drift terms cancel and \(dY_t = \sigma e^{\alpha t}\,dW_t\).

(c) Integrate to recover the proposed solution and confirm the initial condition.

Solution to Exercise 3

(a) Define \(Y_t = e^{\alpha t}X_t\). Since \(e^{\alpha t}\) is deterministic (finite variation), the Ito product rule gives:

\[ dY_t = \alpha e^{\alpha t}X_t\,dt + e^{\alpha t}\,dX_t \]

Substituting \(dX_t = -\alpha X_t\,dt + \sigma\,dW_t\):

\[ dY_t = \alpha e^{\alpha t}X_t\,dt + e^{\alpha t}(-\alpha X_t\,dt + \sigma\,dW_t) = \sigma e^{\alpha t}\,dW_t \]

(b) The drift terms \(\alpha e^{\alpha t}X_t\,dt\) and \(-\alpha e^{\alpha t}X_t\,dt\) cancel exactly, confirming:

\[ dY_t = \sigma e^{\alpha t}\,dW_t \; \checkmark \]

(c) Integrating from \(0\) to \(t\):

\[ Y_t = Y_0 + \sigma \int_0^t e^{\alpha s}\,dW_s \]

Since \(Y_0 = e^0 \cdot X_0 = x_0\), we have \(e^{\alpha t}X_t = x_0 + \sigma \int_0^t e^{\alpha s}\,dW_s\). Dividing by \(e^{\alpha t}\):

\[ X_t = x_0\,e^{-\alpha t} + \sigma \int_0^t e^{-\alpha(t-s)}\,dW_s \]

Initial condition: at \(t = 0\), \(X_0 = x_0\,e^0 + 0 = x_0\). \(\checkmark\)


Exercise 4. Consider the SDE \(dX_t = X_t\,dt + X_t\,dW_t\) with \(X_0 = 1\). A candidate solution is \(X_t = \exp\!\left(\frac{1}{2}t + W_t\right)\).

(a) Apply Itô's lemma to verify or refute this candidate.

(b) Find the correct solution.

Solution to Exercise 4

(a) The candidate is \(X_t = \exp(\frac{1}{2}t + W_t)\). Write \(f(x, t) = \exp(\frac{1}{2}t + x)\).

Compute derivatives:

\[ f_t = \tfrac{1}{2}X_t, \qquad f_x = X_t, \qquad f_{xx} = X_t \]

Ito's lemma gives:

\[ dX_t = \left(\tfrac{1}{2}X_t + \tfrac{1}{2}X_t\right)dt + X_t\,dW_t = X_t\,dt + X_t\,dW_t \; \checkmark \]

The candidate satisfies the SDE \(dX_t = X_t\,dt + X_t\,dW_t\).

Check initial condition: \(X_0 = \exp(0 + 0) = 1\). \(\checkmark\)

(b) The candidate is already correct. This is a GBM with \(\mu = 1\) and \(\sigma = 1\). The general GBM solution is:

\[ X_t = X_0\exp\!\left[(\mu - \sigma^2/2)t + \sigma W_t\right] = \exp\!\left(\tfrac{1}{2}t + W_t\right) \]

which matches the candidate.


Exercise 5. For the CIR-type SDE \(dr_t = (2 - r_t)\,dt + \sqrt{r_t}\,dW_t\), apply Itô's lemma to the transformation \(Y_t = \sqrt{r_t}\) and derive the SDE satisfied by \(Y_t\). Verify that the diffusion coefficient of \(Y_t\) is constant.

Solution to Exercise 5

For the CIR-type SDE \(dr_t = (2 - r_t)\,dt + \sqrt{r_t}\,dW_t\), apply Ito's lemma to \(Y_t = \sqrt{r_t} = f(r_t)\) where \(f(r) = r^{1/2}\).

Derivatives: \(f'(r) = \frac{1}{2}r^{-1/2}\) and \(f''(r) = -\frac{1}{4}r^{-3/2}\).

By Ito's lemma:

\[ dY_t = f'(r_t)\,dr_t + \frac{1}{2}f''(r_t)(dr_t)^2 \]

With \((dr_t)^2 = r_t\,dt\) (from the diffusion term):

\[ dY_t = \frac{1}{2\sqrt{r_t}}[(2 - r_t)\,dt + \sqrt{r_t}\,dW_t] + \frac{1}{2}\left(-\frac{1}{4r_t^{3/2}}\right)r_t\,dt \]
\[ = \left[\frac{2 - r_t}{2\sqrt{r_t}} - \frac{1}{8\sqrt{r_t}}\right]dt + \frac{1}{2}\,dW_t \]

Writing in terms of \(Y_t = \sqrt{r_t}\) (so \(r_t = Y_t^2\)):

\[ dY_t = \left[\frac{2 - Y_t^2}{2Y_t} - \frac{1}{8Y_t}\right]dt + \frac{1}{2}\,dW_t = \left[\frac{1}{Y_t} - \frac{Y_t}{2} - \frac{1}{8Y_t}\right]dt + \frac{1}{2}\,dW_t \]
\[ = \left[\frac{7}{8Y_t} - \frac{Y_t}{2}\right]dt + \frac{1}{2}\,dW_t \]

The diffusion coefficient of \(Y_t\) is the constant \(\frac{1}{2}\), confirming that the square-root transformation converts the state-dependent diffusion into a constant diffusion.


Exercise 6. Suppose \(X_t\) satisfies \(dX_t = \frac{1}{2}\sigma^2 X_t\,dt + \sigma X_t\,dW_t\) with \(X_0 > 0\). Show that \(X_t = X_0\,e^{\sigma W_t}\) is a solution by computing \(d(X_0\,e^{\sigma W_t})\) using Itô's lemma.

Solution to Exercise 6

We need to show \(X_t = X_0 e^{\sigma W_t}\) solves \(dX_t = \frac{1}{2}\sigma^2 X_t\,dt + \sigma X_t\,dW_t\).

Write \(f(x, t) = X_0 e^{\sigma x}\) (note: no explicit time dependence). Derivatives:

\[ f_t = 0, \qquad f_x = \sigma X_0 e^{\sigma x} = \sigma X_t, \qquad f_{xx} = \sigma^2 X_0 e^{\sigma x} = \sigma^2 X_t \]

Apply Ito's lemma (with \(X_t = W_t\) as the underlying process):

\[ dX_t = \left(0 + \frac{1}{2}\sigma^2 X_t\right)dt + \sigma X_t\,dW_t = \frac{1}{2}\sigma^2 X_t\,dt + \sigma X_t\,dW_t \; \checkmark \]

Initial condition: \(X_0 = X_0 e^{\sigma \cdot 0} = X_0\). \(\checkmark\)

The solution is verified.


Exercise 7. Consider the time-varying linear SDE

\[ dX_t = [-a(t)X_t + b(t)]\,dt + c(t)\,dW_t. \]

(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

(a) 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:

\[ d(M(t)X_t) = M(t)\,dX_t + X_t\,dM(t) \]

with no quadratic covariation term.

Substituting

\[ dX_t = [-a(t)X_t + b(t)]\,dt + c(t)\,dW_t, \]

we get

\[ d(MX) = M[-a(t)X_t + b(t)]\,dt + Mc(t)\,dW_t + X_t\,dM \]

Rearranging,

\[ d(MX) = Mb(t)\,dt + Mc(t)\,dW_t + X_t\bigl(dM - a(t)M\,dt\bigr) \]

We choose \(M\) so that the coefficient of \(X_t\) vanishes:

\[ dM = a(t)M\,dt \]

Hence \(M\) must solve the ODE

\[ \frac{dM}{dt} = a(t)M(t), \]

so

\[ M(t) = \exp\!\left(\int_0^t a(u)\,du\right). \]

(b) With this choice,

\[ d(M(t)X_t) = M(t)b(t)\,dt + M(t)c(t)\,dW_t. \]

Integrating from \(0\) to \(t\) and using \(M(0)=1\),

\[ M(t)X_t = X_0 + \int_0^t M(s)b(s)\,ds + \int_0^t M(s)c(s)\,dW_s. \]

Therefore,

\[ X_t = M(t)^{-1}\left[X_0 + \int_0^t M(s)b(s)\,ds + \int_0^t M(s)c(s)\,dW_s\right] \]

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. The construction mirrors the integrating-factor idea used in Example 2 (OU process) and Exercise 3, generalized to time-varying coefficients \(a(t)\), \(b(t)\), \(c(t)\).