<s>[INST] Help me to prove this integration Where the method used should be using complex analysis.
$$\int_{c}\frac{d\theta}{(p+\cos\theta)^2}=\frac{2\pi p}{(p^2-1)\sqrt{p^2-1}};c:\left|z\right|=1$$
thanks in advance 
 [/INST] i do my self like this 
on $|z| = 1, z = e^{i\theta}, d\theta=\frac{dz}{iz}$
using substitution $\cos\theta=\frac{z+z^{-1}}{2}$
$\frac{1}{i}\int\frac{\frac{dz}{z}}{(p+\frac{z+{z}^{-1}}{2})(p+\frac{z+{z}^{-1}}{2})} or \frac{1}{i}\int\frac{1}{(2pz+z^2+1)(p+\frac{z+{z}^{-1}}{2})} $
and then multiple by $\frac{z}{z}$
$\frac{1}{i}\int\frac{z}{(2pz+z^2+1)(2pz+z^2+1)}$
the roots of $(2pz+z^2+1)$, $z_{1}=-p+\sqrt{p^2-1};z_{2}=-p-\sqrt{p^2-1}$
let  $z_{1}=a$ and $z_{2}=b$, 
so $a-b=2\sqrt{p^2-1}$ and $ a+b=-2p$
and then i use residue theorm, but the result on the right $\frac{\pi p}{2(p^2-1)\sqrt{p^2-1}}$
</s>