definition of winding number, have doubt in definition.

It is a non-trivial fact from topology that given any curve $\gamma:[0, 1]\rightarrow\mathbb{C}\setminus\{a\}$ we can find a continuous polar coordinate expression about $a$ such that $$\gamma(t) = a + r(t)\cdot e^{i\theta(t)}$$ where $\theta$ and $r$ are continuous themselves (if the curve is differentiable, so are $r$ and $\theta$). Moreover $\theta$ and $r$ are uniquely defined up to multiples of $2\pi$ which is a freedom in the choice of the starting angle. The main consequence of the above is that the natural definition of the winding number should be $$\mathrm{Wnd}(a,\ \gamma) = \frac{\theta(1) - \theta(0)}{2\pi}$$ i.e. the total continuous angular change of the curve divided by $2\pi$. It should not be hard to convince yourself that this is always an integer for closed curves and represents the number of times $\gamma$ "winds" about $a$. It remains to relate this intuitive definition to our integral definition and the key component is the logarithm $$\log(z) = \ln|z| + i\theta(z)$$ where the imaginary component of the logarithm is essentially an angle tracking function, provided that we can make it vary continuous. (The logarithm is inherently discontinuous along some branch cut, so one remedy is the above continuous polar expression. Another is to piece together multiple integrals to make the argument vary continuously.) So we have \begin{align}\oint_\gamma \frac{1}{z-a} dz &= \int_0^1 \frac{r'(t)e^{i\theta(t)} + i\theta'(t)r(t)e^{i\theta(t)}}{r(t)e^{i\theta(t)}} dt\\ &=\int_0^1 \frac{r'(t)}{r(t)} + i\theta'(t) dt\\ &=\log(r(1))-\log(r(0)) + i\left[\theta(1) - \theta(0)\right]\end{align} Since the curve is closed, it follows that $r(1) = r(0)$ so the expression evaluates to $$i\left[\theta(1) - \theta(0)\right]= 2\pi i\cdot\mathrm{Wnd}(a,\ \gamma)$$ which is the justification for the integral definition.


I am going to explain what happens for $a=0$, in general if you work at some other $a$, you just need to replace $f(z)$ by $f(z+a)$ and you reduce to the below case.

It is easy to see that if $C$ is the circle $C(t) =e^{it} \,;\, 0 \leq t \leq 2 \pi$ then

$$\int_{C} \frac{1}{z} = 2 \pi i$$

Now, if you combine this result with the fact that $\frac{1}{z}$ is analytic on $\mathbb{C} \backslash \{ 0 \} $ you get the desired result.

You could replace $f(z)= \frac{1}{z}$ by any function which is analytic on $\mathbb{C} \backslash \{ 0 \} $, and with the property that $\int_{C} f(z) = 2 \pi i$, where $C$ is the above circle. Anyhow, if you look for such function, and you write it's Laurent Series, you will get $f(z)=\frac{1}{z} +$ analytic, and the analytic part is irrelevant for the integration.

P.S. I think that one can prove that, up to addition by an entire function, the only meromorphic function $f(z)$ which has the property that $\int_\gamma f(z-a) =$winding number at $a$ is $f(z) =\frac{1}{z}$.