Evaluate \[ \int_0^{2\pi}\frac{d\theta}{2+\cos\theta}. \]
Solution
Set \[ I\coloneqq\int_0^{2\pi}\frac{d\theta}{2+\cos\theta}. \]
1. One has\[ I=2\int_0^\pi\frac{d\theta}{2+\cos\theta}. \]
With \[ f(\theta)\coloneqq\frac{1}{2+\cos\theta}, \] the substitution \(u=2\pi-\theta\) gives \[ \int_\pi^{2\pi}f(\theta)\,d\theta =\int_0^\pi f(2\pi-u)\,du. \] Since \(\cos(2\pi-u)=\cos u\), the last integral equals \(\int_0^\pi f(u)\,du\). Splitting the defining integral for \(I\) at \(\pi\) proves the claim.
2. The half-period integral satisfies\[ \int_0^\pi\frac{d\theta}{2+\cos\theta} =2\int_0^\infty\frac{dt}{t^2+3}. \]
For \(0\leq\theta<\pi\), put \[ t\coloneqq\tan\frac{\theta}{2}. \] Then \[ \cos\theta=\frac{1-t^2}{1+t^2}, \qquad d\theta=\frac{2\,dt}{1+t^2}, \] and \(t\) increases from \(0\) to \(+\infty\) as \(\theta\) increases from \(0\) to \(\pi\). Hence \[ \frac{d\theta}{2+\cos\theta} = \frac{2\,dt}{t^2+3}. \] Applying the substitution first on \([0,b]\) with \(b<\pi\) and then letting \(b\uparrow\pi\) yields the stated identity.
3. The requested value is\[ I=\boxed{\frac{2\pi}{\sqrt3}}. \]
By step 2, \[ \int_0^\pi\frac{d\theta}{2+\cos\theta} = \frac{2}{\sqrt3} \left[ \arctan\left(\frac{t}{\sqrt3}\right) \right]_{0}^{\infty} =\frac{\pi}{\sqrt3}. \] Step 1 therefore gives \[ I=2\cdot\frac{\pi}{\sqrt3} =\frac{2\pi}{\sqrt3}. \]
4. Q.E.D.
Step 3 evaluates the required integral.