So I have the integral below which I am meant to evaluate using complex analysis. I was thinking to transform this integral and evaluate using the Residue theorem, but the process is incredibly messy and I am doubting if that is correct way to proceed. I know the answer should be $2\,\pi-4/3\,\sqrt {3}\pi$. $$\int_{0}^{2\,\pi}\!{\frac {\cos \left( x \right) }{2+\cos \left( x \right) }}\,{\rm d}x$$

- 427,504
-
The general strategy for such integrals is to let a complex variable $z$ move along the boundary of the unit circle $\gamma(t)=e^{it}$. Then using $\cos(t)=(z+1/z)/2$ you can turn your integral into a contour integral over an analytic function. – SmileyCraft Jan 13 '19 at 21:33
-
It's very easy also without complex analysis. – Michael Rozenberg Jan 13 '19 at 21:45
-
Your value for the integral appears to be correct (although it's hard to read). I've double-checked my value below for the integral I called $J$ here. – J.G. Jan 13 '19 at 21:48
-
In this instance, is it permissable to first make a substitution on the integral before applying residues? – Jan 14 '19 at 01:47
2 Answers
Yes, it's the best approach. Consider:$$\varphi(z)=\frac1z\times\frac{\frac{z+\frac1z}2}{2+\frac{z+\frac1z}2}=\frac{z^2+1}{z^3+4z^2+z}.$$Then$$\int_0^{2\pi}\frac{\cos\theta}{2+\cos\theta}\,\mathrm d\theta=\frac1i\int_{\lvert z\rvert=1}\varphi(z)\,\mathrm dz$$and this number is $2\pi$ times the sum of the residues of $\varphi$ in the unit disk. The poles of $\varphi$ at that disk are located at $0$ and at $-2+\sqrt3$. Now, use the fact that$$\operatorname{res}_{z=0}\left(\frac{z^2+1}{z^3+4z^2+z}\right)=1\text{ and that }\operatorname{res}_{z=-2+\sqrt3}\left(\frac{z^2+1}{z^3+4z^2+z}\right)=-\frac2{\sqrt3}.$$

- 427,504
Whatever method you use, we may as well start with $$I:=\int_0^{2\pi}\frac{\cos x dx}{2+\cos x}=2\pi-2J,\,J:=\int_0^{2\pi}\frac{dx}{2+\cos x}.$$To evaluate $J$ by complex analysis, substitute $z=\exp ix$ so our integral is around a circle. You should obtain$$J=\frac{2}{i}\oint_{|z|=1}\frac{dz}{(z+2)^2-3}.$$The integrand has poles at $-2\pm \sqrt{3}$, and the contour encloses one of these, $-2+\sqrt{3}$. The residue there is $$\lim_{z\to-2+\sqrt{3}}\frac{1}{z+2+\sqrt{3}}=\frac{1}{2\sqrt{3}}.$$So $$J=\frac{2}{i}2\pi i\frac{1}{2\sqrt{3}}=\frac{2\pi}{\sqrt{3}},\,I=2\pi-\frac{4\pi}{\sqrt{3}}.$$

- 115,835
-
-
@daljit97 I rewrote the original integrand as a constant minus a fraction with a constant numerator. – J.G. Jan 13 '19 at 22:16
-
-
@J.G. so $\frac {\cos \left( x \right) }{2+\cos \left( x \right) } = 2 \pi - 2\frac{dx}{2+\cos x}$? – Jan 13 '19 at 23:52
-