# How to compute the dynamic of stock using Geometric Brownian Motion?

I have been given the following question:

Given that $$S_t$$ follows Geometric Brownian Motion, write down the dynamic of $$S_t$$ and then compute the dynamic of $$f(t,S_t) = e^{tS^{2}}$$

For the first part of the question, I have got this answer: $$dS_t = \mu S_tdt + \sigma S_t dWt$$

Is it correct?

And for the second part, I know that the price $$f(t,S_t)$$ follows the process $$df = (\frac{\partial f}{\partial t}+\mu S_t \frac{\partial f}{\partial S_t}+\frac{1}{2} \sigma ^2S_t\frac{\partial^2f}{\partial S_t^2})dt +\sigma S_t dWt$$

I am having trouble finding the answer using this process and given the information.

Any help is appreciated.

The above equation should correctly read as follows:

$$df=\big(\frac{\partial f}{\partial t}+\mu S_t \frac{\partial f}{\partial S_t}+\frac{1}{2}\sigma^2 S_t^2\frac{\partial^2 f}{\partial S_t^2}\big)+\sigma S_t \frac{\partial f}{\partial S_t}dW$$

Using:

(a) $$\frac{\partial f}{\partial t}=S_t^2f$$

(b) $$\frac{\partial f}{\partial S_t}=2S_ttf$$

(c) $$\frac{\partial^2 f}{\partial S_t^2}=2tf+4S_t^2t^2f$$

The Stochastic Differential Equation (SDF) governing the dynamics of $$f$$ becomes:

$$\frac{df}{f}=dt \big(S_t^2+2 \mu S_t^2t+\sigma^2S_t^2t+2\sigma^2S_t^4t^2 \big)+2S_t^2t\sigma dW$$