# that # formula i:=vector([1,0,0]):j:=vector([0,1,0]):k:=vector([0,0,1]): len:= proc(u) sqrt(innerprod(evalm(u),evalm(u))); end; f := t -> x(t)*i + y(t)*j + z(t)*k; Df := diff(f(t),t); D2f := diff(Df,t); T := Df/len(Df): DT := diff(T,t): K := len( DT ) / len( Df ): Rhs := len( crossprod( Df, D2f ) ) / len( Df )^3: simplify(Rhs^2 - K^2); curvature := proc(f,t) local Df, D2f, l,u,v; Df := diff(f(s),s); D2f := diff(Df,s); Df := subs(s=t,Df); D2f := subs(s=t,D2f); u := crossprod(Df,D2f); l := sqrt(innerprod(u,u)); RETURN(l/sqrt(innerprod(Df,Df))^3); end; assume(r > 0): curvature(t->r*cos(t)*i+r*sin(t)*j,Pi);