# Contour Integration $\frac1{\sin z \cos z}$

$\newcommand{\ds}[1]{\displaystyle{#1}}$ I have the contour integral $$\oint_{\left\vert\,z\,\right\vert\ =\ 2}\frac{1}{\cos(z)\sin{z}}dz$$ To make it easier to work with, I use $\ds{\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}}$ and $\ds{\cos(z)=\frac{e^{iz}+e^{-iz}}{2}}$, which when the reciprocal is taken and they are multiplied together I get $\ds{\frac{1}{\sin(z)\cos(z)}= \frac{4i}{e^{2iz}-e^{-2iz}}}$.

I put this back into the integral to get $\ds{4i\int_{-\infty}^{\infty}\frac{1}{e^{2iz}}dz-4i\int_{-\infty}^{\infty}\frac{1}{e^{-2iz}}dz}$.

The second integral can be rewritten as $\ds{-4i\int{e^{2iz}}dz}$, which has no poles so its integral should be $\ds{0}$.

I think with the same logic, I can make the first integral $\ds{4i\int{e^{-2iz}}dz}$, which also has not poles, so the integral is $\ds{0}$ ?.Is this logic valid ?.

• No. $\frac{1}{A-B} \not= \frac{1}{A} - \frac{1}{B}$ – Euler....IS_ALIVE Aug 8 '13 at 16:54
• Probably easier if you write $\sin z \cos z = \frac{1}{2}\sin 2z$. – Thomas Andrews Aug 8 '13 at 16:55
• I don't understand the notation $\int_{-\infty}^\infty\frac1{\sin(z)\cos(z)}\,\mathrm{d}z$ with $|z|=2$. The limits $-\infty$ and $\infty$ would seem to imply you want to integrate over the real line (which is problematic for a periodic function with poles along the real axis) but the $|z|=2$ would indicate you want to integrate over the circle of radius $2$. My (hopeful) guess is that you intend the latter. – robjohn Aug 8 '13 at 17:01
• Very often when you see $\sin a\cos a$, it can be useful to recall that that is $\frac12\sin(2a)$. – Michael Hardy Aug 8 '13 at 18:46

## 1 Answer

If, as I hope, you intend the integral to be $$\oint\frac1{\sin(z)\cos(z)}\,\mathrm{d}z$$ over the clockwise path $|z|=2$, then the integral would be $2\pi i$ times the sum of the residues of $\frac1{\sin(z)\cos(z)}=\frac2{\sin(2z)}$ inside the contour. There are three singularities inside the contour $|z|=2$ at $-\frac\pi2$, $0$, and $\frac\pi2$, with residues $-1$, $1$, and $-1$, respectively. Thus, the integral would be $-2\pi i$.

• Sorry, I'm just learning this stuff as well, but when we integrate $$\int_{-\pi} ^\pi \frac {d\theta}{\sin{\theta}\cos{\theta}}$$ how are we OK with the singularity at zero, which behaves like $1/x$ at zero, which doesn't converge? Actually, now that I look at it, that's not exactly what OP wrote. We'll have to figure out what he intended. But mine would not converge, right? – Eric Auld Aug 8 '13 at 17:19
• @EricAuld: Again, do you really want to integrate along the real axis, or along the contour $|z|=2$, which is mentioned? Since the question is titled "Contour Integration", it could be either, but as you've noted, there are problems with trying to integrate along the real axis. – robjohn Aug 8 '13 at 17:21
• I see. I had expected this to be one of those "definite real trig integral" problems. – Eric Auld Aug 8 '13 at 17:22
• @EricAuld: if you use the principal value integral, since the integrand is odd, the integral over an interval symmetric about $0$ would be $0$. – robjohn Aug 8 '13 at 17:25
• @EricAuld The question says "contour integral," and $\frac{1}{\sin \theta\cos \theta}$ is likely not integrable over $\theta\in[-\pi,\pi]$ – Thomas Andrews Aug 8 '13 at 17:31