I'm calculating the torsion of a given helix three different ways, and getting two different answers.
The helix is given by parametric equations: $x(t)=\cos(2t)$, $y(t)=\frac{t}{2}$, $z(t)=\sin(2t)$, or more succinctly, $\mathbf{r}(t) = \left<\cos(2t),\frac{t}{2},\sin(2t)\right>$
The $2t$ is kind of annoying, but torsion is a purely geometric property, so a reparametrization shouldn't hurt. If $s=2t$, then our helix is $\left<\cos(s),\frac{s}{4},\sin(s)\right>$, and a well known formula for torsion, $\tau=\frac{b}{a^2+b^2}$ for the helix $\left<a\cos(t),a\sin(t),bt\right>$, gives us $\tau=\frac{-4}{17}$, taking it as negative because of reversed orientation. Great.
If I use the formula $\tau=\frac{|\mathbf{v}\times\mathbf{a}|\cdot\mathbf{a}'}{|\mathbf{v}\times\mathbf{a}|^2}$, I get the same answer. Even better.
Now, there's also the formula $\tau=-\mathbf{N}\cdot\mathbf{B}'$, where $\mathbf{N}$ and $\mathbf{B}$ are the unit normal and unit binormal vectors, respectively. This involves the most work, but it's the most illuminating as far as seeing information about the curve along the way. It's also leading me to the answer $\tau=\frac{-2}{\sqrt{17}}$.
I don't think this last formula is wrong, because I'm seeing it in multiple sources. The only thing I can think to do is to reproduce my work and try to figure out where I'm messing up:
$\mathbf{r}=\left<\cos(2t),\frac{t}{2},\sin(2t)\right>$
$\mathbf{v}=\left<-2\sin(2t),\frac{1}{2},2\cos(2t)\right>$
$|\mathbf{v}|=\sqrt{4+\frac14}=\frac{\sqrt{17}}{2}$
$\mathbf{T}=\frac{\mathbf{v}}{|\mathbf{v}|}=\frac{1}{\sqrt{17}}\left<-4\sin(2t),1,4\cos(2t)\right>$
$\mathbf{T}'=\frac{1}{\sqrt{17}}\left<-8\cos(2t),0,-8\sin(2t)\right>$
$|\mathbf{T}'|=\frac{8}{\sqrt{17}}$
$\mathbf{N}=\frac{\mathbf{T}'}{|\mathbf{T}'|} = \left<-\cos(2t),0,-\sin(2t)\right>$
$\mathbf{B}=\mathbf{T}\times\mathbf{N} = \frac{1}{\sqrt{17}}\left<-\sin(2t),-4,\cos(2t)\right>$
$\mathbf{B}' = \frac{1}{\sqrt{17}}\left<-2\cos(2t),0,-2\sin(2t)\right>$
$\tau=-\mathbf{N}\cdot\mathbf{B}' = \frac{1}{\sqrt{17}}\left<\cos(2t),0,\sin(2t)\right>\cdot\left<-2\cos(2t),0,-2\sin(2t)\right>=\frac{-2}{\sqrt{17}}$
Why am I getting different answers? Please help!
Edit: Thanks to the initial comment below, I'm seeing my problem. I haven't been consistent about the meaning of the prime symbol. Every prime written here means $\frac{d}{dt}$, except for the one in the formula $\tau=-\mathbf{N}\cdot\mathbf{B}'$. That one is supposed to be a $\frac{d}{ds}$, and that was the source of my problem. When we don't have a nice formula for $s$, it's better to use the torsion formula $\tau=\frac{|\mathbf{v}\times\mathbf{a}|\cdot\mathbf{a}'}{|\mathbf{v}\times\mathbf{a}|^2}$. That one appears to work whether I've got an arc length parametrization or not.