Let $C$ be the positively oriented boundary of the square whose sides lie along the lines $x=+/-2$ and $y=+/-2$. I am supposed to use the Cauchy Integral formula to evaluate $$\int_C \frac{cosz}{z(z^2+8)}\mathrm{d}z$$ This is the formula $$\int_C \frac{f(z)}{(z-z_0)^{n+1}}\mathrm{d}z=\frac{2i\pi}{n!}f^{n}(z_0)$$
What would $z_0$ represent in this case? I know I have to manipulate the denominator somehow, but am stuck...
First, $\,z^2+8=0\iff z=\pm\, 2\sqrt 2\,i\,\Longrightarrow\,$ the function
$$f(z):=\frac{\cos z}{z^2+8}$$
is analytic on and inside the given square, and thus only zero is a simple pole of the function
$$\frac{\cos z}{z(z^2+8)}=\frac{f(z)}{z}$$
so by the theorem you mention:
$$\oint\limits_C\frac{\cos z}{z(z^2+8)}dz=\oint\limits_C\frac{f(z)}{z}dz=2\pi if(0)=\ldots$$