I'm doing this exercise in Wagner's book (p.78)
, and this is my attempt:
Clear[curvature];
(*Define curvature function *)
curvature[x_, y_, z_] := Module[{s, v, T},
s = {x, y, z};
v = D[s, t];
T = v/Norm[v];
Simplify[Norm[D[T, t]/Norm[v]]]]
(* Apply function to Cos[t],Sin[t],t *)
curvature[Cos[t], Sin[t], t]
As you could see I did not get the expected answer (1/2) when applying my curvature function.
It also would not reduce even when a value for t was substituted:
curvature[Cos[t], Sin[t], t] /. t -> 4
However, following Wagner's solution where he defines a separate magnitude function does work:
Clear[curvature];
(* Define function to find magnitude of a vector *)
mag[vec_] := Sqrt[vec.vec]
(* Define curvature function *)
curvature[x_, y_, z_] := Module[{s, v, T},
s = {x, y, z};
v = D[s, t];
T = v/mag[v];
Simplify[mag[D[T, t]/mag[v]]]]
(* Apply function to Cos[t],Sin[t],t *)
curvature[Cos[t], Sin[t], t]
It seems pretty clear that using Norm to find the magnitude of a vector does not work in this case. More specifically, using Norm doesn't seem to simplify trigonometric results unless the t is substituted
Norm[{Cos[t], Sin[t]}]
Norm[{Cos[t], Sin[t]}] /. t -> 4 // Simplify
I'm very fuzzy on my matrix knowledge so I'd really appreciate an explanation on why Norm doesn't seem to return the expected answer in this case. Also, is there any other way to find a vector's magnitude that will give the correct answer without defining a new function?
Simplify[Norm[{Cos[t], Sin[t]}], Element[t, Reals]]
... $\endgroup$