Can someone explain me what is wrong in my derivation of the formula for the moments of a GBM using Ito's lemma (I am not interested in other methods) ? \begin{equation} dX=\mu Xdt+\sigma XdW_t \end{equation} setting $Y=X^n$ we have \begin{equation} \frac{dY}{Y}=(n\mu+\frac{1}{2}n(n-1)\sigma^2t)dt+ n \sigma dW_t \end{equation} at this point my book says "the expectation of $Y=X^n$ follows directly: \begin{equation} E[X(t)]^n=X(0) \exp{(n\mu+\frac{1}{2}n(n-1)\sigma^2)}t \end{equation} however, when I try to do this step something goes wrong. I start solving for $Y_t$ in the usual way (taking the logarithm and then computing the differential) and so I obtain \begin{equation} \begin{split} d\log Y_t& =\frac{1}{Y}dY-\frac{1}{2Y^2}(dY)^2 \\ & = \frac{1}{Y} \biggl( (n\mu+\frac{1}{2}n(n-1)\sigma^2t)Ydt+ n \sigma Y dW_t \biggr)-\frac{1}{2Y^2}n^2 Y^2 \sigma^2 dt \\ & = [ (n\mu+\frac{1}{2}n(n-1)\sigma^2t)-\frac{1}{2}n^2 \sigma^2 ]dt + n \sigma dW_t \end{split} \end{equation} As you can see I obtain a $-\frac{1}{2}n^2 \sigma^2$ in the drift that I should not obtain
Thank you for your help
You have $$ \Bbb E(e^{σ·W_t}) = e^{\frac12σ^2·t} $$ so that the extra term in the solution formula for $Y_t$ cancels again when taking the expectation.