TITLE: Application of fundamental theorem of calculus
QUESTION [8 upvotes]: I have this problem:
$$ \frac{d}{dx} \left( \int_{\sqrt{x}}^{x^2-3x} \tan(t) dt \right) $$
I know how found the derivative of the integral from constant $a$ to variable $x$ so:
$$ \frac{d}{dx} \left( \int_a^x f(t) dt  \right) $$
but I don't know how make it between two variables, in this case from $\sqrt{x}$ to $x^2-3x$
Thanks so much.

REPLY [4 votes]: First we work formally: you can write your integral, say $F(x)=\int_a^{g(x)}f(t)\,dt-\int_a^{h(x)}f(t)\,dt$, where $f,g$ and $h$ are the functions appearing in your problem, and $a\in\mathbb R$ is constant. Next, you can apply chain rule together with fundamental theorem of calculus in order to derivate the difference above.
What is left? the existence of such $a$: Recall that by definition the upper and lower Riemann integrals are defined for bounded functions, so it is required that your integrand $\tan$ is bounded on one of the possible two integration intervals $I=[f(x),g(x)]$ or $J=[g(x),f(x)]$. This occurs only when
$$\sqrt x,\,x^2-3x\in\Bigl(-\frac{\pi}2+k\pi,\frac{\pi}2+k\pi\Bigr),\ \style{font-family:inherit;}{\text{for some integer}}\ k\,.\tag{$\mathbf{I}$}$$
Since both $\sqrt{x}$ and $x^2-3x$ are continuous functions, the set of the values $x$ satisfying the previous inclusion is non-empty (easy exercise left to you) and open in $\mathbb R$, so it is a countable union of open intervals. When you try to calculate the derivative, you are working locally, that is, in some of these intervals, so you simply choose a fixed element $a$ in such interval, and proceed as stated at the beginning.
If you are not familiar with the notion of "open set", then simply solve explicitly the equation $(\mathbf{I})$ and see what happens.