Let $\gamma$ be the circle of radius 2 centered at the origin.
$$ \int_{\gamma} \frac{1}{z^2+i}dz $$
I tried factoring the denominator out to where $ \int_{\gamma} \frac{1}{z^2+i}dz $ = $ \int_{\gamma} \frac{1}{(z+i^{3/2})(z-i^{3/2})}dz $
Then solving by partial fraction, i get $ \int_{\gamma} \frac{-\frac{1}{2}i^{-3/2}}{(z+i^{3/2})} + \int_{\gamma} \frac{\frac{1}{2}i^{-3/2}}{(z-i^{3/2})}$
Now when applying Cauchy's integral formula for about the origin, everything cancels out giving me 0. I do not this is th correct answer. I believe i'm either using the formula incorrectly and/or i'm missing something important when evaluating this.
The integrand $f$ is the quotient of $g(x) = 1$ and $h(x) = z^2 + i$. It has two simple poles, $e^{3i\pi/4}$ and $e^{7i\pi/4}$. Its residue at the poles can be evaluated using the following ($c = e^{3i\pi/4}$) $$ \operatorname{res}(f;c) = \frac{g(c)}{h'(c)} = \frac{1}{2e^{3i\pi/4}} = \frac{1}{2}e^{-3i\pi/4} $$ and similarly at the other pole with residue $\frac{1}{2}e^{-7i\pi/4} = -\frac{1}{2}e^{-3i\pi/4}$. Using the residue theorem, $$ \int_\gamma f\,dz = 2\pi i(\operatorname{res}(f;e^{3i\pi/4}) + \operatorname{res}(f;e^{7i\pi/4})) = 2\pi i 0 = 0 $$ Thus your calculation is correct. I think the problem's purpose is to show that Goursat's theorem is sometimes satisfied for non-holomorphic functions.