Contour integral of $\int_{|z|=2}\frac{\sin{z}}{z^3-z^2}dz$ So I have a following contour integral 
$$\int_{|z|=2}\frac{\sin{z}}{z^3-z^2}dz$$
I was wondering if this is a correct approach:
$D_f=\{z\in\mathbb{C}:r<|z|<2,|z-1|>r\}$
Since $f(z)$ is analytic on $D\cup\partial D$ Cauchy's theorem says
$$0=\int_{\partial D}f(z)dz=\left(\int_{|z|=2}-\int_{|z|=r}-\int_{|z+1|=r}\right)f(z)dz$$
then 
$g(z):=\frac{\sin{z}}{z+1},\qquad h(z):=\frac{\sin{z}}{z^2}$
differentiating $g(z)$ gives us
$$g'(z):=\frac{-(z+1)\cos{z}-\sin{z}}{({z+1})^2}$$
$$\int_{|z|=2}f(z)dz=\int_{|z|=r}\frac{g(z)dz}{z^2}+\int_{|z+1|=r}\frac{h(z)dz}{z+1} \\ =2\pi i\left(g'(0)-h(1)\right)\\ = 2\pi i\left(\sin{1}-1\right)$$
is this method also valid for 
$$\int_{|z|=1}\frac{dz}{z^2+2z}$$?
 A: I didn't quite understand what your method is. It seems that you are splitting the functions up into bits which are only singular at a single point, and then using the residue theorem to integrate about that point. Assuming this, here is how you compute the second integral. 
Your function is $$f(z)=\frac{1}{z(z+2)}$$
The integral of $f(z)$ about a circle of radius larger than $2$ centred on the origin would be $$\int_{|z|=r}f(z)\,dz+\int_{|z+2|=r} f(z)\,dz=2\pi i\left(g(0)+h(-2)\right)$$where $g(z)=\frac1{z+2}$, $h(z)=\frac1z$.
However your question asks for the integral of $f(z)$ around a circle of radius $1$ centred on the origin, so the residue at the point $z=-2$ doesn't contribute to this integral. Hence you get $$\int_{|z|=1}f(z)\,dz=2\pi ig(0)=\pi i$$
Note, you only need to differentiate one of the functions if the pole is of order $2$. In the first example, we had $z^2$ on the denominator, hence differentiation is needed. In the second example, we have just $z$ on the denominator, so we do not need to use $g'(z)$ anywhere.
