Problem with elementary complex integration of $1/(z-1)$ The problem is
$$\int_{|z|=2}{\frac{dz}{z-1}}$$
Of course applying Cauchy's integral formula one easily obtains $2\pi i$ as the answer. Though being stubborn I tried to solve this using standard paramentrization of the curve, that is $z(t) = 2 e^{it}$ for $t \in [0,2\pi)$. I got
$$\int_0^{2\pi}{\frac{2i e^{it}}{2e^{it}-1}} dt$$
and making the substituition $s= 2e^{it} -1$, I get $s(2\pi) = s(0) = 1$ from which
$$\int_1^1{\frac{ds}{s}} = 0$$
What did I do wrong? I'm tempted to say that I should have parametrized the curve as $z(t) = 2 e^{it} +1$, which gets me the right result, though in my opinion this would not be the right parametrization as for example $|z(0)| = 3 \neq 2$.
 A: By selecting $t\in [0,2\pi]$, the plane has been cut along the real axis and the Riemann sheet has been tacitly selected.  Then on $(0,2\pi)$, $\log(z-1)$ is the antiderivative of $\frac{1}{z-1}$.  Therefore, we have for $\epsilon>0$
$$\begin{align}
\oint_{|z|=2}\frac{1}{z-1}\,dz&=\lim_{\epsilon\to 0}\int_{2+i\epsilon}^{2-i\epsilon}\frac{1}{z-1}\,dz\\\\
&=\lim_{\epsilon\to 0}\left(\log(1-i\epsilon)-\log(1+i\epsilon)\right)\\\\
&=2\pi i
\end{align}$$
If we wish to use the parameterization, we have
$$\begin{align}
\oint_{|z|=2}\frac{1}{z-1}\,dz&=\lim_{\epsilon\to0}\int_{\epsilon}^{2\pi-\epsilon}\frac{2ie^{it}}{2e^{it}-1}\,dt\\\\
&=\lim_{\epsilon\to 0}\left(\log(2e^{i(2\pi -\epsilon)})-\log(2e^{i(\epsilon)})\right)\\\\
&=2\pi i
\end{align}$$
And to proceed using real analysis we can write
$$\begin{align}
\oint_{|z|=2}\frac{1}{z-1}\,dz&=\lim_{\epsilon\to0}\int_{\epsilon}^{2\pi-\epsilon}\frac{2ie^{it}}{2e^{it}-1}\,dt\\\\
&=\lim_{\epsilon\to 0}\left(\int_{\epsilon}^{2\pi-\epsilon} \frac{2\sin(t)+2i(2-\cos(t))}{5-4\cos(t)}\,dt\right)\\\\
&=\int_{-\pi}^{\pi} \frac{2\sin(t)+2i(2-\cos(t))}{5-4\cos(t)}\,dt\\\\
&=4i \int_0^\pi \frac{2-\cos(t)}{5-4\cos(t)}\,dt\\\\
&=4i\left.\left(\frac14 t+\frac12 \arctan\left(3\tan\left(\frac t2\right)\right) \right)\right|_0^\pi\\\\
&=2\pi i
&\end{align}$$
as expected!
A: See that the denominator of the given function in the integration becomes $0$ inside the contour$|z|=2$. So, it is a singularity. So, multiplying the numerator with $z$ and applying limit at $z =0$, it gives $1$ and is analytic. So, the singularity is removable. So, given function satisfies the definition of winding number. So, the integral is $2\pi i\cdot n(\gamma, 1)$
See that $n(\gamma,1) =1$ while the curve $\gamma$ rotated about the singularity for $1$ time.
Therefore the integral is $2\pi i$.
