The question: Let $\gamma:[0,2\pi] \rightarrow \mathbb{C}, t \mapsto e^{int} + re^{imt}$, with $n,m \in \mathbb{Z}$ and $0<r \neq 1$. Calculate the winding number.
My attempt: My first try was to calculate the integral $\operatorname{Ind}(\gamma,z) = \int_0^{2\pi} \frac{\gamma'(t)}{\gamma(t) - z}\,\mathrm dz$, but when I solved this integral by subsituting the denominator after some calculation I end up with a logarithm dependent on $r$ and $z$ divided by $2\pi i$ which is obviously wrong since the winding number should be an integer. I suppose there should be a solution by making a homotopy kind of argument without having to calculate the integral but I'm kinda stuck in here.
Greetings a Peaceful Slosh
Suppose that $0<r<1$. Then the loop $\gamma$ is homotopic to the loop $\gamma^\star\colon[0,2\pi]\longrightarrow\mathbb C$ defined by $\gamma^\star(t)=e^{int}$ in $\mathbb{C}\setminus\{0\}$. Just define$$\begin{array}{rccc}H\colon&[0,2\pi]\times[0,1]&\longrightarrow&\mathbb{C}\setminus\{0\}\\&(t,u)&\mapsto&e^{int}+rue^{imt}.\end{array}$$Clearly, $H(t,0)=\gamma^\star(t)$, whereas $H(t,1)=\gamma(t)$. So, the winding number is $n$.
Now, suppose that $r>1$. The the loop $\gamma$ is homotopic to the loop $\gamma^\star\colon[0,2\pi]\longrightarrow\mathbb C$ defined by $\gamma^\star(t)=e^{imt}$ in $\mathbb{C}\setminus\{0\}$. The argument is similar. This time you shrink that $e^{int}$ part.