Good day, I am trying to apply Ito's lemma to find an integral but I am struggling with my choice of functions.
$\int^ T _0 tdW(t) = T W(T)- \int^T_ 0W(t)dt$
Our version of Itos lemma states the following:
For twice continuously differentiable functions $f$ and Ito processes $$dS_t = \mu_tdt + \sigma_tdW_t$$ we have that $$df(S)=\frac{\partial f}{\partial S}(\mu_t dt + \sigma_t dW) + \dfrac{1}{2}\sigma_t^2\frac{\partial^2f }{\partial S^2}dt$$.
This can be written as:
$$f(S(T))-f(S(0))=\int_0^T \mu\frac{\partial f}{\partial S}+\dfrac{1}{2}\sigma^2\frac{\partial^2f }{\partial S^2}dt +\int_0^T\sigma\frac{\partial f}{\partial S}dW. $$
When I try to apply the lemma, I only get that $S(t)=W(t)$ and we have to put $f=tS$. But I feel that I am missing something when I differentiate.
there is "another" Ito formula concerning functions $f(t, S)$. It states that for every Ito process $S = (S_t)_{t \geq 0}$ we have that $$ d\bigl(f(t, S_t) \bigr) = \frac{\partial}{\partial t} f(t, S_t) dt + \frac{\partial}{\partial S} f(t, S_t) dW_t + \frac12 \frac{\partial^2}{\partial S^2} f(t, S_t) \sigma^2 dt. $$
Now you can apply this version of the Ito formula for $S_T = W_T$ and $f(t, s) = t \cdot s$. This results in:
$$ d\bigl(t \cdot W_t\bigr) = W_t dt + t dW_t + 0, $$ which is equivalent to $$ T \cdot W_T = \int_{0}^T W_s ds + \int_{0}^T s dW_s $$