Evaluating contour integral without using Residue Theorem 
Find the value of the integration without using Cauchy integral
  formula/Residue theorem:
$\int_{C}\cfrac{dz}{z^2+1}$ where C is a simple closed contour
  oriented in counter clockwise direction containing z = i as an
  interior point and also C lies in the interior of the circle $|z-i| =
 \cfrac{1}{2}$.

Now, I tried to solve it in this way:
$\int_{C}\cfrac{dz}{z^2+1}$ = $\int_{C}\cfrac{dz}{(z+i)(z-i)}$ = $\cfrac{i}{2}(\int_{C}\cfrac{dz}{z+i} - \int_{C}\cfrac{dz}{z-i})$
I was thinking of using the fact that both the integrals inside the brackets would be equal to $\pi i$, but I am not sure about that.
Can someone please give me a hint for solving this question?
Thanks
 A: Another approach to evaluating the integral with appealing to either Cauchy's Integral Formula or the Residue Theorem relies on Cauchy's Theorem.  
If $f(z)$ analytic within a open region (simply connected) in the complex plane, then for any contour (with finite length) $C$ contained in that open region, 
$$\oint_C f(z) dz=0$$
Now, in the problem at hand, $f(z)$ is not analytic in the region encircled by $C$.  However, we may evaluate the integral on a "deformed" contour $C'$ that does not enclose any singularity.  Then, 
$$\oint_{C'} f(z)dz=0$$
If we deform $C$ by adding a "key-hole" contour that "cuts out" the singularity with a small circle $\gamma$ of radius $\epsilon$, centered at the singular point then 
$$\oint_{C'} f(z)dz=\oint_C f(z)dz-\oint_{\gamma}f(z)dz=0$$
where the opposing contributions from the "key length" integrations annihilate one another.
Thus, this reduced the problem to evaluating the integral over $\gamma$.  For this problem,
$$\begin{align}
\oint_{\gamma}f(z) dz&=\lim_{\epsilon \to 0}\left(\int_0^{2\pi}\frac{i\epsilon e^{i\phi}d\phi}{(i+\epsilon e^{i\phi})^2+1}\right)\\\\
&=\lim_{\epsilon \to 0}\left(\int_0^{2\pi}\frac{i\epsilon e^{i\phi}d\phi}{2i\epsilon e^{i\phi}+\epsilon^2 e^{i2\phi}}\right)\\\\
&=\pi
\end{align}$$
A: It is not true that both integrals will be $\pi i$. The circle of integration encloses $i$, but it doesn't enclose $-i$. So $\frac{1}{z + i}$ is analytic within an open domain containing $C$.
