# Splitting complex contour integrals into real and complex parts

The question I am stuck on is :

By considering the contour integral $\int_{C(0,1)} \frac{1}{z^2+4z+1}$ (where $C(0,1)$ is the unit circle) show that $$\int_0^{2\pi} \frac{dt}{2+\cos(t)}=\frac{2\pi}{\sqrt{3}}$$

Now using Cauchy Residue Theorem we can write the first integral as $$\int_{C(0,1)} \frac{1}{z^2+4z+1}=2\pi i\left (\frac{1}{(2+\sqrt{3})-2+\sqrt{3}}\right )=\frac{\pi i }{\sqrt{3}}$$ So we want to be able to split the first integral into real and complex integrals so that the complex part comes out to $$\text{Im}\left ( \int_{C(0,1)} \frac{1}{z^2+4z+1} \right )= \frac{1}{2}\int_{0}^{2\pi}\frac{dt}{2+\cos(t)}=\frac{\pi }{\sqrt{3}}$$ Now the existence of the new variable $t$ suggest we change coordinates from $z\rightarrow t$ by $z=e^{i t}$, $t\in [0,2\pi]$. Therefore we achieve: $$\int_0^{2\pi} \frac{ i e^{ i t}}{e^{2 i t}+4e^{i t}+1}dt=\int_0^{2\pi} \frac{ i \cos(t)-\sin(t)}{(\cos(t)+i \sin(t))^2+4(\cos(t)+i \sin(t)) +1}$$ And then a huge mess follows from which I can't obtain the given solution. Is this the way to go about this question?

Note that $$\forall t\in \mathbb R\left[\dfrac{ i e^{ i t}}{e^{2 i t}+4e^{i t}+1}=i\dfrac{1}{4+e^{it}+e^{-it}}=i\dfrac {1/2}{2+\dfrac{e^{it}+e^{-it}}{2}}=\dfrac i2\dfrac{1}{2+\cos(t)}\right]_.$$

• This would give the value of the $\cos(t)$ integral to be ${\pi i}/ ({2\sqrt{3}})$? – George1811 Mar 14 '15 at 16:46
• @George1811 I had a small mistake. The integral must be a real value since it is a real function. The above gives you $\displaystyle \dfrac i2\int \limits_0^{2\pi}\dfrac{1}{2+\cos(t)}\mathrm dt=\int \limits_0^{2\pi}\dfrac{ i e^{ i t}}{e^{2 i t}+4e^{i t}+1}\mathrm dt=\int\limits_{C(0,1)}\dfrac 1{z^2+4z+1}\mathrm dz=\dfrac{\pi i}{\sqrt 3}$ – Git Gud Mar 14 '15 at 16:54