# definite integral of form G(cos(x), sin(x)) by complex integration

Given: the following integral: $$\int_0^{2\pi} \frac{\mathrm{sin}(3x)}{5-3\mathrm{cos}(x)}\,\mathrm{d}x = 0$$ Prove it by using complex integration and the residue theorem. But I do something wrong somewhere. This is my process:

So I start off by defining $z = \mathrm{e}^{xi}$, from which follows that $\mathrm{d}x = \frac{\mathrm{d}z}{iz}$, $\mathrm{sin}(3x) = \frac{z^3 - z^{-3}}{2i}$, $\mathrm{cos}(x) = \frac{z + z^{-1}}{2}$ and the contour $C$ is $|z| = 1$, the unity circle around 0. This leads to the following contour integral: $$\oint_C \frac{z^3 - z^{-3}}{2i} * \frac{1}{5 - 3\frac{z + z^{-1}}{2}} * \frac{1}{iz}\mathrm{d}z = \oint_C \frac{z^4 - z^{-2}}{z(-3z^2+10z-3)}\mathrm{d}z$$ So, now the poles: $$z = 0, z = \frac{1}{3}, z = 3$$ $z = 3$ lies outside the contour of intergration, so we are going to do the residue theorem for $z = 0$ and $z = \frac{1}{3}$, because: $$\oint_C f(z)\mathrm{d}z = 2\pi i(res(a) + res(b))$$ So, $a = 0$ $$res(a) = \lim\limits_{z\to0}\frac{z(z^4 - z^{-2})}{z(-3z^2+10z-3)} = \lim\limits_{z\to0} \frac{5z^4 + z^{-2}}{-9z^2 + 20z - 3} = 0$$ By l'Hoptials rule. So, now the actual problem: the other one doesn't seem to be zero. $$res(b) = \lim\limits_{z\to\frac{1}{3}} \frac{(z-\frac{1}{3})(z^4 - z^{-2})}{z(-3z^2+10z-3)} = \lim\limits_{z\to\frac{1}{3}}\frac{(z^4 - z^{-2}) + (z-\frac{1}{3})(4z^3 + 2z^{-3})}{{-9z^2 + 20z - 3}} = -\frac{91}{27}$$ By l'Hopitals rule. So in total, my solution is $$-2\pi i\frac{91}{27}$$ Which is wrong, but why? Where did I go wrong?

• Your $dz$ should be $dz/(iz)$ as you've mentioned. Jun 2 '15 at 15:22
• That was a small mistake, but the right side does include that part. Jun 2 '15 at 15:36

$$\int_{0}^{2\pi}\frac{\sin(3x)}{5-3\cos x}\,dx =-\int_{-\pi}^{\pi}\frac{\sin(3x)}{5+3\cos x}\,dx$$ and the integral of an odd integrable function over an interval symmetric with respect to the origin is trivially zero.
$z = 0$ is a third order pole. Calculate it as such and the answer is correct