# Problem involving a derivative under the integral sign

Gold Member

## Homework Statement

if ## f(x) ={\int_{\frac{\pi^2}{16}}^{x^2}} \frac {\cos x \cos \sqrt{z}}{1+\sin^2 \sqrt{z}} dz## then find ## f'(\pi)##
2. The given solution
Differentiating both sides w.r.t x
##f'(x) = {-\sin x {\int_{\frac{\pi^2}{16}}^{x^2}} \frac{\cos \sqrt{z}}{1+\sin^2 \sqrt{z}} dz }+{ \frac{\cos x \cos x}{1+\sin^2{x}} 2x } - {0} ##
then put ##\pi## in place of x to find the answer ##2 \pi##

3. The problems in the solution
Note- I have the solution but am unable to understand it. I encountered this while trying to learn the application of newton-leibniz theorem and I'm comfortable with its basic application when integral is in the form ## \int_{n(x)}^{g(x)} f(x) dx##. I'm having trouble understanding
1) there are two variables, z and x wherein I have seen the theorem being applied only for a single variable everywhere.
2) The term after the plus sign is clearly the same procedure as in the theorem where the upper limit ##x^2## was put in place of z but it was not put in place of cosx as cos(x^2) but only for the rest of the function where z is present.
3) No idea how we got the first term. all I know is they differentiated cosx and somehow took -sinx out of the integral sign
maybe they used product rule of derivatives but is that possible under the integral sign?
Please help me learn this better and remove my conceptual doubts- I'd be really grateful. Thank you.

Delta2
Homework Helper
Gold Member
It is important here that the variable of integration is z, different than x. You can write the integral as ##f(x)=\cos x \cdot g(h(x)) ## where ##g(x)=\int_\frac{\pi^2}{16}^x\frac{cos\sqrt z}{1+\sin^2\sqrt z}dz## and ##h(x)=x^2##, that is you can treat ##\cos x## as constant with respect to z, cause z and x are independent variables.

Krushnaraj Pandya
Stephen Tashi
Did you apply the formula for differentiating integrals given in https://en.wikipedia.org/wiki/Leibniz_integral_rule ?

It would not be correct to change ##\int_{a(x)}^{b(x)} f(x)g(z) dz ## to ##f(x) \int_{a(x)}^{b(x)} g(z) dz## before differentiating with respect to ##x##.

Krushnaraj Pandya
Delta2
Homework Helper
Gold Member
It would not be correct to change ##\int_{a(x)}^{b(x)} f(x)g(z) dz ## to ##f(x) \int_{a(x)}^{b(x)} g(z) dz## before differentiating with respect to ##x##.
I disagree, it is correct to do such a change, try to find a counter example where those two integrals are different...

As long as the variable of integration z is considered to be independent of x you can do such a change (and no the variable z doesn't become dependent to x because the limits of integration are a(x),b(x), it would be dependent if there was some function of x such that z=h(x)).

Krushnaraj Pandya, Chestermiller and Orodruin
Stephen Tashi