# How to evaluate contour integral

I have a homework problem to evaluate the integral $$\oint_{\gamma}\frac{\cos z}{(z+i)^3}dz$$ along the curve $$\gamma(t)=-i+e^{it}, t\in[0,2\pi]$$. I proceeded to plug the given information into the definition of a contour integral and got to the expression $$\oint_{\gamma}=i\int_{0}^{2\pi}\cos(-i+e^{it})e^{-2it}dt$$ which seems hardly helpful. I don't know how to evaluate this or manipulate it any further and I suppose there is some trick earlier on to make the integration more manageable. I just can't figure it out so I'd be grateful for any help.

• This is a typical exercise about Cauchy's integral formula. – José Carlos Santos Sep 28 '18 at 14:12

With rediue theorem $$\oint_{\gamma}\frac{\cos z}{(z+i)^3}dz=\dfrac{2\pi i}{2!}\lim_{z\to-i}\dfrac{d^2}{dz^2}\cos z=-\dfrac{2\pi i}{2!}\cos i=\color{blue}{-\dfrac{\pi i}{2}\left(e+\dfrac1e\right)}$$
Hint: As Jose hints in the comments, we want to use the fact that $$f^{(k)}(z_0)=\frac{k!}{2\pi i}\oint_{\partial B_r(z_0)}\frac{f(z)}{(z-z_0)^{k+1}}dz$$ with the correct holomorphic function $$f(z)$$