# I need help with this integral: $\int \frac{1}{(a+b \cos x)^{2}} \, \mathrm dx$?

I need some help evaluating the integral $$\int \frac{1}{(a+b \cos x)^{2}} \, \mathrm dx .$$ I have achieved a result by using the substitution of letting $$\tan(x/2) = t$$, but it is quite cumbersome and big afterwards. Please suggest some shorter methods if possible. Any help would be appreciated.

• Maple also uses the tan-half angle substitution Apr 9 '19 at 10:52

Without loss of generality, $$a>b>0$$ $$I(a)=\int\frac{1}{a+b\cos x}dx$$ and then $$I'(a)=-\int\frac{1}{(a+b\cos x)^2}dx.$$ Using $$u=\tan(\frac{x}{2})$$, one has $$\begin{eqnarray} I(a)&=&\int\frac{1}{a+b\cos x}dx\\ &=&\int\frac{2}{(a-b)u^2+(a+b)}du\\ &=&\frac{2}{\sqrt{a^2-b^2}}\arctan(\sqrt{\frac{a-b}{a+b}}u)\\ &=&\frac{2}{\sqrt{a^2-b^2}}\arctan(\sqrt{\frac{a-b}{a+b}}\tan(\frac{x}{2})). \end{eqnarray}$$ Hence $$\int\frac{1}{(a+b\cos x)^2}dx=-I'(a)=...$$ It is straight forward to get $$I'(a)$$ and omit the detail. For other cases of $$a$$ and $$b$$, you can use the same way to discuss.
WLOG, $$b=1$$ for simplicity. Let $$z=e^{ix}$$, so that $$dx=\dfrac{dz}{iz}$$.
$$\int\frac{dz}{4iz(4a+z+z^{-1})^2}=\frac1{4i}\int\frac{z\,dz}{(z^2+4az+1)^2}=\frac1{4i}\int\frac{(w-2a)\,dz}{(w^2+1-a^2)^2}.$$