Let $W_t$ be a Brownian motion. Is $W^2-t$ martingale? We start by taking the derivatives with respect to $t$ and $W_t$.
- 1) Defining f(t, X) = $X^2-t$.
$\frac{df(t,X)}{dt}$ = $-1$; $\frac{df(t,X)}{dX}$ = $2x$; $\frac{d^2f(t,X)}{dX^2}$ = $2$.
2) Using Ito's lemma: df = $\frac{df(t,X)}{dt}$(dt) + $\frac{df(t,X)}{dX}$(dX) + $\frac{1}{2}\frac{d^2f(t,X)}{dX^2}(dX)^2$.
3) Substituting X = $W_t$ and the derivatives: df = -1dt + 2$W_t(dW_t)$ + $\frac{1}{2}2(dW_t)^2$
4) $(dW_t)^2 = (dW^2-t)^2 = (dW^4 -t^2 +2dW^2t)$
And from here I have massive problems obtain the desired solution
- = $2W_tdW_t$
I am quite confused when you need to substitute the full function $W^2-t$ in step 3.
At that moment, do we need to insert the derivative notation so like this : $dW^2-dt$ and then expand for the second derivative so ($dW^2-dt)^2$ and then expand power given us the following: ($dW^4-dt^2 + dW^2dt)$?
Can someone explain this to me and finish what I started in explicit derivation?
Edit: I was given clear instructions to find the diffusion equation using Ito's lemma.
Perhaps you just made a simple substitution mistake. When you wrote $$(dW_t)^2 = (dW - t)^2,$$ you actually substituted what you thought would be $dX_t$. But in fact, $X_t = f(t, W_t)$, and so the term $(dX)^2$ in your Ito formula corresponds to just $(dW_t)^2 = t$, as in the answer you linked in the comments. Indeed, there $f$ was a function of $S_t$ alone, and an expression for $dS_t$ was given. In your situation, you have an expression in terms of $X_t = W_t^2 - t$ and it's just a question of evaluating $dX_t$.