# Question on use of Ito's formula with integral in the function

This question is being asked in the context of the Feynman-Kac formula. Suppose the real-valued process $$Z$$ satisfies the SDE $$dZ_t=b(Z_t)dt+\sigma(Z_t)dW_t.$$ Suppose we have functions $$f:\mathbb{R}\to\mathbb{R}$$ and $$v:[0,T]\times\mathbb{R}\to\mathbb{R}$$ (satisfying any necessary regularity conditions) and define $$M_t=e^{-\int_0^tf(Z_s)ds}v(t,Z_t)$$.

I am interested in the use of Itô's lemma to describe the evolution of $$M$$. The notes I am reading (I am just deducing from skipped over calculations) seem to imply that the exponential part of the definition of $$M$$ is only relevant in the $$t$$-derivative part of Ito's Lemma - but is it not a function of $$Z_t$$, and therefore relevant in the $$Z_t$$-derivative part? Ie the notes imply $$dM_t=e^{-\int_0^tf(Z_s)ds}\left(\left(-f(Z_t)v(t,Z_t)+\frac{\partial v}{\partial t}(t,Z_t)\right)dt+\frac{\partial v}{\partial z}(t,Z_t)dZ_t+\frac{\partial^2v}{\partial z^2}(t,Z_t)d[Z]_t\right)$$ so why is the $$z$$-derivative of $$e^{-\int_0^tf(Z_s)ds}$$ not relevant?

Recall that for $$M_t = X_t Y_t$$, the Itô produt rule tells us that $$dM_t = X_t dY_t + Y_t dX_t + d \langle X,Y\rangle_t$$ In your case, you may set $$X_t = e^{- \int_0^t f(Z_s) ds }$$, so that $$dX_t = -f(Z_t) X_t dt$$. Moreover, $$X_t$$ is of bounded variation, so $$d\langle X, Y\rangle_t = 0$$. Setting $$Y_t = v(t,Z_t)$$, Itô's lemma gives us that: $$dY_t = \frac{\partial v}{\partial t}(t,Z_t) dt + \frac{\partial v}{\partial x}(t,Z_t)dZ_t + \frac{1}{2}\frac{\partial^2 v}{\partial x^2}(t,Z_t)d\langle Z\rangle_t$$ Using the product rule, it follows that \begin{align*} dM_t &= e^{- \int_0^t f(Z_s) ds } \left( \frac{\partial v}{\partial t}(t,Z_t) dt + \frac{\partial v}{\partial z}(t,Z_t)dZ_t + \frac{1}{2}\frac{\partial^2 v}{\partial z^2}(t,Z_t)d\langle Z\rangle_t \right) - f(Z_t)e^{-\int_0^t f(Z_s)ds}v(t,Z_t)dt \\ &= e^{-\int_0^tf(Z_s)ds}\left(\left(-f(Z_t)v(t,Z_t)+\frac{\partial v}{\partial t}(t,Z_t)\right)dt+\frac{\partial v}{\partial z}(t,Z_t)dZ_t+\frac{\partial^2v}{\partial z^2}(t,Z_t)d\langle Z\rangle_t\right) \end{align*}