Heuristic approach to winding number I'm working on problem 8.23 of Rudin's PMA, that is: 

Let $\gamma:[a,b]\to\mathbb C$ be a closed curve, $\gamma \in C^1([a,b])$ and $\gamma(t) \neq 0 \ \forall t\in [a,b]$. Show that $$\text {Ind}(\gamma)=\frac{1}{2 i \pi} \int _a ^b \frac{\gamma '}{\gamma}$$
  is an integer.

My idea was to express $\gamma$ in polar coordinates: $$\gamma(t)=r(t)e^{i\theta (t)},$$
so that $$\gamma '(t)=r'(t)e^{i\theta(t)}+r(t)e^{i\theta (t)}\cdot i\theta'(t)$$
and $$\frac{\gamma'(t)}{\gamma(t)}=\frac{r'(t)}{r(t)}+i\theta'(t).$$
Integrating over $[a,b]$ and noting that the first term vanishes:$$\frac{\theta(b)-\theta(a)}{2\pi}.$$
Since $\gamma (a)=\gamma (b)$ and $e^{i\theta}$ has period $2\pi$, this is an integer.
Now, there are some issues that I don't know how to fix. Let $x,y$ denote $\text{Re}\gamma $ and $\text {Im} \gamma$. Since $\gamma \in C^1$, follows that $x,y\in C^1$ and consequently $r=\sqrt{x^2+y^2}\in C^1$.
What about $\theta$? Suppose for example that I define $\theta (a)$ to be the smallest positive that satisfies $\frac{\gamma(a)}{r(a)}=e^{i\theta(a)}$. I know that, then, I could define $\theta$ locally via $\tan ^{-1}$ and I would get a $C^1$ function. But how can I define a function $\theta\in C^1$ that keeps count of the windings around zero?
 A: You can locally, in a neighbourhood of each $t\in [a,b]$ define a family $\theta_{t,k}$ of differentiable argument functions via all possible branches of $\tan^{-1}$ or $\cot^{-1}$. Since $[a,b]$ is compact, $\gamma$ is uniformly continuous, hence there is a $\delta > 0$ such that for all $t\in [a,b]$, you can define a differentiable argument of $\gamma(t)$ at least on the neighbourhood $[t-\delta,t+\delta] \cap [a,b]$ of $t$. Then you can cover $[a,b]$ with finitely many such intervals, and glue together a family of local arguments to obtain a differentiable global argument. Starting with an arbitrary choice of $\theta_{a,0}$, extend it by $\theta_{a+\delta, k_1}$ such that $\theta_{a,0}(a+\delta/2) = \theta_{a+\delta,k_1}(a+\delta/2)$ to obtain a differentiable argument on $[a,a+2\delta]$. Since the two glued-together argument functions agree in one point of the overlap and are continuous, and their difference can take only integral multiples of $2\pi$ as values, they agree on the entire overlap of their domains. Continue until you have reached $b$.
