# Verify Langevin equation

Consider the Langevin equation:

$$dX_t = -bX_tdt +adB_t, ~~~ X_0 = x_0,$$

where $$a,b>0$$. We know that the solution is

$$X_t = e^{-bt}x_0 + ae^{-bt} \int_0^t e^{bs} dB_s.$$

Now I want to verify the solution. But in the last step I have $$e^{-bt}x_0$$ and not $$X_t$$, here are my steps:

\begin{align} dX_t &= d[e^{-bt}x_0 + ae^{-bt} \int_0^t e^{bs} dB_s]\newline &= de^{-bt}x_0 + ad[e^{-bt} \int_0^t e^{bs} dB_s]\newline &= -be^{-bt}x_0dt + ae^{-bt}e^{bt} dB_t ~~\text{(using stoc. prod. rule)}\newline &= -be^{-bt}x_0dt + adB_t \newline \end{align}

It should end with $$-bX_tdt$$ and not with $$-be^{-bt}x_0dt$$, so what I am doing wrong?

You forgot the second term when applying the product rule inside the third line. You should have had : $$\begin{array}{rcl} \mathrm{d}X_t &=& \displaystyle \mathrm{d}\left(e^{-bt}X_0 + ae^{-bt}\int_0^t e^{bs}\,\mathrm{d}B_s\right) \\ &=& \displaystyle -be^{-bt}X_0\,\mathrm{d}t - abe^{-bt}\int_0^t e^{bs}\,\mathrm{d}B_s\,\mathrm{d}t + ae^{-bt}e^{bt}\,\mathrm{d}B_t \\ &=& \displaystyle -b\left(e^{-bt}X_0 + ae^{-bt}\int_0^t e^{bs}\,\mathrm{d}B_t\right)\mathrm{d}t + a\,\mathrm{d}B_t \\ &=& \displaystyle -bX_t\,\mathrm{d}t + a\,\mathrm{d}B_t \end{array}$$