Let $\gamma_r$ be the circle centered at $2i$ with radius $r$, oriented counter clockwise. Compute
$\int_{\gamma_r} \frac{dz}{z^2+1}$.
(Hint: Assume $r > 0$ and also exclude the two values of $r$ for which the integral is not defined. Which values are these? Also, the integral depends on $r$)
So first I recognize that the integral is not defined at the values $\pm i$, so I will exclude those. After that I'm not certain what to do. I think I would separate it into $\frac12\int_0^{2\pi} \frac1{z-1} - \frac1{z+1} dz$. But this isn't using the fact that it is centered at 2i whatsoever so I know it isn't correct. Also, if I was to integrate it wouldn't depend on r so I'm not sure what to do...
Since $i$ is a distance $1$ away from $2i$, and $-i$ is a distance $3$ away from $2i$, we divide the cases for $r$ according to $r < 1$, $1 < r < 3$, and $r > 3$ (we exclude $r = 1$ and $r = 3$, since in those cases either $i$ or $-i$ lie on $\gamma_r$). If $r < 1$, both $i$ and $-i$ lie outside $\gamma_r$. So the function $1/(z^2 + 1)$ will be analytic inside and on $\gamma_r$, which implies $\int_{\gamma_r} dz/(z^2 + 1) = 0.$
Now write
$$(*)\quad \int_{\gamma_r} \frac{dz}{z^2 + 1} = \frac{1}{2}\int_{\gamma_r} \frac{dz}{z - i} - \frac{1}{2}\int_{\gamma_r} \frac{dz}{z + i}.$$
If $1 < r < 3$, then $i$ lies in $\gamma_r$ and $-i$ lies outside $\gamma_r$. Thus
$$\int_{\gamma_r} \frac{dz}{z - i} = 2\pi i \quad \text{and} \quad \int_{\gamma_r} \frac{dz}{z + i} = 0.$$
So by $(*)$,
$$\int_{\gamma_r} \frac{dz}{z^2 + 1} = \pi i.$$
Finally, if $r > 3$, then both $i$ and $-i$ lie inside $\gamma_r$. Thus
$$\int_{\gamma_r} \frac{dz}{z - i} = 2\pi i \quad \text{and} \quad \int_{\gamma_r} \frac{dz}{z + i} = 2\pi i,$$
which implies
$$\int_{\gamma_r} \frac{dz}{z^2 + 1} = 0$$
by $(*)$.
In summary,
$$\int_{\gamma_r} \frac{dz}{z^2 + 1} = \begin{cases} 0 & \text{if}\quad r < 1\\ \pi i & \text{if}\quad 1 < r < 3\\ 0 & \text{if} \quad r > 3\end{cases}$$