Complex Analysis Integration & Branch Cuts Suppose that the curve $C$ is any path between $z=0$ and $z=1$ which does not go through any singularities of the function below.  I'm trying to show the following:
$$\int_{C} \frac{1}{1+z^{2}}\,dz = \frac{\pi}{4} + k\pi\,\,\mathrm{for}\,\,k = 0,1,2,\ldots$$
Unfortunately, I can only find the $\pi/4$ portion via direct integration.  Where exactly is this $k\pi$ term coming from?  Since its an integer, I'm guessing that it's some kind of branch cut, but isn't this function single-valued?  Any insight would be appreciated.
 A: The function $\frac{1}{1 +z^2}$ is certainly single-valued, but it does not have a single-valued anti-derivative, because of the presence of poles. The situation is analogous to the function $1/z$, which is single valued on $\mathbb{C}\smallsetminus\{0\}$, but whose anti-derivative (the logarithm) is multiple-valued on $\mathbb{C}\smallsetminus\{0\}$. In fact, we can consider a similar question for the function $1/z$:

Analogous question: Suppose that $C$ is a loop in $\mathbb{C}\smallsetminus\{0\}$ that begins and ends at the point $1$. What are the possible values of $\int_C \frac{dz}{z}$?

The answer to this question is given by the residue theorem, which says that $$\int_C \frac{dz}{z} = 2\pi i\,\mathrm{Res}_0(1/z)W_0(C),$$ where $W_0(C)$ denotes the winding number of $C$ around $0$. The number $W_0(C)$ can be any integer. On the other hand, $\mathrm{Res}_0(1/z) = 1$. Thus we can conclude $$\int_C \frac{dz}{z} = 2\pi ik\,\,\,\,\,\,\mathrm{for}\,\,\mathrm{ some}\,\,k\in \mathbb{Z}.$$
Now perhaps you can apply a similar argument to your problem?
