I tried finding the integral of $\int_{|z|=2}^{}\frac{1}{z^2+1}dz$ but not sure whether it is correct.
$\gamma(t)=2e^{it},t\in[0,2\pi]$
$$\int_{|z|=2}^{}\frac{1}{z^2+1}dz=\int_{0}^{2\pi}\frac{2ie^{it}}{4e^{2it}+1}dt$$
I cannot seem to take it forward from here. Is it possible to use Cauchy's integral formula to get an answer? Thanks
HINT: $\frac{1}{1+z^2}=\frac{1}{(z-i)(z+i)}$. Use partial fractions to expand this and then apply Cauchy Integral Formula. You should get the $0$ (As proved in the other answer).