Solve the SDE: $dX_{t} = -\alpha X_{t} dt + \alpha E\{ X_{t} \} dt + \beta dW_{t}$ I would like to solve the following SDE:
$$dX_{t}  = -\alpha X_{t} dt + \alpha E\{ X_{t} \} dt + \beta dW_{t}$$ 
where $\alpha, \beta \in \mathbb{R}$ constants. But it is giving me some trouble -- mostly because I am just beginning and unsure. 

My Solution So Far:
We rewrite this equation as:
$$dX_{t} + \alpha X_{t} dt  = \alpha E\{ X_{t} \} dt + \beta dW_{t}$$ 
If we multiply both sides by the integrating factor:
$$ r_{t} = e^{- \int_{0}^{t} -(\alpha) ds} = e^{\alpha t} $$
we get:
$$d ( e^{\alpha t} X_{t}  )  = \alpha e^{\alpha t} E\{ X_{t} \} dt + \beta e^{\alpha t} dW_{t}$$ 
So if we integrate, and bring the exponential term to the RHS, we get:
$$ X_{t}   = X_{0} e^{-\alpha t} + \alpha e^{-\alpha t} E\{ X_{t} \} \int_{0}^{t} e^{\alpha s}  ds + \beta e^{-\alpha t} \int_{0}^{t} e^{\alpha s} dW_{s}$$ 
^^(1) Now I am not sure that last step is correct. I justify it because $E\{ X_{t} \}$ is not a random variable -- it is a constant. So I don't need to have something like $ \int_{0}^{t} e^{\alpha s} E\{ X_{s} \} ds$, right?
Anyway, that last integral is an Ito integral, and I am not sure how to solve it exactly. However I know that, using integration by parts, we have:
$$\int_{0}^{t} e^{\alpha s} dW_{s} = e^{\alpha s}W_{s}|_{0}^{t} - \alpha \int_{0} ^{t} e^{\alpha s} W_{s} ds  = e^{\alpha t}W_{t} - \alpha \int_{0} ^{t} e^{\alpha s} W_{s} ds $$
And we have:
$$\int_{0}^{t} e^{\alpha s}  ds = \frac{e^{\alpha t}}{\alpha} - \frac{1}{\alpha} $$
So then:
$$\alpha e^{-\alpha t} E\{ X_{t} \}  \int_{0}^{t} e^{\alpha s}  ds = \alpha e^{-\alpha t} E\{ X_{t} \} [ \frac{e^{\alpha t}}{\alpha} - \frac{1}{\alpha} ] = (1 - e^{-\alpha t}) E\{ X_{t} \}$$
Thus our solution is:
$$ X_{t}   = X_{0} e^{-\alpha t} + (1 - e^{-\alpha t}) E\{ X_{t} \} + \beta e^{-\alpha t} [  e^{\alpha t}W_{t} - \alpha \int_{0} ^{t} e^{\alpha s} W_{s} ds ] $$ 
which is:
$$ \boxed{X_{t}   = X_{0} e^{-\alpha t} + (1 - e^{-\alpha t}) E\{ X_{t} \} + \beta W_{t} - \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds }$$ 

Now I want to find the mean. To do so, I write:
$$ E\{ X_{t} \}  = E  \{ X_{0} e^{-\alpha t} + (1 - e^{-\alpha t}) E\{ X_{t} \} + \beta W_{t} - \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds  \} $$
Since expectation is linear, we take the expectation of each term. Writing $W_{s} = W_{s} - W_{0}$, we get:
$$E \{ W_{s} \} =  E \{ W_{s} - W_{0} \} = 0  $$
Similarly, from linearity of expectation:
$$ E \{ \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds  \} = \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} E \{ W_{s}  \}ds = 0 $$
So our expectation is:
$$ \boxed{ E\{ X_{t} \}  = e^{-\alpha t} E  \{ X_{0}  \} + (1 - e^{-\alpha t}) E\{ X_{t} \} }$$ 

