What is $ \dfrac{i}{4-π} \int_{|z|=4} \dfrac{dz}{z \cos z}$? 
How to evaluate the integral   $$ \dfrac{i}{4-π} \int_{|z|=4} \dfrac{dz}{z \cos z}?$$ 

Here $f(z)=\dfrac{1}{z \cos z}$ has poles at $0$ and $\frac{\pm π}{2}$ .
Residue at $z=0 $ is 1 and residues at remaining poles add up to give 0. So the integral using Cauchy integral formula is $2π(4-π)$. 
I think I am wrong. How to get the integral?
 A: It's not true that residues add up to $0$. We have
$$ \cos z = \sin(\frac{\pi}{2}-z) = \sin(\frac{\pi}{2}+z)$$
so
$$ {\rm Res}_{z=0} \frac{1}{z\cos z} = \lim_{z\rightarrow 0}\frac{1}{\cos z} = 1$$
$$ {\rm Res}_{z=\frac{\pi}{2}} \frac{1}{z\cos z} = \lim_{z\rightarrow \frac{\pi}{2}}\frac{(z-\frac{\pi}{2})}{z \sin(\frac{\pi}{2}-z)} = -\frac2\pi$$
$$ {\rm Res}_{z=-\frac{\pi}{2}} \frac{1}{z\cos z} = \lim_{z\rightarrow -\frac{\pi}{2}}\frac{(z+\frac{\pi}{2})}{z \sin(\frac{\pi}{2}+z)} = -\frac2\pi$$
and $$ \sum {\rm Res} = 1 - \frac{4}{\pi} = \frac{\pi-4}{\pi}$$
so the final result is $$ \frac{i}{4-\pi}\cdot 2\pi i\frac{\pi-4}{\pi} = 2$$
A: The function $f(z)=\frac{1}{z\cos(z)}$ has simple poles at $z=0$ and $z= (2n-1)\pi/2$ for $n\in \mathbb{Z}$.  The poles that are inside the circle $|z|=4$ are at $z=0$ and $z=\pm \pi/2$.
The residues of $f$ at the implicated poles are 
$$\begin{align}
\text{Res}\left(\frac{1}{z\cos(z)}, z=0\right)&=1\\\\
\text{Res}\left(\frac{1}{z\cos(z)}, z=\pi/2\right)&=-\frac2\pi\\\\
\text{Res}\left(\frac{1}{z\cos(z)}, z=-\pi/2\right)&=-\frac2\pi
\end{align}$$
Therefore we have
$$\frac{i}{4-\pi}\oint_{|z|=4}f(z)\,dz=\frac{i}{4-\pi}\times 2\pi i\times\left(1-\frac{4}{\pi}\right)=2$$
A: You made a mistake in your residues.  The residues of $1/(z\cos z)$ at $z=\pm\frac\pi2$ are both $-\frac2\pi$.
