Expectation of geometric brownian motion

The answer is that $E(X_t)=x_0e^{\mu t}$. The easiest way to see it is to start from the SDE and to note that $$\mathrm{d}E(X_t)=\mu E(X_t)\mathrm{d}t,\qquad E(X_0)=x_0.$$ Hence $a(t)=E(X_t)$ solves $a'(t)=\mu a(t)$ and $a(0)=x_0$, that is, $a(t)=x_0e^{\mu t}$ as claimed above.

Your solution goes astray when you solve the SDE, the factor of $B_t$ is wrong and, in fact, $$ X_t=x_0e^{(\mu-\sigma^2/2)t+\sigma B_t}. $$ Hence $$ E(X_t)=x_0e^{(\mu-\sigma^2/2)t}E(e^{\sigma B_t}). $$ Since $E(e^{uZ})=e^{u^2/2}$ for every real number $u$ and every standard normal random variable $Z$, the identity $E(e^{\sigma B_t})=e^{\sigma^2 t/2}$ follows from the fact that $\sigma B_t$ is distributed like $\sigma\sqrt{t}Z$. Simplifying, one gets the same expression of $E(X_t)$ than by the direct route, namely, $$E(X_t)=E(X_0)e^{\mu t}.$$


An easy way to calculate an expected value of SDE's solutions is to find an equation on $m(t) = \mathsf{E}[X_t]$. More precisely, from $$ dX_t = \mu X_tdt+\sigma X_t dB_t $$ taking expectations of both sides (while using that $\mathsf{E}[dB_t] = 0$) we obtain $$ dm(t) = \mu m(t)dt, $$ which gives a desired answer. Indeed, from the latter equation follows that $m(t) = m_0 \mathrm{e}^{\mu t}$. @Did has already described such method, but it may be useful for you to apply such method for other SDEs.

You should be aware of taking the expectation in SDE which is quite informal. On the other hand, you can equivalently write $$ X_t = X_0+ \int\limits_0^t\mu X_sds+\int\limits_0^t\sigma X_s dB_s. $$

Here you can take an expectation since on both sides there are just random variables (at each fixed moment of time). The latter integral has zero expectation since it is Ito integral.


Even though it's pretty late I think this still may be helpful for a few of you.

First of all notice as $B_t$ is a geometric Brownian motion, by definition it is normally distributed with mean $0$ and variance $t$.

I.e. $B_t$ has the moment-generating function

\begin{equation}\label{moment}\tag{1} \mathbb{E}[\exp(u B_t)]=\exp(\frac{1}{2}u^2t),\qquad u\in\mathbb{R}. \end{equation}

Now we have for $X_t$ being a geometric Brownian motion

$$X_t= x_0 \exp\Big(\big(\mu - \frac{\sigma ^2}{2}\big)t+\sigma B_t\Big).$$

Therefore, applying the expectation value yields

\begin{align} \mathbb{E}[X_t]&= \mathbb{E}\Big[x_0 \exp\Big(\big(\mu - \frac{\sigma ^2}{2}\big)t+\sigma B_t\Big)\Big]\\ &=x_0 \exp\Big(\big(\mu - \frac{\sigma ^2}{2}\big)t\Big)\mathbb{E}\Big[ \exp\big(\sigma B_t\big)\Big]. \end{align}

So, by using equality \eqref{moment} with $u=\sigma$ we get

\begin{align} \mathbb{E}[X_t]&= x_0 \exp\Big(\big(\mu - \frac{\sigma ^2}{2}\big)t\Big)\mathbb{E}\Big[ \exp\big(\sigma B_t\big)\Big]\\ &=x_0 \exp\Big(\big(\mu - \frac{\sigma ^2}{2}\big)t\Big)\exp\big(\frac{1}{2}\sigma^2 t\big)\\ &=x_0 \exp\big(\mu t\big). \end{align}

This gives you the desired result.