# Computation of basic stochastic integral.

I am trying to compute the covariance of a 1 dimensional Ornstein-Uhlenbeck process $dx_t=-\theta x_t dt+ \sigma dW_t$, $\theta>0$ and I am at the stage, $$\text{Cov }(x_s,x_t)=\sigma^2 e^{-\theta(t+s)} \mathbb{E}\left[ \int_0^s e^{\theta u}dW_u \int_0^t e^{\theta v} dW_v\right].$$

Is it possible to evaluate the stochastic integrals explicitly and if not how does one go about simplifying this. On Wikipedia, they say this is equal to $\frac{\sigma^2}{2\theta} e^{-\theta(t+s)} (e^{2\theta s\wedge t } -1)$ but I cannot see how they reach this conclusion.

Thanks.

-
Note that in your case you've forgotten the term $\frac{1}{2\theta}$ in the reference to Wikipedia's formula – Ilya Mar 18 '13 at 16:48
@David I hope you don't mind that I've made a small edit. Not everyone knows what "OU" stands for. – Byron Schmuland Mar 18 '13 at 16:58

The trick you shall learn when dealing with Ito integrals is that $$\int_a^bf_s\mathrm d W_s\quad\text{ and }\quad \int_b^cf_s\mathrm d W_s$$ are independent whenever $a<b<c$, it follows from independence of increments of $W_t$. As a result, if you assume that in your case $s\leq t$ then $$\mathsf E\left[\int_0^s f_u\mathrm dW_u \int_0^t f_v\mathrm dW_v\right] = \mathsf E\left[\left(\int_0^s f_u\mathrm dW_u \right)^2\right] + \mathsf E\left[\int_0^s f_u\mathrm dW_u\int_s^t f_v\mathrm dW_v\right]$$ $$= \int_0^s\mathsf E[f^2_u]\mathrm du + \mathsf E\left[\int_0^s f_u\mathrm dW_u\right]\cdot\mathsf E\left[\int_s^t f_v\mathrm dW_v\right] = \int_0^s\mathsf E[f^2_u]\mathrm du.$$ Now you only have to choose $f$ appropriately.
Thanks that looks like a useful trick. I am still a bit confused though. How did you get $E\left[\left( \int f_u dW_u\right)^2\right]=\int E(f^2_u)du$? – David Mar 18 '13 at 17:42
@Ilya can I ask why the last line of your proof is correct, i.e why does $E\left[\int^{\epsilon}_{0}f_{u}dW_{u}\right]. \left[\int^{t}_{\epsilon}f_{v}dW_{v}\right]=0$ – user110428 Nov 21 '13 at 10:58