I'm trying to find the total curvature (or equivalently, rotation index, winding number etc.) of a plane curve (closed plane curves) given by $$\gamma(t)=(\cos(t),\sin(nt)), 0\le t\le 2\pi$$for each positive integer $n$.
Looking at the image of thess curves makes me believe that the answer is $0$ when $n$ is even and $2\pi$ when $n$ is odd, but how do I prove this? Calculating the integral of the curvature is extremely complicated!
I learned in my class that total curvature is invariant under regular homotopy, but how do I construct such a homotopy?



Here's a suggested regular homotopy, since you've got a good conjecture about the answer:
Let $$ H(s, t) = (1-s) (\cos t, \sin nt) + s (\cos t, \sin t) $$ for $n$ odd, and $$ H(s, t) = (1-s) (\cos t, \sin nt) + s (\cos t, \sin 2t) $$ for $n$ even.
Now you have only two things for which you need to compute the turning number. The first is a circle, so that's dead simple.
For the second, observe that if the unit tangent to your curve on the interval $[a, b]$ can be written as $\cos(\alpha(t)), \sin(\alpha(t))$ for some continuous function $\alpha$, then the integral you need to compute, on the interval $[a, b]$, is just $\alpha(b) - \alpha(a)$. Now partition your curve into segments on which the "angle" is monotonic, and you can compute the integral without ever antidifferentiating anything.
Post-comment additions @am70 has doubts about the two things above being regular homotopies, and I've explained briefly how one might check that they are actually fine, and I leave it to the reader to carry out that algebra. But sometimes a picture is worth a good deal, so here's some matlab code:
and the results of running
wgtest(4)andwgtest(5), which strongly suggest everything is just fine (i.e., they make it worth the time to try to do the algebra).