TITLE: Curve integration with Cauchy
QUESTION [5 upvotes]: I want to compute the following :
      1. $$\int_{\partial D_{2}(0)} \frac{e^{z}dz}{(z+1)(z-3)^{2}}dz,$$ 
      2. $$\int_{\partial D_{2}(-2i)}\frac{dz}{z^{2}+1} $$ 
      3. $$\int_{\partial D_{2}(0)} \frac{\sin z}{z+i} dz $$
      4. $$\int_{\partial D_{1}(0)} \frac{e^zdz}{(z-2)^3} dz,$$ where $D_{r}(c)$ denotes a disc with radius $r$ and center $c$.

(I will not write the curve in the integral ) 

$$\int \frac{\frac{e^{z}}{z+1}}{(z-3)^{2}}=2\pi i f'''(3) = 2\pi i \frac{e^{3}(3-1)}{(3+1)^{3}}= \frac{e^{3}i}{16}.$$
$i$ doesn't lie in the disc, so $$\int \frac{\frac{1}{z-i}}{(z+i)}dz = 2\pi i (\frac{1}{-i-i}) = -\pi. $$  
$$\int \frac{\sin zdz}{z+i} = 2\pi i \frac{\sin(i)}{-i} = -\pi i(\frac{e^{2}-2}{2e}).$$  
$0$ because $2$ does not lie in the disc. 

I will be very glad if somebody could skim my answers and tell me if they are legit. Thanks for your attention.

REPLY [2 votes]: $(1)\,$ The only pole of the function in $\,\{z\;:\;|z|<2\}\,$ is $\,z=-1\,$ , so:
$$Res_{z=-1}(f)=\lim_{z\to -1}\frac{e^z}{(z-3)^2}=\frac{1}{16e}$$ and
$$\int_{\partial D_2(0)}\frac{e^z}{(z+1)(z-3)^2}\,dz=2\pi i\frac{1}{16e}=\frac{\pi i}{8e}$$
$(2)\,$ is fine.
$(3)\,$ Why did you divide by $\,-i\,$? Other than that it is correct, and also $\,(4)$