Complex contour integral using Cauchy integral formula I am trying to get integral in contour  ​​​​​​​$C=\left \{ 3\cos(t)+2i\sin(t) : 0\leq t\leq 2\pi \right \}$
$$\oint_{C} \frac{z}{(z+1)(z-1)^2}dz$$
What I tried was using partial fractions and integrate them separately
$$\oint_{C} \frac{z}{(z+1)(z-1)^2}dz =\oint_{C} \frac{1}{4(z-1)}dz +\oint_{C} \frac{1}{-4(z+1)}dz+\oint_{C} \frac{1}{2(z-1)^2}dz$$
For $\int_{C}^{} \frac{1}{4(z+1)}dz$ +$\int_{C}^{} \frac{1}{-4(z-1)}dz$, using Cauchy's integral fomula they are zero.
For $\int_{C}^{} \frac{1}{2(z-1)^2}dz$, I tried to use Cauchy's integral formula like:
$$\frac{1}{2}\int_{C}^{} \frac{\frac{1}{(z-1)}}{(z-1)}dz$$
but can't solve it... What am I missing??

Using the Residue at Infinity
You need not evaluate the residues at $-1$ and $1$.  Rather, note that the Residue at $\infty$ is given by
$$\begin{align}
\text{Res}\left(\frac{z}{(z+1)(z-1)^2},z=\infty\right)&=\text{Res}\left(-\frac1{z^2}\frac{1/z}{(1/z+1)(1/z-1)^2},z=0\right)\\\\
&=-\text{Res}\left(\frac{1}{(z+1)(z-1)^2},z=0\right)\\\\
&=0\tag1
\end{align}$$
Therefore, we find using $(1)$ that
$$\begin{align}
\oint_{C}\frac{z}{(z+1)(z-1)^2}\,dz&=-2\pi i \text{Res}\left(\frac{z}{(z+1)(z-1)^2},z=\infty\right)\\\\
&=0
\end{align}$$
And we are done!


Exploiting Cauchy's Integral Theorem
Alternatively, we note that the the integrand is analytic in the region $|z|>1$.  Therefore, any integral over a contour that contains both poles at $\pm1$ will have the same value as any other such integral.  Therefore, we assert that
$$\oint_{C}\frac{z}{(z+1)(z-1)^2}\,dz=\oint_{|z|=R>1}\frac{z}{(z+1)(z-1)^2}\,dz \tag2$$
Now, letting $R\to \infty$, the right-hand side approaches $0$.  And we conclude that the value of the integral of interest is also $0$, as expected!
