Complex definite integrals/residue I am trying to evaluate this integral:
$$
\int_0^\pi \frac{d\theta}{(a + b \cos \theta)^2}
$$
for $0 < b < a$. I feel like the way I'm trying to solve [using $\cos t=(e^{it}+e^{-it})/2$ and $z=e^{it}$, but it doesn't seem to come out right. Can anyone help me step by step?
 A: I do not know what you've done, but if I had to guess, perhaps you didn't take into account the double poles.
Rewrite the integral as
$$I = \frac12 \int_0^{2 \pi} \frac{d\theta}{(a+b \cos{\theta})^2}$$
Now make the sub $z=e^{i \theta}$, $d\theta = dz/(i z)$:
$$I = -i 4 \frac12 \oint_{|z|=1} \frac{dz \, z}{(b z^2 + 2 a z+b)^2}$$
The poles of the integrand are at
$$z_{\pm} = -\frac{a}{b} \pm \sqrt{\frac{a^2}{b^2}-1}$$
The only pole inside the circle $|z|=1$ is $z=z_+$.Because there is a double pole at $z=z_+$, the residue at that pole is
$$-i \frac{2}{b^2} \left[\frac{d}{dz} \frac{z}{(z-z_-)^2} \right]_{z=z_+} = -i \frac{2}{b^2} \left [\frac{1}{(z_+-z_-)^2} - \frac{2 z_+}{(z_+-z_-)^3} \right ] $$
After some algebra which I leave to the reader, I get, for the residue
$$-i \frac{2}{b^2} \frac{a}{4 b} \left [ \frac{a^2}{b^2}-1\right]^{-3/2} $$
The integral is therefore $i 2 \pi$ times this residue, or
$$I = \pi a  \left ( a^2-b^2\right)^{-3/2} $$
A: From Taylor series of $\dfrac1{(a+bx)^2}$, we have
$$\dfrac1{(a+b \cos(t))^2} = \sum_{k=0}^{\infty} \dfrac{(k+1)(-b)^k}{a^{k+2}} \cos^{k}(t)$$
Now $$\int_0^{2\pi} \cos^k(t) dt = 0 \text{ if $k$ is odd}$$
We also have that
$$\color{red}{\int_0^{2\pi}\cos^{2k}(t) dt = \dfrac{(2k-1)!!}{(2k)!!} \times \pi = \pi \dfrac{\dbinom{2k}k}{4^k}}$$
Hence,
$$I=\int_0^{2 \pi}\dfrac{dt}{(a+b \cos(t))^2} = \sum_{k=0}^{\infty} \dfrac{(2k+1)b^{2k}}{a^{2k+2}} \int_0^{2\pi}\cos^{2k}(t) dt = \dfrac{\pi}{a^2} \sum_{k=0}^{\infty}(2k+1) \left(\dfrac{b}{2a}\right)^{2k} \dbinom{2k}k$$
Now from Taylor series, we have
$$\color{blue}{\sum_{k=0}^{\infty}(2k+1) x^{2k} \dbinom{2k}k = (1-4x^2)^{-3/2}}$$
Hence,
$$\color{green}{I = \dfrac{\pi}{a^2} \cdot \sum_{k=0}^{\infty}(2k+1) \left(\dfrac{b}{2a}\right)^{2k} \dbinom{2k}k = \dfrac{\pi}{a^2} \cdot \left(1-\left(\dfrac{b}a\right)^2 \right)^{-3/2} = \dfrac{\pi a}{\left(a^2-b^2 \right)^{3/2}}}$$
A: Here is a related problem. Since the integrand is an even function, then we can write the integral as
$$ \int_0^\pi \frac{d\theta}{(a + b \cos \theta)^2} =\frac{1}{2} \int_{-\pi}^{\pi} \frac{d\theta}{(a + b \cos \theta)^2}. $$
Now, use the change of variables $\theta=\pi-t$ to write the integral in the form
$$ \frac{1}{2} \int_{-\pi}^{\pi} \frac{d\theta}{(a + b \cos \theta)^2}=\frac{1}{2} \int_{0}^{2\pi} \frac{d t}{(a + b \cos t)^2}. $$
Now, you are ready to use the complex variable technique.
