I'm currently picking up some introductory questions on stochastic calculus, and ran into some issues with one of them.
Let $Z_t = t^2B_t - 2\int^t_0sB_sds$, where $B$ is a standard Brownian Motion. Now to apply Ito's Lemma:
If we let $Z_t = f(t,B_t)$, where $f(t,x) = t^2x-2\int^t_0sxds$, then $$f_t(t,x) = 2tx - 2tx = 0,\quad f_x(t,x) = t^2 - 2\int^t_0sds = t^2-t^2 = 0, \quad f_{xx} = 0$$ But obviously I made a mistake somewhere because the answer is supposed to be $dZ_t = 2tB_tdt + t^2dB_t − 2tB_t$, whereas I am getting $0$ everywhere. Would appreciate some help. Thanks