I ran into this question which hints me to use Cauchy's Integral Theorem for Derivatives, however I don't seem to be able to fit this integral into the form of the Integral Formula
$$\displaystyle \int_{|z|=2} \frac{\cos(z)}{z(z^2+8)}dz$$ I tried using the fact that $\displaystyle \int_\gamma f(z)dz=\int_a^b f(\gamma(t))\gamma'(t)dt$ for $\gamma(t)$ where $t \in [a, b]$. But got nowhere. Is there a way I can transform the given integral into the form in which I can use the Integral Formula as stated below?
$$f^{(k)}(w)=\frac{k!}{2\pi i}\int_\gamma \frac{f(z)}{(z-w)^{k+1}}dz$$ where $f^{(k)}(w)$ is the $k^{th}$ derivative of $f$
By Cauchy's integral theorem,$$\oint_{\lvert z\rvert=2}\frac{\cos z}{z(z^2+8)}\,\mathrm dz=\oint_{\lvert z\rvert=2}\frac{\frac{\cos z}{z^2+8}}z\,\mathrm dz=2\pi i\times\frac{\cos0}{0^2+8}=\frac{\pi i}4.$$