# Explicit solution of a linear SDE

I'd like an explicit formula as a function of $W_t$ (standard Brownian motion) and $\lambda >0$ for the solution of the following SDE:

$$\mathrm dX_t = \mathrm dW_t - \lambda X_t \,\mathrm dt$$

-

The SDE $$\mathrm{d} X_t = - \lambda X_t \,\mathrm{d} t + \mathrm{d} W_t$$ has as solution $$X_t = \mathrm{e}^{- \lambda t} X_0 + \int_0^t \mathrm{e}^{- \lambda \left( t - s \right)} \,\mathrm{d} W_s$$

If you make the transformation $Y_t = \mathrm{e}^{\lambda t} X_t$, then by Ito's formula applied to $Y_t = f \left( t, X_t \right)$ and after simplifications you get $$Y_t = Y_0 + \int_0^t \mathrm{e}^{\lambda s} \,\mathrm{d} W_s$$

By the way, and as additional information, the solution is a special case of the Ornstein-Uhlenbeck process.

-

Since the given SDE is a linear SDE we can solve this equation using a similar approach as for linear ODEs:

1. Solve the homogeneous SDE $dX_t^\circ = - \lambda \cdot X_t^\circ \, dt$: In this case that's pretty easy, we find $$X_t^\circ := X_0^\circ \cdot e^{- \lambda \cdot t}$$ as a solution of the homogeneous SDE.
2. Solve the linear SDE: Choose $X_0^\circ := 1$ and define $$Y_t := \frac{1}{X_t^\circ}= e^{\lambda \cdot t}$$ (i.e. $\frac{1}{Y_t}$ solves the homogeneous equation for inital value $Y_0=1$). Now set $Z_t := X_t \cdot Y_t$. By applying Itô's formula to $f(x,y) := x \cdot y$ we obtain $$dZ_t = X_t^\circ \, dW_t = e^{-\lambda \cdot t} \, dW_t \\ \Rightarrow Z_t = Z_0 +\int_0^t e^{-\lambda \cdot s} \, dW_s$$ Thus $$X_t = \frac{Z_t}{Y_t} = e^{-\lambda \cdot t} \cdot \bigg(\underbrace{Z_0}_{X_0 \cdot Y_0=X_0}+ \int_0^t e^{-\lambda \cdot s} \, dW_s \bigg)$$

Using this approach one can solve any linear SDE of the form

$$dX_t = (\alpha(t)+\beta(t) \cdot X_t) \, dB_t + (\gamma(t) + \delta(t) \cdot X_t) \, dt$$

where $\alpha,\beta,\gamma,\delta: [0,\infty) \to \mathbb{R}$ are determinstic coefficients.

-