I'm working on reviewing one of the problems in the REA GRE math subject test prep book which is to find the derivative of
$$ f(x) = \int_x^0 \frac{\cos(xt)}{t}dt $$
My first thought was to flip the limits of integration, and then to apply the fundamental theorem of calculus, but I'm not sure how that applies when the function being integrated is a function of $x$ and $t$, and not just $t$ alone.
The book gives the solution, but I don't understand what they do in the first step. They say the derivative is equal to:
$$ - \frac{\cos(x^2)}{x} - \int_0^x \frac{t \sin(xt)}{t}dt $$
But I'm not sure how they got there.
It's like product rule.
$$\frac{d}{dx} \int_0^x f(x,t) dt$$
$$ = f(x,x) + \int_0^x \frac{\partial}{\partial x} f(x,t) dt$$
Explanation: First differentiate with respect to the bounds treating the $f(x,t)$ constant and then differentiate with respect to the $f(x,t)$ treating the bounds constant.
https://en.wikipedia.org/wiki/Leibniz_integral_rule#Formal_statement