Complex integration and logarithms Say we want to compute $$\int \frac 1{1+z^2} dz$$
along the line segment from $z = 1$ to $z = 1 + i$. The integrand is continuous everywhere except at $z = \pm i$. One  antiderivative is $\tan ^{-1} (z) = \frac i2 \log \left( \frac {1-iz}{1+iz} \right) $ where the branch of the logarithm function is yet to be chosen.
Now in order to know which suitable branch to choose, we need to make sure that the branch cut of our chosen branch never interesects any points given by$\frac {1-iz}{1+iz}$ in the plane. So one needs to determine where points $\frac {1-iz}{1+iz}$ end up in the plane when $z$ lies on the line segment from $z = 1$ to $z = 1 + i$.
But this becomes extremely tedious and I'm sure one could construct an extremely complicated integrand where it would be nearly impossible to determine this. There must be some quicker way to do this, perhaps some theorem (which I clearly am unaware of) which spares us the trouble and allows to find the suitable branch without all the work. 
 A: I think an answer on how to analyze $\frac{1-iz}{1+iz}$ without tedious calculation ought to filter through what we know about fractional linear transformations. After all, $f(z)=\frac{1-iz}{1+iz}$ is a fractional linear transformation. Moreover, in view of the extended complex plane $\mathbb{C} \cup \infty$ we observe:
$$ f(i) = \infty, \ \ \ \ f(-i) = 0, \ \ \ \ f(\infty) = \frac{-i\infty}{i\infty} = -1. $$
This says $f(z)$ maps the $y$-axis to the $x$-axis. It follows that I want a branch of the log which falls on the $x$-axis. Well, other branches will also work but, this suggests the principal branch of log. 
Of course, the question is, why did I look at the $y$-axis? It was interesting because the line-segment of your problem lies completely to the right of the axis. It follows that a fractional linear transformation will map it to the right of the transformed axis. If that transformed region takes the branch of your favorite log. as a boundary then it follows we just needed to avoid crossing the original axis. 
Incidentally, I am using the well-known result that fractional linear transformations take lines and circles to lines and circles.
