Solve definite integral $\int_0^{2\pi} \frac{\cos^2x}{(1+b\cos x)^4} dx$ I am struggling with analytically solving the definite integral 
$$\int_0^{2\pi} \frac{\cos^2x}{(1+b\cos x)^4} dx$$
I am more generally having issues with solving integrals of the form  $\int_0^{2\pi}\frac{1}{(1+b\cos(x))^a} dx$, how can I solve these (both numerically and analytically. ($b<1$))

Let 
\begin{align}
I(b) &= \int_0^{\pi} \frac{1}{(1+b \cos x)^2} dx\\
 &= \frac1{1-b^2}\int_0^{\pi}\left( 
-d (\frac{b\sin x}{ 1+b \cos x}  ) + \frac{1}{1+b \cos x} dx\right) \\
 &= \frac1{1-b^2}\int_0^{\pi} \frac{1}{1+b \cos x} dx
 =  \frac\pi{(1-b^2)^{3/2}}
\end{align}
Then
$$\int_0^{2\pi} \frac{\cos^2 x}{(1+b \cos x)^4} dx
=\frac13\frac {d^2I(b)}{db^2}=\frac{\pi (1+4b^2)}{(1-b^2)^{7/2} }$$
——————————————-
Edit:
\begin{align}
& \int_0^{\pi} \frac{1}{1+b \cos x} dx \\
=&\int_0^{\pi} \frac{1}{1+b (2\cos^2\frac x2 -1)}dx
 =\int_0^{\pi} \frac{2d(\tan \frac x2)}{(1-b )\tan^2\frac x2 +(1+b)}dx \\
=& \frac2{\sqrt{1-b^2}}\tan^{-1}\left(\sqrt{\frac{1-b}{1+b}}\tan\frac x2\right)_0^{\pi}= \frac\pi{\sqrt{1-b^2}}
\end{align}
