Differentiating Indefinite Integrals Suppose that $f$ is twice differentiable. Find the second derivative of $$\int_a^x\cos(f(u))du$$.
I suppose I will be using the Fundamental Theorem of Calculus here. However I have a feeling that its first derivative is not just $\cos(f(x))$, because of the assumption that $f$ is twice differentiable.
Can you please help me clear out my doubts.
 A: The fundamental theorem of calculus states that if $f$ is the derivative of $F$, then we have
$$\int_a^x f(u) \ du = F(x)-F(a)$$
Differentiating each side we get
$$\frac{d}{dx} \int_a^x f(u) du=F'(x)=f(x)$$
So the first derivative is just $\cos(f(x))$ in your case.
A: You can also go about finding the first derivative of this integral using Lebniz integral rule, which states that for ${\displaystyle -\infty <a(x),b(x)<\infty } $
$${\displaystyle {\frac {d}{dx}}\left(\int _{a(x)}^{b(x)}g(x,t)\,dt\right)=g{\big (}x,b(x){\big )}\cdot {\frac {d}{dx}}b(x)-g{\big (}x,a(x){\big )}\cdot {\frac {d}{dx}}a(x)+\int _{a(x)}^{b(x)}{\frac {\partial }{\partial x}}g(x,t)\ dt} $$
Since in this case since you only have one variable for $f$ inside the integral, the rule reduces to
${\displaystyle {\frac {d}{dx}}\left(\int _{a(x)}^{b(x)}g(t)\,dt\right)}=g{\big (}b(x){\big )}\cdot {\frac {d}{dx}}b(x)-g{\big (}a(x){\big )}\cdot {\frac {d}{dx}}a(x)$
Replacing the $g$ above with $\cos({f(u)})$ and plugging in the respective bounds for the integral will finally give you the result of the derivative just to be $\cos(f(x))$ itself.
