Trigonometric Integral – Using Residue Theorem

calculusresidue-calculus

In a video I found the integral: $\int_{0}^{2\pi}\frac{cos(2x)}{5+4cos(x)}dx$ which should be evaluated using the "Residue Theorem". I used the online tool "Integral Calculator" to find the result: $\frac{\pi}{6}$ but my calculations are the following. $z(x)=e^{ix};dz=ie^{ix}dx=izdx;dx=\frac{dz}{iz}$ for $x\in [0,2\pi]$ which parametrizes the unit circle in the complex plane. Now: $cos(2x)=\frac{z^{2}+\frac{1}{z^{2}}}{2}$ and $cos(x)=\frac{z+\frac{1}{z}}{2}$. Rewriting we get: $\int_{0}^{2\pi}\frac{cos(2x)}{5+4cos(x)}=\frac{1}{i}\oint_{C}\frac{(z^{4}+1)}{z^{2}(4z^{2}+10z+4)}dz$. Considering $g(z):=\frac{z^{4}+1}{z^{2}(4z^{2}+10z+4)}$ we have three isolated singularities: $z_{1}=0$ which is a pole of order $2$,$z_{2}=-\frac{1}{2}$ which is a pole of order $1$ and $z_{3}=-2$ which should be a pole of order $1$ but it is outside the curve $C$ so we should get rid of it. Now: $Res(g(z),0)=-\frac{40}{17}$ [here is where I think there is the mistake as the $lim_{z\rightarrow z_{1}}\frac{d}{dz}g(z)z^{2}$ implies a lot of calculations], $Res(g(z),-\frac{1}{2})=\frac{17}{6}$. Now, by the "Residue Theorem" we get : $\oint_{C}g(z)dz=-2\pi[\frac{17}{6}-\frac{40}{17}]=-2\pi[-\frac{51}{102}]=\pi$. So:$\int_{0}^{2\pi}\frac{cos(2x)}{(5+4cos(x))}dx=\pi\ne\frac{\pi}{6}$. I was not completely able to follow the video as it was in Indian, altough it was done very good I think. Still, is the "method" correct or there are mistakes even outside of the calculations ?

Best Answer

Your approach is correct (apart from a small calculational error), but the determination of the residues can be streamlined, completely avoiding "a lot of calculations". Writing the integral in the form $$ I = \int\limits_0^{2 \pi} \frac{\cos 2 x}{5+4 \cos x} = \frac{1}{4i}\oint\limits_{|z|=1} \frac{z^4+1}{z^2 (z+1/2)(z+2)}dz \\=\frac{1}{4i}\oint\limits_{|z|=1}{\huge[} \underbrace{\frac{z^2}{(z+1/2)(z+2)}}_{f(z)}+\underbrace{\frac{1}{z^2(z+1/2)(z+2)}}_{h(z)}{\huge]}dz,$$ the relevant residues of the functions $f(z)$ and $h(z)$ can immediately be read off, $${\rm Res}\left(f(z),-1/2\right) = 1/6, \quad {\rm Res}\left(h(z),-1/2\right)=8/3, \quad {\rm Res}\left(h(z),0 \right)= -5/2,$$ where the third result can be seen by a quick look at the first terms of the Laurent series of $h(z)$ around $z=0$: $$h(z) = \frac{1}{z^2(1+2z)(1+z/2)}= \frac{1}{z^2} {\Large(}1-\frac{5z}{2} +\mathcal{O}(z^2) {\Large)}.$$ Employing the residue theorem, one finds indeed the final result $$I=\frac{2\pi i}{4 i}\left(\frac{1}{6}+\frac{8}{3}-\frac{5}{2} \right)=\frac{\pi}{6} $$for the integral.

Related Question