# Complex contour integration of $\oint_{C}\frac{1}{\cos z+1}dz$

I want to evaluate the following complex contour integral:

$$J = \oint_{C}\frac{1}{\cos z+1}dz$$ where $C: |z|=5$

I began by finding the singularities included inside $C$. With the following limit I find that $z=\pi$ is a 2nd order pole:

$$\lim_{z\rightarrow\pi}{(z-\pi)^{2}\cdot f(z)} = \lim_{z\rightarrow\pi}\frac{(z-\pi)^{2}}{\cos(z)+1} = \lim_{z\rightarrow\pi}\frac{\frac{\mathrm{d}^{2} }{\mathrm{d} z^{2}}(z-\pi)^{2}}{\frac{\mathrm{d}^{2} }{\mathrm{d} z^{2}}(\cos(z)+1)} = 2 \neq0$$

I am now trying to evaluate the integral using the residues theorem by which:

$$J=2\pi iRes(f;z=\pi)$$

The problem I'm encountering is that when trying to evaluate this residue with second order poles, I find this:

$$Res(f;z=\pi)= \lim_{z\rightarrow\pi}\frac{\mathrm{d} }{\mathrm{d} z}\frac{(z-\pi)^{2}}{(\cos(z)+1)} =\cdots$$

For which I have to apply L'Hospital's rule to the limit about 4 times which is a pain to say the least but seems like it should work. Using Maple I find that the residue is equal to 0 which makes me wonder if I could have seen this all along.

My question is: Is there some theorem or some method that I'm not aware of that can be used to compute this integral? Even though manually evaluating the residues seems to work, I hardly doubt this is the way this problem was intended to be solved given that this could potentially be an exam problem.

• $\cos \frac{3\pi}{2} = 0$, the only singularities enclosed by the contour are $\pm\pi$. Oct 6 '14 at 18:09
• I'm not sure I understand. How is -pi a singularity? It seems to me that it does not cause a problem. Also to me z = 3pi/2 < 5 so it should be included in the contour, what am I not understanding? Oct 6 '14 at 18:14
• $\cos (-\pi) = -1$, so $1 + \cos (-\pi) = 0$. But $1+\cos \frac{3\pi}{2} = 1 \neq 0$. Oct 6 '14 at 18:15
• By the way, the contour certainly is $\lvert z\rvert = 5$? Oct 6 '14 at 18:16
• Pardon me, yes it is equal to 5, not lesser than. I see the singularity at -pi now, thank you. For some reason I thought of cos(3pi/2) being -1 but I mistook it for cos(3pi). It is a lot clearer now and I edited the question. I'm still not sure how to compute the residue Oct 6 '14 at 18:20

The singularities enclosed by the contour are $\pm \pi$.

The fastest way to evaluate the integral is symmetry: The integrand is even, the contour is symmetric about $0$, hence the integral is $0$.

The second fastest method is the residue theorem, using a Laurent expansion:

$$1 + \cos (\mp\pi +(z\pm\pi)) = 1 - \cos (z\pm \pi) = \frac{(z\pm\pi)^2}{2} - \frac{(z\pm\pi)^4}{4!} + \dotsc,$$

which gives the Laurent expansion

$$\frac{1}{1+\cos z} = \frac{2}{(z\pm\pi)^2} \frac{1}{1 - \frac{(z\pm\pi)^2}{12} + \dotsc} = \frac{2}{(z\pm\pi)^2}\left(1 + \frac{(z\pm\pi)^2}{12} + O((z\pm\pi)^4)\right)$$

showing that the residue is $0$ with little work.

• Thank you! The Laurent expansion is what I needed I didn't really see it but this makes it much simpler! Oct 6 '14 at 18:28

After taking the derivative, you are left with a limit of $\cdots/(\cos x+1)^2$. Try multiplying and dividing by $(z-\pi)^4$ and using the limit you computed at the start (where you found that $z=\pi$ is a second order pole). Pulling out the factor $(z-\pi)^4/(\cos x+1)^2$, whose limit is $4$, you are now left with a fraction much more amenable to repeated use of L'Hôpital.