TITLE: $W(t)=t^2 Z(t)-2\int_0^t sZ(s)ds$. What is $dW(t)$?
QUESTION [5 upvotes]: This is a sample question for the actuarial exam MFE.

Let $Z(t)$ be a standard Brownian motion. Let $W(t)=t^2 Z(t)-2\int_0^t sZ(s)ds$. What is $dW(t)$?

The only thing I know is Ito's Lemma. So I computed the following:
$\frac{\partial W}{\partial Z}=t^2-\frac{\partial}{\partial Z} \big( 2\int_0^t sZ(s)ds\big).$
$\frac{\partial^2 W}{\partial Z^2}=-\frac{\partial}{\partial Z^2}\big(2\int_0^t sZ(s)ds\big)$.
$\frac{\partial W}{\partial t}=2Z(t)t-\frac{\partial}{\partial t}\big(2\int_0^t sZ(s)ds\big)$
But then I don't know how to deal with the parts with integral? Here's the solution which I don't fully trust (partially because I haven't taken a proof-based class in stochastic calculus).

$dW(t)=d[t^2Z(t)]-2tZ(t)dt$.
Because $d[t^2Z(t)]=t^2dZ(t)+2tZ(t)dt$, we have $dW(t)=t^2dZ(t)$.

REPLY [3 votes]: You can solve it using Ito's lemma but I'll rewrite it in a slightly different way to avoid the issues you came upon.  We want to show $dW(t) = t^2dZ(t)$.  This is really shorthand for:
$$W(t) = W(0) + \int_0^t s^2 dZ(s)$$
You are also given
$$W(t) = t^2Z(t) - 2\int_0^t s dZ(s)$$
We can imply from there that $W(0) = 0$ and so our ultimate goal is to show
$$\int_0^t s^2 dZ(s) = t^2Z(t) - 2\int_0^t s dZ(s)$$
Now we can proceed, applying Ito's Lemma to the process $X_t=f(t,Z(t))$ where $f$ is the function $$f(t, x) = t^2x.$$ One gets
$$dX_t = f_x(t, Z(t)) dZ(t) + f_t(t, Z(t)) dt + \frac{1}{2}f_{xx}(t, Z(t))dZ(t)^2$$
The last term is $0$ because $f$ is linear in $x$ and we find
$$dX_t = t^2 dZ(t) + 2tZ(t) dt$$
which is shorthand for
$$X_t = X_0 + \int_0^t s^2 dZ(s) + 2\int_0^t s Z(s) ds$$
But $X_t = t^2Z(t)$ so we are done.