Evaluate $\int_\gamma\frac{1}{z}dz$ over a circle outside the origin I am trying to do the evaluate this integral:
$$\int_{\gamma} \frac{1}{z} dz$$
where $\gamma$ is a circle that does not contain the origin on itself either on its inside, I mean, $\gamma$ is a circle center at $z_0 \neq 0$ with radious $r < |z_0|$
My attempt:
Since the idea of the exercise is to evaluate the integral to get an insight into later results (Cauchy's theorem) I made a parametrization:
$z(t) = z_0 + re^{it}$ with $ 0 \leq t \leq 2\pi$. So I had
$$\int_{\gamma}  \frac{1}{z} dz = \int_{0}^{2\pi} \frac{1}{z(t)}z'(t)dt = \int_0^{2\pi}\frac{ire^{it}}{z_0 + re^{it}}dt$$
Here what I did to evaluate this integral is a change of variable:
call $u = z_0 + re^{it}$ then $du = ire^{it}dt$ and when $t = 0$, $u = z_0 + r$ and when $t = 2\pi$, $u = z_0 + r$. So now I had:
$$\int_{\gamma} f(z) dz = \int_{z_0 + r}^{z_0 + r} \frac{1}{u}du = 0$$
Where the last integral is due to fact that the limits of the integral are equal.
I am not quite confident with my change of variable because:


*

*What I get after my change of variable is totally trivially and it totally forget the integrant function ($1/u$).

*The notes that I was provided take a totally different approach: they use the fact that $\frac{1}{z}$ is analytic in $\gamma$ and the result that you can interchange the limit and the integral sign (in fact. they use some tricky steps to justify this) to come to the same answer ( exercise three, part b) )
So, will you please say me if what I did is correct or not¡? Thanks in advance!
 A: The integral $\int_a^b f(x)\,dx$ only has a precise meaning when $a$ and $b$ are real. If $a$ and $b$ are complex, you could define it to mean the integral along a straight-line path in the complex plane from $a$ to $b$, but line integrals are not always path independent. The technique of $u$-substitution is derived from the fundamental theorem of calculus, a theorem about real-valued functions on the reals. This theorem (and therefore the $u$-substitution technique) doesn’t necessarily work if you use complex numbers where real numbers appear in the theorem. (Lots of things from real analysis don’t generalize. For example, the definition of $f'(z)$ as a limit where $h\to0$ is wrong, because this is only the derivative in a particular direction in the complex plane.) A full understanding of these issues is a good chunk of a course in complex analysis.
Short answer: $u$-substitution (or “change of variable” for a definite integral) is a technique for functions of real numbers.
(Worth noting: Even for functions of real numbers, the “change the limits” approach for changing variables in a definite integral $\int_a^b f(x)\,dx$ can fail if the function $u(x)$ used for the substitution doesn’t map the interval $[a,b]$ to $[u(a),u(b)]$ in one-to-one fashion. Unfortunately, this issue is often ignored in elementary calculus courses.)
