Find the value of $K = \frac{i}{4-\pi} \int {\frac{1}{z\cos(z)}}\,dz$ over the circle centred at origin with radius 4.
Here the value of $I = \int{\frac{1}{z\cos(z)}}\,dz = 2\pi i(\text{Res}_{z=0} + \text{Res}_{z=z_n})(f(z))$, where $z_n = (2n+1)\frac{\pi}{2}$.
Now, $z= 0$ is a removable singularity so at 0 residue will be 0.
At $z_n$ residue is $\frac{2}{{(-1)^{n+1}(2n+1)\pi}}$. So $I = -4i \tan^{-1}1 = -iπ$. So, K = $(\frac{\pi}{4}) -1$.
But the final answer is $2$. It will be of great help if someone could find the value of $K = \frac{i}{4-\pi} \int{\frac{1}{z\cos(z)}}\,dz$.
Thanks in advance.
There are three simple poles of the function $\frac1{z\cos(z)}$ that are inside the circle $|z|=4$. They are at $z=0$ $z=\pi/2$ and $z= -\pi/2$.
The associated residues t $z=0$ $z=\pi/2$ and $z= -\pi/2$ are, respectively
$$\lim_{z\to 0}\left(z\,\,\frac1{z\cos(z)}\right)=1$$
$$\lim_{z\to \pi/2}\left((z-\pi/2)\,\,\frac1{z\cos(z)}\right)=-2/\pi$$
$$\lim_{z\to -\pi/2}\left((z+\pi/2)\,\,\frac1{z\cos(z)}\right)=-2/\pi$$
Hence we assert that
$$\frac{i}{4-\pi}\oint_{|z|=4}\frac{1}{z\cos(z)}\,dz=\left(\frac{i}{4-\pi}\right)\,(2\pi i) \left(1-4/\pi\right)=2$$
as expected!