Finding the Total Curvature of Plane Curves 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?



 A: 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:
function wgtest(n)

s = linspace(0,1, 40);
t = linspace(0, 2*pi, 200); 
[S, T] = ndgrid(s, t);
if (mod(n, 2) == 1) % odd n 
    Hx = (1 - S) .* cos(T) + S .* cos(T); 
    Hy = (1 - S) .* sin(n*T) + S .* sin(T); 
else               % even n
    Hx = (1 - S) .* cos(T) + S .* cos(T); 
    Hy = (1 - S) .* sin(n*T) + S .* sin(2*T); 
end
surf(Hx, Hy, S);
figure(gcf)

and the results of running wgtest(4) and wgtest(5), which strongly suggest everything is just fine (i.e., they make it worth the time to try to do the algebra).


A: It is even easier to calculate the algebraic degree using the vector $e_2$ in the vertical direction. The curve has only two points where the tangent is vertical, namely the leftmost and the rightmost points of the curve.  When $n$ is even, they correspond to the same tangent vector but with opposite signs (at one of them $\theta$ is decreasing and at the other $\theta$ is increasing), and therefore the degree is 0.  When $n$ is odd, the two points correspond to opposite tangent vectors.  Therefore at these points the algebraic degree is the same as the geometric degree which is plus or minus 1.
A: The total curvature as you correctly point out is determined by the rotation index.  The latter can be calculated as the algebraic degree of the map to the circle given by the unit tangent vector.  Here it is not necessary to actually find formulas for the unit tangent but it is enough to determine whether it occurs with a positive or a negative sign.  In the case of the problem you mentioned, it is convenient to choose the horizontal vector $e_1$ (in the direction of the positive $x$-axis). The points where it occurs are either the maxima or the minima of the graph; here half of them give $e_1$ and the other half give $-e_1$. One gets algebraic degree 0 or 1 depending on the parity of $n$.
A: I am assuming that the index is the rotation index.
This said, there are much easier ways to compute the index. One way is to compute all zeros of the two components of the derivative of the curve (trivial in the above example); each zero represents a time at which the tangent points towards a cardinal direction; in between zeros, the tangent is constrained to point in one quadrant, so the index does not change; by keeping track of how the tangent moves across quadrants in the plane, you can easily compute the index.
