What is the value of $\cos\theta$ for the line defined by the parametric equation $(x, y, z)=\left(-t^2+4t+1,\:3\cos\left(\pi t\right),\:t^3-21t\right)$ at the point where it crosses itself?
So I let the two variables be $s$ and $t$. So when the line crosses itself, $t=5$ and $s=-1$. The derivative of the above equation is $\left(-2t+4,\:-3\pi \sin\left(\pi t\right),\:3t^2-21\right)$. So I plugged in the values for $s$ and $t$ and got that for $t$ the vector was $(-6, 0, 54)$ and for $s$ the vector was $(6, 0, -18)$.
So to calculate $\cos\theta$, I did the following:
$\frac{\left(-6,\:0,\:54\right)\cdot \left(6,\:0,\:-18\right)}{\sqrt{\left(-6\right)^2+\left(54\right)^2}\sqrt{6^2+\left(-18\right)^2}}$ which gave me a value of $\frac{-14}{\sqrt{205}}$, which is incorrect.
Any help?
Your point is correct
that is $t=5$ ans $s=-1$ and also the evaluation for the tangent vectors and the final step, indeed we obtain
$$\frac{\left(-6,\:0,\:54\right)\cdot \left(6,\:0,\:-18\right)}{\sqrt{\left(-6\right)^2+\left(54\right)^2}\sqrt{6^2+\left(-18\right)^2}}=\frac{-1008}{72\sqrt{205}}=\frac{-14}{\sqrt{205}}$$