Itô’s lemma extends the chain rule to functions of an Itô process, accounting for quadratic variation. If dXt=μtdt+σtdWt and f(t,x) is C1,2, then
df(t,Xt)=(ft+μtfx+21σt2fxx)dt+σtfxdWt.
For GBM dSt=μStdt+σStdWt, applying this with f(x)=lnx gives
dlnSt=(μ−21σ2)dt+σdWt,
so St=S0exp((μ−21σ2)t+σWt). More generally, for f(x)=xp,
d(Stp)=Stp(pμ+21p(p−1)σ2)dt+pStpσdWt,
giving E[Stp]=S0pexp((pμ+21p(p−1)σ2)t).