Computing turning number of closed curve I'm trying to compute the turning number of a closed plane curve, which should be a really straight forward computation. But my result is not a whole number, i.e. the total curvature is not a multiple of $2\pi$, which is impossible so I'm making a mistake somewhere. I know from plotting the curve that the turning number should be $-2$. I've been looking for hours but cannot seem to find it. Maybe someone can spot the mistake... Here is my work:
Let $\beta(t) = ((1+2\cos(t))\sin(t), (1+2\cos(t))\cos(t))$ be a regular closed plane curve. To compute the turning number $n_{\beta}$ I want to use the following:
$$n_{\beta} = \frac{1}{2\pi}\int_{0}^{L}K_{\beta}(t)dt\, ,$$
where $L$ is the period of $\beta$ and $K_{\beta}(t)$ is the curvature. I can compute the curvature like this:
$$K_{\beta} = \frac{1}{||\dot{\beta}(t)||^3}\cdot\det({\dot{\beta}(t), \ddot{\beta}(t)})$$
Computations:
$$\dot{\beta}(t) = (\cos t + 2\cos 2t, -\sin t -2\sin 2t)$$
$$\ddot{\beta}(t) = (-\sin t - 4 \sin 2t, -\cos t - 4 \cos 2t)$$
$$||\dot{\beta}(t))|| = (4\cos t + 5)^{1/2}$$
$$\det({\dot{\beta}(t),\ddot{\beta}(t)}) = -6 \cos t - 9$$
This is giving me the curvature
$$K_{\beta}(t) = \frac{-6 \cos t -9}{(4 \cos t + 5)^{3/2}}$$
At this point I integrated the curvature with the help of Wolframalpha, which did it numerically but I'm pretty sure it's $-2\pi-1$, when from the picture it should be $-4\pi$. Oddly enough, if I integrate the curvature without the power of $\frac{3}{2}$ in the denominator i actually get the correct result. Can anyone help me spot my mistake? Thanks a lot!
Edit: Here's a link to see the graph: https://www.desmos.com/calculator/vcxbpj2ios
 A: I found my mistake! Posting it as an answer, so future viewers can see what is happening. The issue was not the computation, but misuse of a formula. The thing is that the formula I wanted to use for the turning number, i.e.
$$n_{\beta} = \frac{1}{2\pi} \int_{0}^{L} K_{\beta}(t)dt$$
may only be used for curves that are parametrized by arclength. Since curvature is invariant under reparametrization I just assumed that it would work the same way. But the reparametrization-invariance actually gives us
$$K_{\beta \circ \varphi}(t) = K_{\beta}(\varphi(t)),$$
where $\beta \circ \varphi$ is a reparametrization of $\beta$ by arclength. So what I ignored was the $\varphi(t)$ as the argument of the curvature. If we account for this, by a change of variable we get
$$n_{\beta} = \frac{1}{2\pi} \int_{0}^{L} K_{\beta}(\varphi(t))\, dt = \frac{1}{2\pi} \int_{0}^{L} K_{\beta}(t)\cdot|\varphi'(t)|\,dt = \frac{1}{2\pi} \int_{0}^{L} K_{\beta}(t)\cdot||\dot{\beta}(t)||\,dt,$$
where for the last equality we used the fact that the reparametrization is given by $\varphi(s) = \int_{s_0}^{s} ||\dot{\beta}(\tau)||\,d\tau$, so $\varphi'(s) = ||\dot{\beta}(s)||$ by the fundamental theorem of calculus. Therefore, in my exercise one must integrate the function
$$K_{\beta}(t)\cdot||\dot{\beta}(t)|| = \frac{-6\cos t-9}{4\cos t + 5}$$
which evaluates to $-4\pi$, giving the turning number of -2, which is exactly what it should be.
A: Is this your curve, given by your equations?

A: The signed curvature being
$$k=-\frac{6 \cos (t)+9}{(4 \cos (t) + 5)^{\frac 32}}$$ the curvature is
$$\kappa=\frac{|6 \cos (t)+9|}{(4 \cos (t) + 5)^{\frac 32}}$$
$$\int \kappa \,dt=F\left(\frac{t}{2}|\frac{8}{9}\right)+E\left(\frac{t}{2}|\frac{8}{9}\right)-\frac{4
   \sin (t)}{3 \sqrt{4 \cos (t)+5}}$$ where appear elliptic integrals.
$$n = \frac{1}{2\pi}\int_{0}^{2\pi}\kappa \,dt=\frac{K\left(\frac{8}{9}\right)+E\left(\frac{8}{9}\right)}{\pi }\sim 1.15940$$
