Maple Lab 1 (Spring 2007 Math 251 Sections 05-07) 

Background Worksheet. 

 

It's a good idea to start every sheet with the restart command. Maple remembers everything that 

you do, so the restart command gives you a fresh start without having to shutdown and restart  

the program itself! 

> restart; 1
 

 

A Quick Note for Typing in Maple: 

To create new text groups such as this use the button labeled "T" above. To create a new execution group  

(the lines with maple commands which start with ">") you can use the button labeled "[>" or the keyboard  

shortcut "Ctrl+J". To insert a group before the cursor use "Ctrl+K".  

 

To delete a line of input or Maple output you can use the keyboard shortcut "Ctrl+Delete". To begin 

another line in an execution group use "Shift+Enter". Remember that "Enter" alone will just execute 

the command you've typed. 

 

For this lab we will need the "plots" package along with the "VectorCalculus" package. 

> with(plots); 1; with(VectorCalculus); 1
 

Warning, the name changecoords has been redefined 

[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
[Interactive, animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, ...
 

Warning, the assigned names `<,>` and `<|>` now have a global binding 

Warning, these protected names have been redefined and unprotected: `*`, `+`, `-`, `.`, D, Vector, diff, int, limit, series 

[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, AddCoordinates, ArcLength, BasisFormat, Binormal, CrossProd, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProd, DotProduct, Flux, Get...
 

We will be exploring Chapter 13 material using Maple. Specifically, we will be looking at: 

parametric curves, arc length, curvature, TNB-frames, and torsion.  

 

So let's get started. The command "spacecurve" allows us to draw parametric curves in real^3. 

We will begin by plotting a helix. 

> spacecurve([2*cos(t), 2*sin(t), t], t = -2*Pi .. 2*Pi, axes = boxed, scaling = constrained); 1
spacecurve([2*cos(t), 2*sin(t), t], t = -2*Pi .. 2*Pi, axes = boxed, scaling = constrained); 1
 

Plot 

Now let's try that again using a more "general approach". 

> r := proc (t) options operator, arrow; `<,>`(2*cos(t), 2*sin(t), t) end proc; 1
 

(Typesetting:-mprintslash)([r := proc (t) options operator, arrow; (VectorCalculus:-`<,>`)((VectorCalculus:-`*`)(2, cos(t)), (VectorCalculus:-`*`)(2, sin(t)), t) end proc], [proc (t) options operator,...
(Typesetting:-mprintslash)([r := proc (t) options operator, arrow; (VectorCalculus:-`<,>`)((VectorCalculus:-`*`)(2, cos(t)), (VectorCalculus:-`*`)(2, sin(t)), t) end proc], [proc (t) options operator,...
 

> spacecurve(r(t), t = -2*Pi .. 2*Pi, axes = boxed, scaling = constrained); 1
 

Plot 

It's easy to differentiate vector valued functions.  

 

Note: Maple uses the notation "e[x]" for the unit vector "i", "e[y]" for the unit vector "j", and "e[z]" for the unit vector "k". 

> r(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[2*cos(t)], [2*sin(t)], [t]], [ 

> diff(r(t), t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2*sin(t)], [2*cos(t)], [1]], [ 

Let's plot the helix together with it's tangent line at t = Pi. 

 

The derivative gives the direction of the line, and the function will give a point on the line. 

> tangentLine := r(Pi)+subs(t1 = Pi, diff(r(t1), t1))*t; 1
 

(Typesetting:-mprintslash)([tangentLine := Vector[column]([[-2-2*t*sin(Pi)], [2*t*cos(Pi)], [Pi+t]], [ 

> helixPlot := spacecurve(r(t), t = -2*Pi .. 2*Pi, color = blue); 1
 

helixPlot := INTERFACE_PLOT3D(CURVES([[2., 0.1292435660e-13, -6.283185307], [1.934589726, .5073091679, -6.026728764], [1.742637408, .9814351038, -5.770272221], [1.436698701, 1.391365101, -5.513815678]... 

> tangentPlot := spacecurve(tangentLine, t = -3 .. 3, color = red); 1
 

tangentPlot := INTERFACE_PLOT3D(CURVES([[-2., 6., .1415926536], [-2., 5.755102040, .2640416336], [-2., 5.510204080, .3864906136], [-2., 5.265306120, .5089395936], [-2., 5.020408160, .6313885736], [-2.... 

> display({tangentPlot, helixPlot}, scaling = constrained, axes = boxed); 1
 

Plot 

Next, let's compute the arc length function for the helix.  

[Remember that out parameter t ranges from -2*Pi to 2*Pi.] 

 

Note: Sometimes we have to tell Maple some extra information -- in this problem Maple should know that  

our dummy variable "u" is a real number. 

> assume(u::real); 1
 

> arcLength := s = int(sqrt(Typesetting:-delayDotProduct(diff(r(u), u), diff(r(u), u))), u = -2*Pi .. t); 1
 

(Typesetting:-mprintslash)([arcLength := s = int((1+4*sin(u)^2+4*cos(u)^2)^(1/2), u = -2*Pi .. t)], [s = int((1+4*sin(u)^2+4*cos(u)^2)^(1/2), u = -2*Pi .. t)]) 

> simplify(arcLength); 1
 

s = 5^(1/2)*(t+2*Pi) 

Substituting in t = 2*Pi (the end of the curve) will give us the length of our helix. 

> subs(t = 2*Pi, simplify(arcLength)); 1
 

s = 4*5^(1/2)*Pi 

Now we can make Maple solve for t and then reparametrize our helix in terms of arc length. 

> reparametrize := t = solve(simplify(arcLength), t); 1
 

(Typesetting:-mprintslash)([reparametrize := t = 1/5*(s-2*5^(1/2)*Pi)*5^(1/2)], [t = 1/5*(s-2*5^(1/2)*Pi)*5^(1/2)]) 

> rArcLength := proc (s) options operator, arrow; subs(reparametrize, r(t)) end proc; 1
 

(Typesetting:-mprintslash)([rArcLength := proc (s) options operator, arrow; subs(reparametrize, r(t)) end proc], [proc (s) options operator, arrow; subs(reparametrize, r(t)) end proc]) 

> rArcLength(s); 1
 

(Typesetting:-mprintslash)([Vector[column]([[2*cos(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))], [2*sin(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))], [1/5*(s-2*5^(1/2)*Pi)*5^(1/2)]], [
(Typesetting:-mprintslash)([Vector[column]([[2*cos(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))], [2*sin(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))], [1/5*(s-2*5^(1/2)*Pi)*5^(1/2)]], [
 

> spacecurve(rArcLength(s), s = 0 .. 4*sqrt(5)*Pi, scaling = constrained, axes = boxed); 1
spacecurve(rArcLength(s), s = 0 .. 4*sqrt(5)*Pi, scaling = constrained, axes = boxed); 1
 

Plot 

Of course, our graph looks no different, since we have the same curve (with a different parametrization). 

 

Now we can compute the curvature of the helix using the definition: "kappa = abs(dT/ds)". 

> T := proc (s) options operator, arrow; diff(rArcLength(s), s) end proc; 1
 

(Typesetting:-mprintslash)([T := proc (s) options operator, arrow; (VectorCalculus:-diff)(rArcLength(s), s) end proc], [proc (s) options operator, arrow; (VectorCalculus:-diff)(rArcLength(s), s) end p... 

> T(s); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2/5*sin(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))*5^(1/2)], [2/5*cos(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))*5^(1/2)], [1/5*5^(1/2)]], [
(Typesetting:-mprintslash)([Vector[column]([[-2/5*sin(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))*5^(1/2)], [2/5*cos(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))*5^(1/2)], [1/5*5^(1/2)]], [
 

Notice that we just computed the derivative of rArcLength and didn't bother dividing by it's length -- we don't 

need to since rArcLength is parametrized with respect to arc legnth! 

 

Don't believe me? Let's check the length of "T(s)" -- the unit tangent. 

> assume(s::real); 1
 

> simplify(sqrt(Typesetting:-delayDotProduct(T(s), T(s)))); 1
 

1 

Now we compute the curvature. 

> kappa := proc (s) options operator, arrow; sqrt(Typesetting:-delayDotProduct(diff(T(s), s), diff(T(s), s))) end proc; 1
 

(Typesetting:-mprintslash)([kappa := proc (s) options operator, arrow; sqrt((Typesetting:-delayDotProduct)((VectorCalculus:-diff)(T(s), s), (VectorCalculus:-diff)(T(s), s))) end proc], [proc (s) optio...
(Typesetting:-mprintslash)([kappa := proc (s) options operator, arrow; sqrt((Typesetting:-delayDotProduct)((VectorCalculus:-diff)(T(s), s), (VectorCalculus:-diff)(T(s), s))) end proc], [proc (s) optio...
 

> kappa(s); 1
 

2/5*(cos(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))^2+sin(1/5*(s-2*5^(1/2)*Pi)*5^(1/2))^2)^(1/2) 

> simplify(kappa(s)); 1
 

2/5 

We have re-discovered that the helix has constant curvature. 

 

Next, let's make Maple compute the TNB-frame for the helix. We can either do this "step-by-step" or using 

built in functions. Let's do it "step-by-step" first. 

 

I will introduce a "normalize" function which given a non-zero vector spits out a unit vector pointing in the same direction. 

> assume(t::real); 1
 

> normalize := proc (v) options operator, arrow; v/sqrt(Typesetting:-delayDotProduct(v, v)) end proc; 1
 

(Typesetting:-mprintslash)([normalize := proc (v) options operator, arrow; (VectorCalculus:-`*`)(v, 1/sqrt((Typesetting:-delayDotProduct)(v, v))) end proc], [proc (v) options operator, arrow; (VectorC... 

> rPrime := proc (t) options operator, arrow; diff(r(t), t) end proc; 1
 

(Typesetting:-mprintslash)([rPrime := proc (t) options operator, arrow; (VectorCalculus:-diff)(r(t), t) end proc], [proc (t) options operator, arrow; (VectorCalculus:-diff)(r(t), t) end proc]) 

> rPrime(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2*sin(t)], [2*cos(t)], [1]], [ 

> T := proc (t) options operator, arrow; simplify(normalize(rPrime(t))) end proc; 1
 

(Typesetting:-mprintslash)([T := proc (t) options operator, arrow; simplify(normalize(rPrime(t))) end proc], [proc (t) options operator, arrow; simplify(normalize(rPrime(t))) end proc]) 

> T(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2/5*5^(1/2)*sin(t)], [2/5*5^(1/2)*cos(t)], [1/5*5^(1/2)]], [ 

> TPrime := proc (t) options operator, arrow; diff(T(t), t) end proc; 1
 

(Typesetting:-mprintslash)([TPrime := proc (t) options operator, arrow; (VectorCalculus:-diff)(T(t), t) end proc], [proc (t) options operator, arrow; (VectorCalculus:-diff)(T(t), t) end proc]) 

> TPrime(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2/5*5^(1/2)*cos(t)], [-2/5*5^(1/2)*sin(t)], [0]], [ 

> N := proc (t) options operator, arrow; simplify(normalize(TPrime(t))) end proc; 1
 

(Typesetting:-mprintslash)([N := proc (t) options operator, arrow; simplify(normalize(TPrime(t))) end proc], [proc (t) options operator, arrow; simplify(normalize(TPrime(t))) end proc]) 

> N(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-cos(t)], [-sin(t)], [0]], [ 

> B := proc (t) options operator, arrow; simplify(`&x`(T(t), N(t))) end proc; 1
 

(Typesetting:-mprintslash)([B := proc (t) options operator, arrow; simplify((VectorCalculus:-`&x`)(T(t), N(t))) end proc], [proc (t) options operator, arrow; simplify((VectorCalculus:-`&x`)(T(t), N(t)... 

> B(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[1/5*5^(1/2)*sin(t)], [-1/5*5^(1/2)*cos(t)], [2/5*5^(1/2)]], [ 

Now let's use the built in function "TNBFrame". 

> TNBFrame(r(t), t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2/5*5^(1/2)*sin(t)], [2/5*5^(1/2)*cos(t)], [1/5*5^(1/2)]], [
(Typesetting:-mprintslash)([Vector[column]([[-2/5*5^(1/2)*sin(t)], [2/5*5^(1/2)*cos(t)], [1/5*5^(1/2)]], [
(Typesetting:-mprintslash)([Vector[column]([[-2/5*5^(1/2)*sin(t)], [2/5*5^(1/2)*cos(t)], [1/5*5^(1/2)]], [
 

> T := proc (t) options operator, arrow; subs(u = t, simplify(TNBFrame(r(u), u)[1])) end proc; 1
 

(Typesetting:-mprintslash)([T := proc (t) options operator, arrow; subs(u = t, simplify((VectorCalculus:-TNBFrame)(r(u), u)[1])) end proc], [proc (t) options operator, arrow; subs(u = t, simplify((Vec... 

> T(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-2/5*5^(1/2)*sin(t)], [2/5*5^(1/2)*cos(t)], [1/5*5^(1/2)]], [ 

> N := proc (t) options operator, arrow; subs(u = t, simplify(TNBFrame(r(u), u)[2])) end proc; 1
 

(Typesetting:-mprintslash)([N := proc (t) options operator, arrow; subs(u = t, simplify((VectorCalculus:-TNBFrame)(r(u), u)[2])) end proc], [proc (t) options operator, arrow; subs(u = t, simplify((Vec... 

> N(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[-cos(t)], [-sin(t)], [0]], [ 

> B := proc (t) options operator, arrow; subs(u = t, simplify(TNBFrame(r(u), u)[3])) end proc; 1
 

(Typesetting:-mprintslash)([B := proc (t) options operator, arrow; subs(u = t, simplify((VectorCalculus:-TNBFrame)(r(u), u)[3])) end proc], [proc (t) options operator, arrow; subs(u = t, simplify((Vec... 

> B(t); 1
 

(Typesetting:-mprintslash)([Vector[column]([[1/5*5^(1/2)*sin(t)], [-1/5*5^(1/2)*cos(t)], [2/5*5^(1/2)]], [ 

We can also use a built in command to compute curvature. 

> kappa := simplify(Curvature(r(t), t)); 1
 

(Typesetting:-mprintslash)([kappa := 2/5], [2/5]) 

> kappa; 1
 

2/5 

Let's plot the TNB-frame for our helix at the point t = Pi. 

> helixPlot := spacecurve(r(t), t = -2*Pi .. 2*Pi, color = black); 1
 

helixPlot := INTERFACE_PLOT3D(CURVES([[2., 0.1292435660e-13, -6.283185307], [1.934589726, .5073091679, -6.026728764], [1.742637408, .9814351038, -5.770272221], [1.436698701, 1.391365101, -5.513815678]... 

> TPlot := arrow(r(Pi), T(Pi), shape = arrow, color = blue); 1
 

TPlot := INTERFACE_PLOT3D(CURVES([[-2., 0., 3.141592654], [-2., -.8944271908, 3.588806249]], [[-2.028993811, -.6973244042, 3.535798227], [-2., -.8944271908, 3.588806249], [-1.971006189, -.7337591011, ... 

> NPlot := arrow(r(Pi), N(Pi), shape = arrow, color = green); 1
 

NPlot := INTERFACE_PLOT3D(CURVES([[-2., 0., 3.141592654], [-1.000000000, 0., 3.141592654]], [[-1.200000000, 0., 3.191592654], [-1.000000000, 0., 3.141592654], [-1.200000000, 0., 3.091592654]], STYLE(P... 

> BPlot := arrow(r(Pi), B(Pi), shape = arrow, color = red); 1
 

BPlot := INTERFACE_PLOT3D(CURVES([[-2., 0., 3.141592654], [-2., .4472135954, 4.036019845]], [[-2.040913842, .3320639510, 3.869987869], [-2., .4472135954, 4.036019845], [-1.959086158, .3834778016, 3.84... 

> display({helixPlot, NPlot, TPlot, BPlot}, scaling = constrained, axes = boxed); 1
 

Plot 

A curve in real^3 doesn't neccessarily lie in a plane -- see for example the helix above! 

 

Given a particular point on the curve, the osculating plane at that point is the best try 

at placing the curve in a plane. In other words, near the point in question, the curve 

looks like it lies in the osculating plane. 

 

The osculating plane for r(t) at t = t[0] is the plane which passes through the point r(t[0]) 

and has the normal vector B(t[0]). 

 

We will plot the helix together with its osculating point at t = Pi. 

> oscPlane := Typesetting:-delayDotProduct(B(Pi), `<,>`(x, y, z)-r(Pi)) = 0; 1
 

(Typesetting:-mprintslash)([oscPlane := 1/5*5^(1/2)*sin(Pi)*(x+2)-1/5*5^(1/2)*cos(Pi)*y+2/5*5^(1/2)*(z-Pi) = 0], [1/5*5^(1/2)*sin(Pi)*(x+2)-1/5*5^(1/2)*cos(Pi)*y+2/5*5^(1/2)*(z-Pi) = 0]) 

> oscPlot := plot3d(solve(oscPlane, z), x = -2 .. 2, y = -2 .. 2); 1
 

oscPlot := INTERFACE_PLOT3D(GRID(-2. .. 2., -2. .. 2., Array( 1..25,1..25, [... unable to display content ...] )), AXESLABELS(x, y,  

> display({oscPlot, helixPlot}, scaling = constrained, axes = boxed); 1
 

Plot 

We know that tangent lines give the best linear approximation of a curve. The osculating 

circle gives the best approximating circle. That is, the osculating circle at a particular point 

looks like the curve near that point. 

 

The osculating circle lies in the osculating plane, touches the curve at the point in question, 

and has a raduis of 1/kappa (the reciprical of the curvature at that point). 

 

Let's graph the osculating circle for the helix for t = Pi. 

> oscCircle := proc (t) options operator, arrow; cos(theta)*T(t)/kappa+sin(theta)*N(t)/kappa+N(t)/kappa+r(t) end proc; 1
 

(Typesetting:-mprintslash)([oscCircle := proc (t) options operator, arrow; (VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`*`)((VectorCalculus:-`*`)(cos(theta), T(t...
(Typesetting:-mprintslash)([oscCircle := proc (t) options operator, arrow; (VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`*`)((VectorCalculus:-`*`)(cos(theta), T(t...
(Typesetting:-mprintslash)([oscCircle := proc (t) options operator, arrow; (VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`*`)((VectorCalculus:-`*`)(cos(theta), T(t...
(Typesetting:-mprintslash)([oscCircle := proc (t) options operator, arrow; (VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`+`)((VectorCalculus:-`*`)((VectorCalculus:-`*`)(cos(theta), T(t...
 

> oscPlot := spacecurve(oscCircle(Pi), theta = 0 .. 2*Pi); 1
 

oscPlot := INTERFACE_PLOT3D(CURVES([[.5000000000, -2.236067977, 4.259626642], [.8196929043, -2.217709890, 4.250447599], [1.134136460, -2.162937068, 4.223061188], [1.438167512, -2.072648879, 4.17791709... 

> display({oscPlot, helixPlot}, scaling = constrained, axes = boxed); 1
 

Plot 

The curvature function measures how curved our curve is (eh?). Another function called the "torsion" function 

measures how much the curve "twists" out of its osculating plane. Torsion is defined to be the function tau(s) 

where (D(B))(s) = -tau(s)*N(s). So to compute torsion directly we would need to parametrize our curve with 

respect to arc length, compute the curve's TNB-frame, and then differentiate the binormal vector. This is too  

much work. So in the same way we found a direct formula for curvature, we get a direct formula for torsion: 

tau(t) = Typesetting:-delayCrossProduct((D(r))(t), ((`@@`(D, 2))(r))(t))*((`@@`(D, 3))(r))(t)/abs(Typesetting:-delayCrossProduct((D(r))(t), ((`@@`(D, 2))(r))(t)))^2 

 

Let's compute the torsion of the helix using this formula. 

> tau := proc (t) options operator, arrow; simplify(Typesetting:-delayDotProduct(`&x`(diff(r(t), t), diff(r(t), `$`(t, 2))), diff(r(t), `$`(t, 3)))/Norm(`&x`(diff(r(t), t), diff(r(t), `$`(t, 2))))^2) en...
 

(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
(Typesetting:-mprintslash)([tau := proc (t) options operator, arrow; simplify((VectorCalculus:-`*`)((Typesetting:-delayDotProduct)((VectorCalculus:-`&x`)((VectorCalculus:-diff)(r(t), t), (VectorCalcul...
 

> tau(t); 1
 

1/5 

So we see that the helix not only has constant curvature, but also constant torsion. This means it is "twisted" 

the "same" way everywhere. 

 

Let's also use a built in function to compute torsion. 

> simplify(Torsion(r(t), t)); 1
 

1/5 

>