Consider the stochastic differential equation,

dS_t = \mu S_tdt + \sigma S_tdW_t, for all t \in [0, T],

where \{W_t\}_{t\geq0} is a standard Brownian motion, \mu, \sigma and S_0 are positive constants. Derive the unique solution to the above SDE . Calculate \mathbb{E}[S_t] and Var[S_t].

Skipping working the unique solution is...

S_t = S_0e^{(\mu - \tfrac{\sigma^2}{2})t - \sigma W_t}.

Now to find the expectation and variance. I've realized that a lot of the things I do I do because I have seen them in lectures or done them in other questions but I now realize I have no idea why they are true.

\mathbb{E}[S_t] = \mathbb{E}[S_0e^{(\mu - \tfrac{\sigma^2}{2})t - \sigma W_t}] = S_0e^{\mu t}\mathbb{E}[e^{-\tfrac{\sigma^2}{2}t - \sigma W_t}] =S_0\mu. Now why is that last step true?

My guess is something to do with...

\mathbb{E}[W_t] = 0

But I don't know what to do with the \sigma although I assume that it eventually comes out to be e^0 = 1.

Now the variance...

The way my lecturer does it is to calculate Var[S_t] = \mathbb{E}[(S_t - \mathbb{E}[S_t])^2] but I always calculate \mathbb{E}[S_t^2] instead then do the usual subtraction of (\mathbb{E}[S_t])^2.

So, I get...

\mathbb{E}[S_t^2] = \mathbb{E}[S_0^2e^{2(\mu - \tfrac{\sigma^2}{2})t + 2 \sigma W_t}].

= S_0^2 e^{2\mu t}\mathbb{E}[e^{-\sigma^2 t + 2 \sigma W_t}] but now I am not sure how to justify the next step.

= S_0^2 e^{2\mu t}e^{-\sigma^2 t} (actually should that be e^{\sigma^2 t}..?!?)