Expectation of geometric mean reversion process The second part to a question I asked here in which I had to show that the solution to 

$dX_t = \kappa\left(\alpha-\ln X_t \right)X_t dt + \sigma X_t dB_t$

was

$ X_t = \exp \left( \mathbb{e}^{-k t}\ln x+(a-{\sigma^2\over2k})(1-\mathbb{e}^{k t})+\sigma \mathbb{e}^{-k t}\int_0^t \mathbb{e}^{k s}\mathbb{d}B_s\right), \space X_0 = x &gt; 0$

Part two asks to show that:

$\mathbb{E}\left[X_t\right] = \exp\left( \mathbb{e}^{-\kappa t} \ln x + (\alpha - {\sigma^2 \over 2 \kappa})(1-\mathbb{e}^{-\kappa t}) + {\sigma^2(1-\mathbb{e}^{-2 \kappa t})\over 2 \kappa}\right)$

I thought that I could take the expectation of the first 2 terms in the exponential, the final term would be zero since:

$\mathbb{E}\left[ \int_S^T f(t,\omega) dB_t \right] = 0$

If $f(t,\omega)$ is $\mathscr{B}\times\mathscr{F}-$measurable, $\mathscr{F}_t$-adapted and  $\mathbb{E}\left[\int_S^T f^2dt\right]&lt;\infty.$

How do you obtain the last term in the exponent?

Edit from comments:

Need to compute $\mathbb{E}\left[\exp(\sigma\mathbb{e}^{-kt} \int_0^t \mathbb{e}^{ks} dB_s)\right]$

The mean of the integral in the exponent is 0 and the variance:

$\mathbb{Var} \left[\int_0^t \mathbb{e}^{ks} dB_s \right] = \mathbb{E}\left[(\int_0^t \mathscr{e}^{ks} dB_s)^2\right] = \frac{1}{2\kappa}(\mathbb{e}^{2 k t}-1)$

...by Ito-isometry and computing a trivial intergral.

Then since the co-efficient is $\sigma \mathbb{e}^{-kt}$, to get the variance of the non deterministic term in the exponent multiply the variance by the square since it is a normal i.e.:

$\mathbb{Var}\left[ \sigma \mathbb{e}^{-k t}\int_0^t \mathbb{e}^{k s}\mathbb{d}B_s \right]=\frac{\sigma^2}{2\kappa}(1-\mathbb{e}^{-2\kappa t})$

$\mathbb{E}\left[ \exp(Z) \right]=\mathbb{e}^{\mu+{\sigma'}^2/2}, Z \sim \mathscr{N}(0, \frac{\sigma^2}{2\kappa}(1-\mathbb{e}^{-2\kappa t}))$

$\mathbb{E}\left[ \exp\left( \sigma \mathbb{e}^{-kt} \int_0^t \mathbb{e}^{ks} dB_s\right)\right]= \exp(\frac{\sigma^2}{4k}(1-\mathbb{e}^{-2kt}))$

This is out by a factor of 1/2.
Take a function, $f(t, X(t)) = \exp( t)\log X(t)$ then apply Ito's lemma and solve where $f(t) =  \exp{ t} \log X(t) ; f(X(t)) = \exp( t)/ X(t)$
and $f(X^2(t)) = -\exp( t)/(2 * X(t)^2))$
Take a function, $f(t, X(t)) = \exp( t)\log X(t)$ then apply Ito's lemma and solve where $f(t) =  \exp{ t} \log X(t) ; f(X(t)) = \exp( t)/ X(t)$
and $f(X^2(t)) = -\exp( t)/(2 * X(t)^2))$