# Integrate: $\int_0^{2\pi} \frac{d\theta}{1+\cos^2\theta}$

I'm trying to integrate this here fella:

$\int_0^{2\pi} \frac{d\theta}{1+\cos^2\theta}$

from examples in Ablowitz I know that for $|A|^2>|B|^2$ and $A>0$, $\int_0^{2\pi} \frac{d\theta}{A+B\cos\theta}$ has solution $\frac{2*\pi}{\sqrt{A^2+B^2}}$

Since that is the only similar example I can find, the only approach would be to substitute A and B accordingly, but in my case I cannot substitute A=1 and B=$cos\theta$ since for $\theta=0$ or $\theta=2\pi*n$, A=B so the inequality $|A|>|B|$ is not strict.

Does this mean that the integral diverges? An answer here claims so: How to evaluate $\int_0^{2\pi} \frac{d\theta}{A+B\cos\theta}$? But I wanted to see if anyone has any other approaches to this problem.

Many thanks

Use $$\cos^2\theta = \frac{1}{2} + \frac{1}{2} \cos(2\theta)$$ to write as $$\int_0^{2\pi} \frac{d\theta}{\frac{3}{2} + \frac{1}{2} \cos(2\theta)} = \frac{1}{2} \int_0^{4\pi} \frac{dt}{\frac{3}{2} + \frac{1}{2} \cos t} = \int_0^{2\pi} \frac{dt}{\frac{3}{2} + \frac{1}{2} \cos t}$$ which is in the form that you can solve with that Ablowitz formula.

• Thx Dumphart, I was just commenting that exact approach below. I guess I'm starting to get too reliant on StackExchange's amazingly swift responders. – Mike Nov 12 '15 at 8:29
• @Greg You're welcome hehe. – GDumphart Nov 12 '15 at 8:31

$$\int_{0}^{2\pi}\frac{d\theta}{1+\cos^2\theta} = 4\int_{0}^{\pi/2}\frac{d\theta}{1+\cos^2\theta} = 4\int_{0}^{+\infty}\frac{dt}{2+t^2}=\color{red}{\pi\sqrt{2}}.$$ It is enough to exploit simmetry and use the substitution $\theta=\arctan t$.

The integral obviously cannot diverge: the integrand function is bounded between $\frac{1}{2}$ and $1$, hence the integral is between $\pi$ and $2\pi$.

• Nice approach, thanks! – Mike Nov 12 '15 at 19:00
• Note: You have a 2 in the denominator on that last integral, so it would be $2*\pi\sqrt{2}$ – Mike Nov 12 '15 at 19:06
• @Greg: that is clearly wrong since $2\pi\sqrt{2}$ is greater tha $2\pi$, and the integral cannot. – Jack D'Aurizio Nov 12 '15 at 19:14

What did you try so far? You can use some trigonometric identities (I didn't try this approach) or you can write $cos(x) = \dfrac{e^{ix}+e^{-ix}}{2}$ and use the substitution $z=e^{ix}$, turning the integral to a complex integral of a closed curve.

Edit: You mentioned convergence\divergence (When you brought up those other integrals).It's worth mentioning that this integral clearly converge since $\dfrac{1}{1+\cos^2(x)}$ is continuous on the closed set $[0,2\pi]$.

• Thx for the suggestion, I was just trying to turn $cos^2\theta$ into $1/2*(1+cos\theta)$ and this seems to work. I end up with A=$3/2$ and B=$1/2$ and I can go ahead with my substitution. – Mike Nov 12 '15 at 8:27