TITLE: The integral $\int_{|z|=2}\log\frac{z+1}{z-1}dz$
QUESTION [8 upvotes]: Let $\log$ be the branch of the logarithm that extends the usual real logarithm, and consider on $D=\Bbb C\smallsetminus [-1,1]$ the function $$f(z)=\log\frac{z+1}{z-1}$$
I have to find the integral of $f$ around the circle $|z|=2$. Now, as an example, consider the integral $$\int_{|z|=2}\frac{e^{z+z^{-1}}}{1-z^2}dz$$
Using the biholomorphic mapping $B(0,1)^\times\to D$ that sends $z\to \frac 1 2(z+z^{-1})$ I got the integral $$\frac 1 2\int_\gamma \frac{e^{2z}}{1-z^2}dz$$
and $\gamma$ is a closed path inside $B(0,1)^{\times}$. This means the integral vanishes. I am trying to do something similar here. So if I take $w=\frac{z+1}{z-1}$, I get that $\frac{(w-1)^2}2=\frac{2}{(z-1)^2}$ and $dw=-2dz/(z-1)^2$, so I ultimately want to look at $$-2\int_{\gamma^{-}}\frac{ \log w}{(w-1)^2}dw$$ where $\gamma$ is a circle that passes through $1/3,3,-3/5+4/5 i$. Using the computer I got the circle is $$(x-5/3)^2+(y-5/2)^2=\frac{7225}{900}$$
Add This circle's orientation is now reversed. 
Even without this one sees $1$ is an interior point, so the integral should equal, by Cauchy, $4\pi i$ (not $-4\pi i$). Can anyone confirm this is correct, and/or suggest another approach?

REPLY [7 votes]: As mike said in the comments above, I think the answer is $4 \pi i$.
Since $1+ \frac{1}{z}$ and $1- \frac{1}{z}$ both lie in the right half-plane for $|z| >1$,
$$- \pi <  \text{Arg} \left(1 + \frac{1}{z} \right) - \text{Arg} \left(1- \frac{1}{z} \right) \le \pi \ \ \text{for} \ \ |z| >1.$$
Thus 
$$ \begin{align} f(z) = \log \left(\frac{z+1}{z-1}  \right) &= \log \left( \frac{1 + \frac{1}{z}}{1- \frac{1}{z}} \right) \\&= \log \left(1 + \frac{1}{z} \right) - \log \left(1 - \frac{1}{z} \right) \\ &= \frac{2}{z} + \text{O}(z^{-3}) \ \  \text{for} \ |z| >1. \end{align}$$
So $$ \int_{|z|=2} \log \left(\frac{z+1}{z-1}  \right) \ dz = - 2 \pi i \ \text{Res} [f(z), \infty] = - 2 \pi i  (-2) = 4 \pi i $$ since by definition the residue at infinity of $f(z)$ is the negative of the coefficient of the $\frac{1}{z}$ term in the Laurent expansion at $\infty$.