I have the equation:
$$\ V_t = \int_t^T e^{\int_t^s r_x dx} X_sds $$
I need to take the derivative of this with respect to $t$. This seems like an obvious Leibniz rule problem, but I am unsure how to do this with the integral existing within the integrand.
I have:
$$\frac{d}{dt}V_t=e^{\int_t^T r_x dx} X_T \frac{d}{dt}T - e^{\int_t^t r_x dx} X_t\frac{d}{dt}t+ \int_t^T \frac{\partial}{\partial t}e^{\int_t^s r_x dx} X_sds \\ =0 - X_t+\int_t^T \frac{\partial}{\partial t}e^{\int_t^s r_x dx} X_sds $$
I am pretty shaky on all of this, so this is my best guess and I don't know how to simplify the last integral with the partials. I can definitely provide other info if you need it.
We have
$$\frac{\partial }{\partial t}\left(e^{\int_{t}^{s} r_x dx}X_s\right)=\frac{\partial}{\partial t}\left(\int_{t}^{s}r_xdx\right)e^{\int_{t}^{s} r_x dx}X_s=-r_{t}e^{\int_{t}^{s} r_x dx}X_s$$ and thus
$$\frac{d}{dt}V_t=- X_t+\int_t^T \frac{\partial}{\partial t}e^{\int_t^s r_x dx} X_sds=-X_{t}-r_{t}\int_{t}^{T}e^{\int_{t}^{s}r_xdx}dx=-X_{t}-r_{t}V_{t} $$