differentiation under integral sign How do you find:

$$\int_0^\pi\frac{dx}{(5+3\cos x)^3}$$
and
$$\int_0^\pi\frac{\sin^2x }{(5+3\cos x)^3}dx$$
by differentiating under the integral sign?
I know you can get the result by using $\tan\left(\frac{x}{2}\right)$ substitution but I need to solve it via Feynman's Trick. 
I am given the general result that:
$$\int_0^\pi\frac{dx}{a+b\cos x}= \frac{\pi}{\sqrt{a^2-b^2}}$$
 A: $f(a) = \int_0^\pi\frac{dx}{(a+b\cos x)} = \frac {\pi}{\sqrt {a^2 - b^2}}\\
\frac {df}{da} = \int_0^\pi-(a+b\cos x)^{-2} dx = -a\pi(a^2 - b^2)^{-\frac 32}\\
\frac {d^2f}{da^2} = \int_0^\pi 2(a+b\cos x)^{-3}dx = \pi(-(a^2 - b^2)^{-\frac 32}+3a^2(a^2 - b^2)^{-\frac 52})\\
\int_0^\pi (a+b\cos x)^{-3}dx = \frac \pi2 (-(a^2 - b^2)^{-\frac 32}+3a^2(a^2 - b^2)^{-\frac 52})$
$\\$
$g(b) = \int_0^\pi (a+b\cos x)^{-1} dx = \pi(a^2 - b^2)^{-\frac 12}\\
g'(b) = \int_0^\pi -(\cos x)(a+b\cos x)^{-2} dx = b\pi(a^2 - b^2)^{-\frac 32}\\
\frac 12 g''(b) = \int_0^\pi (\cos^2 x)(a+b\cos x)^{-3} dx = \frac \pi2 ((a^2 - b^2)^{-\frac 32}+3b^2(a^2 - b^2)^{-\frac 52})\\
\int_0^\pi (\sin^2 x)(a+b\cos x)^{-3} dx = \frac 12(f''(a) - g''(b))$
A: Let $I(a,b)=\int_0^\pi \frac{1}{a+b\cos(x)}\,dx=\frac{\pi}{\sqrt{a^2-b^2}}$.
Then, we see that
$$\begin{align}
\frac{\partial^2I(a,b)}{\partial b^2}&=\int_0^\pi \frac{2\cos^2(x)}{(a+b\cos(x))^3},dx\\\\
&=\color{blue}{2\int_0^\pi\frac{1}{(a+b\cos(x))^3}\,dx}-2\int_0^\pi \frac{\sin^2(x)}{(a+b\cos(x))^3}\,dx\\\\
&=\color{blue}{\frac{\partial^2I(a,b)}{\partial a^2}}-2\int_0^\pi \frac{\sin^2(x)}{(a+b\cos(x))^3}\,dx\\\\
\end{align}$$
