# Derivative of a Wiener integral using Ito formula

Given the process $$X_t=\int_0^t g_s\,dW_s$$, compute $$dX_t$$ using the Ito formula.

The Ito formula says that, given:

$$f(t,X_t)=f(0,X_0)+\int_0^t\frac{\partial f}{\partial s}(s,X_s)\,ds+\int_0^t\frac{\partial f}{\partial x}(s,X_s)\,dX_s+\frac{1}{2}\int_0^t\frac{\partial^2 f}{\partial x^2}(s,X_s)\,d\langle X \rangle_s$$

it holds:

$$df(t,X_t)=\frac{\partial f}{\partial t}(t,X_t)\,dt+\frac{\partial f}{\partial x}(t,X_t)\,dX_t+\frac{1}{2}\frac{\partial^2 f}{\partial x^2}(t,X_t)\,d\langle X \rangle_t$$

I already know the result, that is $$dX_t=g_t\,dW_t$$, but I would like to understand how Ito formula works. I guess that first and third terms in the formula for $$df$$ are zero, but I don't get why. Why is $$\frac{\partial f}{\partial t}(t,X_t)=0$$ ? Since $$X_t$$ is a definite integral, I thought that it should be equal to $$G(t)-G(0)$$, where $$G$$ is the primitive of $$g$$, and so, since $$G(t)$$ is a function of time, its derivative is not zero.

So the question is how to compute these terms:

$$\frac{\partial f}{\partial t}(t,X_t),\quad\frac{\partial f}{\partial x}(t,X_t),\quad \frac{\partial^2 f}{\partial x^2}(t,X_t)\quad ?$$

You should put $$f(t,x) = x$$. It follows immediately that $$\frac{\partial f}{\partial t}(t,x) = 0, \;\frac{\partial f}{\partial x}(t,x) = 1, \; \frac{\partial^2 f}{\partial x^2}(t,x) = 0.$$ By Ito's formula, we have $$X_t = \int_0^t dX_s = \int_0^t g_sdW_s,$$ which is an obvious result.
• Thank you for the answer. Could you please explain why you put $f(t,x) = x$ ? From other exercises I learned to substitute the process with $x$, for example: \begin{align*}X_t=e^{\alpha W_t} \quad &\to f(t,x) = e^{\alpha x}\\ Z_t=X_t^2, \text{ with }dX_t=\alpha X_t dt+\sigma X_t dW_t \quad &\to f(t,x) = x^2\end{align*} So in this exercise I did put $f(t,x)=\int_0^t g_s\,dx$, but I was not able to compute the three partial derivatives. Could you help? Where am I wrong? Dec 14, 2018 at 13:45
• Perhaps using $x$ as a variable is confusing you. To see those examples clearly, I will write as $f(t,w) = e^{\alpha w} \rightarrow X_t = e^{\alpha W_t}=f(t,w)|_{w=W_t}$ and $f(t,x) = x^2 \rightarrow Z_t = X_t^2 = f(t,x)|_{x= X_t}$. In this case, $f(t,x) = x \rightarrow X_t = X_t = f(t,x)|_{x=X_t}$. Dec 14, 2018 at 13:48
• Thank you for the clarification. But I still don't uderstand how it is possibile to make that choice. If we have $X_t=e^{\alpha W_t}$, and we put $f(t,x) = x$ (i.e. $X_t = f(t,x)|_{x=X_t}$), then we have $$\frac{\partial f}{\partial t}(t,x) = 0, \;\frac{\partial f}{\partial x}(t,x) = 1, \; \frac{\partial^2 f}{\partial x^2}(t,x) = 0.$$ but it is not correct because in that case $dX_t=\alpha X_t dW_t+\frac{1}{2}\alpha^2 X_t dt$. I am missing something I guess. Dec 14, 2018 at 14:04
• I'll elaborate on what you are missing. If we put $f(t,x) = x$, then what follows from $X_t = f(t,x)|{x=X_t}$ is $dX_t = 0dt + 1dX_t + 0 d\langle X\rangle_t = dX_t$, not $dX_t = 0dt + 1dW_t + 0d\langle W\rangle_t$. (so the result is correct.) If we let $f(t,w) = e^{\alpha w}$ and $X_t = f(t,w)|_{w=W_t}$, then what follows is $dX_t = 0dt + \alpha e^{\alpha W_t}dW_t + \frac{1}{2}\alpha^2 e^{\alpha W_t}dt.$ You may see that both results are not contradictory. Dec 14, 2018 at 14:14
• Yes, it's right. $f(t,x) =x$ can only give us a trivial result. Ito's lemma is useful when $f(t,\cdot)$ describes a non-trivial relation between two (usually different) stochastic processes. It allows us a stochastic integral representation. Dec 14, 2018 at 14:34