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 

On $|z| = 1$, we have $z = e^{i\theta}$, so $\frac{dz}{d\theta} = i e^{i\theta}$, and hence $d\theta = \frac{dz}{iz}$.
Also on $|z| = 1$, we have $\cos \theta = \frac12\left(z+\frac{1}{z}\right)$.
Putting this together, you get
$$\frac{1}{i} \int_{|z| = 1} \frac{1}{z\left(p+\frac12\left(z+\frac{1}{z}\right)\right)^2}\ dz.$$
Expand the denominator,
$$\begin{align*}
\frac{1}{i} \int_{|z| = 1} \frac{1}{z\left(p+\frac12\left(z+\frac{1}{z}\right)\right)^2}\ dz &= \frac{1}{i} \int_{|z| = 1} \frac{1}{z\left(p^2 + p(z+1/z) + \frac14(z+1/z)^2\right)} \\
&= \frac{1}{i} \int_{|z| = 1} \frac{1}{\left(p^2z + pz^2+p + \frac{z}{4}(z^2+2+1/z^2)
\right)} \\
&= \cdots
\end{align*} $$
Then, apply the residue theorem.
