How to calculate $\frac{d}{dx}\left(\int_{\sin(x)}^{\cos(x)}\:e^{t^2} \, dt\right)$? How to calculate $\frac{d}{dx}\left(\int_{\sin(x)}^{\cos(x)} e^{t^2} \, dt \right)$?
First of all, how do you even visualise this? What does it mean when you integrate from a function to another function? Do I apply the fundamental theorem of calculus? But this is from a function to the other?
 A: For any particular value of $x,$ the "function" $\cos x$ and $\sin x$ are particular numbers, so you're integrating from one number to another. But just which number that is, depends on which number $x$ is. Since it depends on $x,$ it is a function of $x$ and it can be differentiated with respect to $x.$
You don't need to find an antiderivative here (and good luck trying to find it in this case!) because you have this:
$$
\frac d {dw} \int_a^w g(u) \, du = g(w).
$$
Observe that $\displaystyle \int_{\sin x}^{\cos x} = \int_0^{\cos x} - \int_0^{\sin x},$ and you can say
$$
w = \cos x \text{ and } \frac d{dx} \left( \int_0^w g(u) \, du \right) = \left( \frac d {dw} \int_0^w g(u) \, du \right) \cdot \frac{dw}{dx} = g(w)\cdot \frac{dw}{dx}.
$$
And so on.
A: We can let $F(t)$ be the antiderivative $\int e^{t^2}\,dt$. Then it is easy to see that $$\int _{\sin x}^{\cos x}e^{t^2}\,dt=F(\cos x)-F(\sin x)$$
By the fundamental theorem of calculus, $\frac d{dt}F(t)=e^{t^2}$. Hence \begin{align*}
\frac{d}{dx}\int _{\sin x}^{\cos x}e^{t^2}\,dt&=\frac{d}{dx}(F(\cos x)-F(\sin x))=e^{\cos ^2x}\frac{d}{dx}\cos x-e^{\sin ^2x}\frac{d}{dx}\sin x\\
&= -\sin xe^{\cos ^2x}-\cos xe^{\sin ^2x}
\end{align*}
A: The formula is
$\frac d{dx} \left( \int_{u(x)}^{v(x)} f(t) dt\right) =f(v(x)) v'(x) - f(u(x)) u'(x) $
In this case $f(t) =e^{t^2}$ and $u(x) =\sin x$ and $v(x) =\cos x$ hence the answer is
$e^{\cos ^2 x} (-\sin x) - e^{\sin ^2 x} (\cos x)$
A: More generally, let $f:\mathbb{R} \to \mathbb{R}$ be a continuous function, and $a,b:\mathbb{R} \to \mathbb{R}$ be differentiable functions. Let $$F(x)=\int_0^x f(t)dt.$$ By the fundamental theorem of calculus, $$\int_{a(x)}^{b(x)}f(t)dt=F(a(x))-F(b(x)).$$
Also, we know that $F'(x)=f(x)$. Therefor,
$$\frac{d}{dx}\int_{a(x)}^{b(x)}f(t)dt=\frac{d}{dx}(F(a(x))-F(b(x)))=f(a(x))a'(x)-f(b(x))b'(x).$$
In your particular case, we get that
$$\frac{d}{dx}\int_{\sin(x)}^{\cos(x)}e^{t^2}dt=-(e^{\cos^2(x)}\sin(x)+e^{\sin^2(x)}\cos(x)).$$
