I have to calculate the integral $$\oint_C \frac{z^2+z+1}{(z-i)^2}dz$$ where $C$ is the positively oriented rectangle between $-1, 1, 1+2i, -1+2i$.
My attempt is to use Cauchy's integral formula, but obviously the integrand is not differentiable at $i$ which lies inside $C$ which means that it is not holomorphic. Does this matter? If yes, how do I fix it?
If this does not matter, I simply choose e.g. $z_0=1/2(1+i)$ which lies inside $C$ and calculate its index $I_C(z_0)=\frac{1}{2\pi i}\oint_C \frac{d\xi}{\xi-z_0}$ respective to $C$ and then use $$f(z_0)I_C(z_0)=\frac{1}{2\pi i}\oint_C\frac{f(\xi)}{\xi-z_0}d\xi$$
Am I on the right track?