# How to 'analyze' problems in analysis; Computing $\int_0^{2\pi}\frac{1}{(a+b\cos(\theta))^2}d\theta$

If $a, b \in \mathbb{R}$ with $a > b > 0$, compute this ungodly thing;

$$\int_0^{2\pi}\frac{1}{(a+b\cos(\theta))^2}d\theta$$

I'm really not a fan of complex analysis... I can't visualize what's going on here. When I look at things from group/number/graph theory I see ideas. When I look at this... all I see a bunch of symbols.

Where to begin with this? Maybe someone with analysis background can offer some intuition on 'analyzing' these things to better see whats going on..

Because right now, I'm lost looking at this.

Thanks guys!

-
Like, my thought process is telling me that; the integrating variable is the inverse of a quadratic sinusoidal function.. But I can't see the resulting function in my head. Should I even be trying to do this? – Chloe.H Nov 26 '12 at 19:59
Is this specifically from a complex analysis class/text? As in, complex numbers, holomorphic functions, etc.? – Antonio Vargas Nov 26 '12 at 20:09
Yes it's a class on complex analysis. But from an engineering perspective shudder. My school lops the engineering students and math students in the same complex analysis course ... so most of what we do is look at examples... – Chloe.H Nov 26 '12 at 20:11

Hint: Use Euler's formula to rewrite the integrand in terms of $e^{i \theta}$, then rewrite the integral as a contour integral in the complex plane (what kind of shape does $e^{i \theta}$ parameterize?).

As for the intuition...

The $\cos \theta$ brings back fond memories of polar coordinates (remember $x = r \cos \theta$, $y = r \sin \theta$?), and then the $0$ to $2 \pi$ integral sparks the thought that somewhere, somehow, a circle is being parameterized. The quantity $e^{i \theta}$ does exactly that--it parameterizes the unit circle.

I remember from the hymns of ages past that Euler's formula can be used to rewrite $\cos \theta$ in terms of $e^{i \theta}$, so I follow in the footprints of the ancients and take advantage of this to rewrite the integrand. Calling upon the dark arts, I make a change of variables which transports me from the realm of the (real) line to the realm of the infinite (complex) plane. (The substitution $z = e^{i \theta}$ looks nice.)

Now that I'm in my element, I can go at the problem using all the magicks which were, until now, forbidden (Cauchy's theorem, the residue theorem, etc.). Of course I have my trusty emergency pack ready, as I might need some extra tools along the way (partial fractions).

-
Firstly, thank you for the hint. Secondly, may I ask what do you see in the integral that makes you think this is a good approach? I'm just trying to see this problem through more enlightening eyes – Chloe.H Nov 26 '12 at 20:29
@Chloe.H, I've edited my answer to describe some of my intuition for a problem like this. – Antonio Vargas Nov 26 '12 at 20:46
Loved it! +1 just for "Calling upon the dark arts" lol I really appreciate it! – Chloe.H Nov 26 '12 at 20:56
Glad to help :) – Antonio Vargas Nov 26 '12 at 20:58

Hint

One method is to use the Weierstrass Substitution: \begin{align} \tan\left(\frac t2\right)&=z&\mathrm{d}t&=\frac{2\,\mathrm{d}z}{1+z^2}\\[6pt] \sin(t)&=\frac{2z}{1+z^2}&\cos(t)&=\frac{1-z^2}{1+z^2} \end{align} Apply the substitution: \begin{align} \int_0^{2\pi}\frac{\mathrm{d}t}{(a+b\cos(t))^2} &=\int_{-\infty}^\infty\frac{\frac{2\,\mathrm{d}z}{1+z^2}}{\left(a+b\frac{1-z^2}{1+z^2}\right)^2}\\[6pt] &=\int_{-\infty}^\infty\frac{2(1+z^2)\,\mathrm{d}z}{((a+b)+(a-b)z^2)^2}\\[6pt] &=\color{#C00000}{\int_{-\pi/2}^{\pi/2}\frac{2\left(1+\frac{a+b}{a-b}\tan^2(u)\right)\sqrt{\frac{a+b}{a-b}}\sec^2(u)\mathrm{d}u}{(a+b)^2\sec^4(u)}}\\[6pt] &=\frac{2}{(a^2-b^2)^{3/2}}\int_{-\pi/2}^{\pi/2}\left(a+b-2b\cos^2(u)\right)\,\mathrm{d}u \end{align} where we have substituted $z=\color{#C00000}{\sqrt{\frac{a+b}{a-b}}\;\tan(u)}$. The last integral is very easy.

-