I am trying to figure out how a particular SDE can be integrated. The SDE is the normal mean-reverting model:
$dX_t = \theta(\mu - X_t)dt + \sigma dW_t$ (1)
Where $W_t - N(0,t)$. So far, I have found the solution of:
$X_t = X_0e^{-\theta t} + \mu(1-e^{-\theta t}) + e^{-\theta t} \int^t_0 \sigma e^{\theta s} dW_s$ (2)
This is standard and easy enough to find. However, I am looking to decompose this solution into the form.
$X_T = X_0 + (\mu - X_0)(1 - e^{-\theta t})+\sigma \sqrt{\frac{1-e^{-2\theta t}}{2 \theta}}W_t$ (3)
I have found that adding to the right-hand side of (2), $X_0 - X_0$, is a nice trick to get the two left terms on the right-hand side of (3). I am also confident that one needs to find the variance and mean of the integral term in (2) to get the solution for (3). However, I am not sure how to go about doing this.
If anyone can help, I'd be very appreciative. Thanks.