Computing rotation index of $(\cos t, \sin(3t))$ I'm trying to compute the rotation index of the curve $\vec x\colon [0,2\pi]\to\mathbb R^2$ defined by
$$
\vec x(t) = (\cos t, \sin(3t)).
$$
I know that
\begin{align*}
x'(t) & = -\sin t & y'(t) & = 3\cos(3t) \\
x''(t) & = -\cos t & y''(t) & = -9\sin(3t)
\end{align*}
so the curvature is
\begin{align*}
\kappa_g(t) & = \frac{x'(t)y''(t) - x''(t)y'(t)}{\lVert{\vec x'(t)}\rVert^3} \\
& = \frac{9\sin t\sin(3t) + 3\cos t \cos(3t) }{\lVert{\vec x'(t)}\rVert^3}.
\end{align*}
Then I tried to compute the rotation index as
\begin{align*}
\frac{1}{2\pi} \int_0^{2\pi} \kappa_g \, ds & = \frac{1}{2\pi} \int_0^{2\pi} \kappa_g(t) s'(t) \, dt \\
& = \frac{1}{2\pi} \int_0^{2\pi} \frac{9\sin t\sin(3t) + 3\cos t \cos(3t) }{\lVert{\vec x'(t)}\rVert^2} \, dt \\
& = \frac{1}{2\pi} \int_0^{2\pi} \frac{9\sin t\sin(3t) + 3\cos t \cos(3t) }{\sin^2 t + 9\cos^2(3t)} \, dt.
\end{align*}
When I try to approximate the integral at the end, it looks like the rotation index comes out close to $1$, but I'm not sure how to simplify that integral. Is there a better way of finding the rotation index or a way to simplify the integral?
 A: The rotation number of $x$ is the winding number of $x'$ if $x$ is immersive.  Now to calculate the winding number of $x'$, refer to Crazy calculation for winding numbers and use the second coordinate axis as ray to achieve that the rotation number is indeed $1$. 
A: Computing the resulting integral using residue calculus is prohibitive, since letting $e^{it}=:z$ will result in $12$ different zeros of the denominator (I've been there $\ldots$).
I'd therefore suggest that you look separately at the $t$-intervals
$$\left[-{\pi\over6},{\pi\over6}\right],\quad
\left[{\pi\over6},{\pi\over2}\right],\quad
\left[-{\pi\over6},{\pi\over6}\right],\quad \left[{\pi\over2},{5\pi\over6}\right],\quad \left[{5\pi\over6},{7\pi\over6}\right],\quad
\left[{7\pi\over6},{3\pi\over2}\right],\quad
\left[{3\pi\over2},{11\pi\over6}\right]\ .$$
In the first and the last of these intervals the total curvature is equal to $\Delta\arg(\dot {\bf x})=\pi$ along the corresponding arc (maybe you want some more work done to prove this). In each of the other intervals the hodograph $\dot {\bf x}$ describes a loop completely contained in a quadrant, which implies that the total curvature along the corresponding arc of $\gamma$ is zero.
