Find $\int_{\gamma}\frac{(\sin z)^2}{(z-z_0)^2}dz$ where $\gamma$ is a linear pieces parameterization of closed polygonal chain $[w_0,w_1,w_2,w_3,w_0]$ with vertices $w_0=1+i, w_1=1-i, w_2=-1+i,w_3=2$. Consider the cases $z_0=\frac 12, z_0=-1$.
I know that such task I should do by using the Cauchy's integral theorem. However, on the basis of the theorem itself, I have no intuition yet how to go about such tasks. Anyone would like to guide me how to think about a task so that I can do the next task one myself?
Since $-1$ is outside the region of $\Bbb C$ bounded by the range of the loop (see the picture below),$$\int_\gamma\frac{\sin^2z}{z+1}\,\mathrm dz=0.$$
Concerning $\frac12$, we have\begin{align}\int_\gamma\frac{\sin^2z}{z-1/2}\,\mathrm dz&=2\pi i\operatorname{Ind}_\gamma\left(\frac12\right)\frac{\sin'(1/2)}{1!}\\&=-2\pi i\cos\left(\frac12\right).\end{align}