Now I want to find the variance:
$$ V\{ X_{t} \} = V  \{ X_{0} e^{-\alpha t} + (1 - e^{-\alpha t}) E\{ X_{t} \} + \beta W_{t} - \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds   \} $$
which by the properties of the variance operator, becomes:
$$ V\{ X_{t} \} = V  \{ X_{0} e^{-\alpha t} + \beta W_{t} - \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds   \} $$
Now, I think I  can write:
$$ V\{ X_{t} \} = V \{ X_{0} e^{-\alpha t}  \} + V \{ \beta W_{t}  \} - V  \{ \alpha \beta \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds \} $$
^^(2) but I am not sure of that. Anyway, writing $W_{s} = W_{s} - W_{0}$ again, gives me:
$$ V\{ X_{t} \} = e^{-2 \alpha t} V \{ X_{0}  \} + \beta^{2} T - \alpha^{2} \beta^{2} V  \{ \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds  \} $$
So to evaluate the integral, I recall that $V{x} = E\{ x^{2} \} - E\{x\}^{2}$. Thus:
$$ V   \{ \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds  \} = E  \{ ( \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds )^{2} \} - E \{ {\int_{0}^{t} e^{\alpha(s-t)} W_{s} ds}^{2} \} $$
Bringing the expectation inside the right term, just like in the mean computation, we get that $ E \{ {\int_{0}^{t} e^{\alpha(s-t)} W_{s} ds}^{2} \} = 0$
So we are left with:
$$V   \{ \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds  \} = E  \{ ( \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds )^{2} \} $$
This one I am not really sure how to solve. I think I can write:
$$E  \{ ( \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds )^{2} \}  = E  \{ \int_{0}^{t} e^{\alpha(s-t)} W_{s} ds \int_{0}^{t} e^{\alpha(p-t)} W_{p} dp \} = E  \{ \int_{0}^{t} \int_{0}^{t} e^{\alpha(p + s-t)} W_{p} W_{s} dp ds \} =  \int_{0}^{t} \int_{0}^{t} e^{\alpha(p + s-t)} E  \{ W_{p} W_{s} \} dp ds  = 0    $$
^^(3) but I am not sure of that. So then: 
$$ \boxed{V\{ X_{t} \} =  e^{-2 \alpha t} V \{ X_{0}  \} + \beta^{2} T}  $$

Is this analysis correct? Am I going wrong somewhere? Specifically I am not sure of the steps marked (1), (2), and (3) above.
Could anyone provide some insight, or show how solve and then do the analysis for this SDE?
Thanks!
 A: 
$\DeclareMathOperator{\E}{E}
   \DeclareMathOperator{\Var}{Var}$
 We wish to solve your SDE, more commonly known as an Ornstein-Uhlenbeck Process, $$ \mathrm d X_t = -\alpha X_t\,\mathrm d t + \alpha \E[X_t]\,\mathrm d t + \beta\,\mathrm d W_t. \tag{SDE}\label{SDE} $$
We can proceed as you suggest by considering the auxilliary process $e^{\alpha t}X_t$, where $X$ satisfies \eqref{SDE}, so that $$ \mathrm d (e^{\alpha t} X_t) =\alpha e^{\alpha t}\E[X_t]\,\mathrm d t + \beta e^{\alpha t} \,\mathrm d W_t. \tag{1}\label{1} $$ In particular, this means that $$ e^{\alpha t}X_t = X_0 + \alpha \int_0^t e^{\alpha s} \E[X_s]\,\mathrm d s + \beta\int_0^t e^{\alpha s}\,\mathrm d W_s. $$ Taking expectations on both sides, we find that $$ e^{\alpha t} \E[X_t] = \E[X_0] + \alpha \int_0^t e^{\alpha s} \E[X_s]\,\mathrm ds. $$
Letting $Y_t = e^{\alpha t}\E[X_t]$, we see that $Y$ satisfies the differential equation $$ \frac{\mathrm d Y_t}{\mathrm d t} = \alpha Y_t, $$ which has the solution $Y_t = Y_0 \exp(\alpha t)$. Thus, $e^{\alpha t}\E[X_t] = \E[X_0] e^{\alpha t}$, so that $\E[X_t] = \E[X_0]$ for all $t\ge 0$.
We can then use \eqref{1} to find that $$ X_t = e^{-\alpha t}X_0 + \left(1 - e^{-\alpha t}\right)\E[X_0] + \beta\int_0^t e^{\alpha (s-t)}\,\mathrm d W_s. \tag{*}\label{*} $$
I don't think the solution of the SDE can become much more explicit than \eqref{*}. However, we do know that $X$ is a process with mean given by $\E[X_0]$, and, assuming that $X_0$ is independent of the Brownian motion $W$, variance $$ \Var (X_t) = e^{-2\alpha t} \Var(X_0) + \beta^2 \int_0^t e^{2\alpha(s-t)}\,\mathrm d s .$$ The form of the second term makes use of Itô's isometry.

As an aside, the fact that $\E[X_t] = \E[X_0]$ can be readily seen from \eqref{SDE}, which states that $$ X_t = X_0 - \alpha\int_0^t X_s \,\mathrm d s + \alpha \int_0^t \E[X_s] \,\mathrm d s + \beta W_t.$$ One can then take expectations on both sides and use Fubini's theorem to get the result.
