How to integrate $\int_C{\frac{\sin\pi z}{(z^2-1)^2}}dz$, where $C: |z-1|=1$ using Cauchy's formula? How can evaluate $$\int_C{\frac{\sin\pi z}{(z^2-1)^2}}dz$$, where $$C: |z-1|=1$$ by using Cauchy's formula. 
I have to use Cauchy's formula.
Cauchy's formula $$f(z_0)=\frac{1}{2\pi i}\oint_L\frac{f(z)dz}{z-z_0}$$ requires me to have denominator in form of $(z-z_0)^n$. I am confused about how to get denominator to fit formula.
 A: We can use the Residue theorem. The only pole in the contour $\lvert z - 1\rvert = 1$ is $z_0 = 1$. The pole is of order two so the residue is
$$
\text{Res}_{z_0=1} = \lim_{z\to 1}\frac{1}{(n - 1)!}\frac{d}{dz}(z-1)^2\frac{\sin(\pi z)}{(z^2-1)^2} = -\frac{\pi}{4}
$$
Then
$$
\oint\frac{\sin(\pi z)}{(z^2-1)^2}dz = 2\pi i\sum\text{Res} = -\frac{i\pi^2}{2}
$$

We can also use the general form of the Cauchy integral formula to determine the integral. As Daniel Fischer has shown, we can write the integral as
$$
\oint\frac{1}{(z-1)^2}\frac{\sin(\pi z)}{(z+1)^2}dz.
$$
Let $f(z) = \frac{\sin(\pi z)}{(z+1)^2}$. The general form of the Cauchy integral formula is
$$
f^{(n)} = \frac{n!}{2\pi i}\oint\frac{f(z)}{(z-z_0)^{n+1}}dz.
$$
The only pole in the contour is $z_0 = 1$. Then
$$
\oint\frac{f(z)}{(z-1)^2}dz = 2\pi if'(1) = 2\pi i\frac{-\pi}{4} = -\frac{i\pi^2}{2}
$$
A: If you really must use the Cauchy formula as you have written it in your question, then you can define
$$
f(z)=
\begin{cases}
\frac{\sin \pi z}{(z+1)^2(z-1)} & z\neq 1\\
-\pi/4 & z=1.
\end{cases}
$$
The function $f$ so defined is holomorphic in a neighborhood of the disc $\{z\in\mathbb{C}~:~|z-1|<1\}$ (if you don't get why, please ask or look up ''removable singularities''). With the curve $C:|z-1|=1$, you find that
$$
\int_C \frac{\sin \pi z}{(z^2-1)^2}\, dz = \int_C \frac{f(z)}{z-1}\, dz=2\pi i f(1)=-\frac{\pi^2i}{2}.
$$
