How to evaluate the following contour integral?

37 Views Asked by At

I have recently studied Cauchy's integral formula which states that if $f:\Omega\to \mathbb C$ be a holomorphic function and $C$ be a positively oriented simply closed curve whose interior is also contained in $\Omega$.Then for any point $z_0$ in the interior of $C$,we have $f(z_0)=\frac{1}{2\pi i} \int_C \frac{f(z)}{z-z_0}dz$.Now using this theorem I am asked to evaluate the following integral:

$\int_C \frac{\cos z}{z(z^2+8)}dz$ where $C$ is the square whose sides are $x=\pm 2$ and $y=\pm 2$.I do not know how to proceed.We cannot apply the above theorem directly because the function is not holomorphic at $z=0$ which lies in the interior of $C$.