How to find the magnitude of a vector?
Norm in general assumes complex arguments and uses Abs
to provide for that:
Norm[{x, y}]
Sqrt[Abs[x]^2 + Abs[y]^2]
For real elements, you can either add an assumption for Simplify
or manually get rid of Abs
beforehand:
Simplify[Norm[{Cos[t], Sin[t]}], Element[t, Reals]]
Simplify[Norm[{Cos[t], Sin[t]}] /. Abs -> Identity]
1
1
This now returns the desired result for real t
:
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]] /. Abs -> Identity]]
curvature[Cos[t], Sin[t], t]
1/2
EDIT
With V10 we can use
ArcCurvature[2 {Cos[t], Sin[t]}, t]
1/2
Or
FrenetSerretSystem[a {Cos[t], Sin[t]}, t]
yielding curvature, tangent, and normal
Original answer
An alternative:
$Assumptions = t \[Element] Reals;
J[{x_, y_}] := {-y, x}
Curvature[a_][t_] := a''[t].J[a'[t]]/Norm[J[a'[t]]]^3 // Simplify
circle[a_][t_] := {a Cos[t], a Sin[t]}
Curvature[circle[2]][t]
ellipse[a_, b_][t_] := {a Cos[t], b Sin[t]}
Curvature[ellipse[2, 3]][t]
Curvature[ellipse[2, 3]][Pi]
$Assumptions = True; (* Clear *)
Here is a version of curvature
that uses Mathematica machinery not available to Wagner, who used V3.
curvature[x_, y_, z_] :=
Module[{s, v, vMag, T},
Block[{$Assumptions = {{x, y, z} ∈ Reals}},
s = {x, y, z};
v = D[s, t];
vMag = Surd[v.v, 2];
T = v/vMag;
Simplify[Norm[D[T, t]/vMag]]]]
curvature[Cos[t], Sin[t], t]
1/2