I want to compute
$$\frac{d}{dt}\left[ \int_t^{\tau}e^{-r(s-t)}(-pc) \,ds\right]$$ First, I know that I can just solve the integral and take the derivative:
$$\frac{d}{dt}\left[ \int_t^{\tau}e^{-r(s-t)}(-pc) \,ds\right]=\frac{d}{dt}\left[ \frac{-pc}{r}\left(1-e^{-r(\tau-t)}\right)\right]$$ $$=pc\cdot e^{-r(\tau-t)}$$
however, I want to solve it "straight away" using the Fundamental Theorem of Calculus. However, I must be doing something wrong because I obtain the following:
$$\frac{d}{dt}\left[ \int_t^{\tau}e^{-r(s-t)}(-pc) \,ds\right]=-e^{-r(t-t)}(-pc)-pc\int_t^{\tau} \frac{d}{dt}e^{-r(s-t)}ds$$ $$=pc-pc\cdot r\int_t^{\tau} e^{-r(s-t)}ds$$ $$=pc+pc [e^{-r(\tau-t)}-1]$$ $$=pc\cdot e^{-r(\tau-t)}$$
Comment: Initially, I did an algebra mistake and wasn't getting the same result for the second equation. Now it seems to be right. The magic of typing in latex code :). Already wrote the question though. So tell me if the way I compute this second derivative is correct according to you.