1. ## Ornstein-Uhlenbeck equation

I find out the solution of Ornstein-Uhlenbeck equation $\ dX_{t}=\mu X_{t}dt+\sigma bB_{t}\$ is
$\ X_{t}=X_{0}e^{\mu t}+\sigma \int_{0}^{t}e^{\mu \left ( t-s \right )}dB_{s}\$

My problem is how to find $\ E\left [ X_{t} \right ]\$ and $\ var\left [ X_{t} \right ]=E\left [ \left ( X_{t}-E\left [ X_{t} \right ] \right )^{2} \right ]\$

It seems like it is easy to find the mean and variance.But I was trying and got no solution

2. Originally Posted by elenaas
I find out the solution of Ornstein-Uhlenbeck equation $\ dX_{t}=\mu X_{t}dt+\sigma bB_{t}\$ is
$\ X_{t}=X_{0}e^{\mu t}+\sigma \int_{0}^{t}e^{\mu \left ( t-s \right )}dB_{s}\$

My problem is how to find $\ E\left [ X_{t} \right ]\$ and $\ var\left [ X_{t} \right ]=E\left [ \left ( X_{t}-E\left [ X_{t} \right ] \right )^{2} \right ]\$

It seems like it is easy to find the mean and variance.But I was trying and got no solution
All you need to know is $E[\int_0^t f(s) dB_s]=0$, because this integral is a martingale (as a function of $t$), and $E[\left(\int_0^t f(s) dB_s\right)^2]=\int_0^t f(s)^2 ds$, as follows from the definition of the stochastic integral.

3. I suppose that I got the correct solution, but I would like you to confirm me.
I started with an explicit solution of the SDE

because this integral is an Ito integral and it is martingale
So the mean is:

and for the variance I got:

I used that

4. Originally Posted by elenaas
I suppose that I got the correct solution, but I would like you to confirm me.
I started with an explicit solution of the SDE

because this integral is an Ito integral and it is martingale
So the mean is:

and for the variance I got:

I used that

It depends on what is $X_0$. If it is constant, then you are correct (and $E[X_t]=X_0e^{\mu t}$). If it is a random variable, then it must appear in the variance: $X_t-E[X_t]=(X_0-E[X_0])e^{\mu t} +\int_0^t (\cdots)$ and both terms are independent and centered hence $E[(X_t-E[X_t])^2]={\rm Var}(X_0)e^{2\mu t}+E[(\int_0^t(\cdots))^2]$ = ${\rm Var}(X_0)e^{2\mu t}+\frac{\sigma^2}{2\mu}(e^{2\mu t}-1)$. I think.