TangentAndNormalVectors.mw

restart; 1 

with(plots); 1 

[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, ...
 

with(linalg); 1 

[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...
 

 

 

We will investigate the vector function r(t) = tcos(t) i + tsin(t) j +e^t k 

 

r := [t*cos(t), t*sin(t), t]; 1 

[t*cos(t), t*sin(t), t] 

 

 

 

Now define some options for our plots 

 

opts := color = black, axes = normal, labels = (['x', 'y', 'z']), numpoints = 100; 1
opts := color = black, axes = normal, labels = (['x', 'y', 'z']), numpoints = 100; 1
 

color = black, axes = normal, labels = ([x, y, z]), numpoints = 100 

 

Let's see what the curve r looks like 

 

spacecurve(r, t = -2*Pi .. 2*Pi, opts); 1 

 

Plot 

 

 

To take a derivative in Maple, use the diff(...)function. Specify the expression and the variable - diff(expression, variable) 

The derivative of r is the velocity vector, v:  

 

v := diff(r, t); 1 

[cos(t)-t*sin(t), sin(t)+t*cos(t), 1] 

And the second derivative of r (the derivative of v) is the acceleration vector: 

 

a := diff(v, t); 1 

[-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0] 

 

We can compute the Unit Tangent Vector T 

 

T := (diff(r, t))/sqrt(innerprod(diff(r, t), diff(r, t))); 1 

([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2) 

 

 

And we can easily compute the Unit Normal Vector 

 

 

N := (diff(T, t))/sqrt(innerprod(diff(T, t), diff(T, t))); 1 

(([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2)-1/2*([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*(2*t*sin(t)^2+2*t*cos(t)^2)/(1+cos(t)^2+t^2*sin(t)^2+sin...
(([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2)-1/2*([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*(2*t*sin(t)^2+2*t*cos(t)^2)/(1+cos(t)^2+t^2*sin(t)^2+sin...
(([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2)-1/2*([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*(2*t*sin(t)^2+2*t*cos(t)^2)/(1+cos(t)^2+t^2*sin(t)^2+sin...
(([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2)-1/2*([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*(2*t*sin(t)^2+2*t*cos(t)^2)/(1+cos(t)^2+t^2*sin(t)^2+sin...
(([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2)-1/2*([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*(2*t*sin(t)^2+2*t*cos(t)^2)/(1+cos(t)^2+t^2*sin(t)^2+sin...
(([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])/(1+cos(t)^2+t^2*sin(t)^2+sin(t)^2+t^2*cos(t)^2)^(1/2)-1/2*([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*(2*t*sin(t)^2+2*t*cos(t)^2)/(1+cos(t)^2+t^2*sin(t)^2+sin...
 

simplify(%); 1 

(([-4*sin(t)-2*t*cos(t), 4*cos(t)-2*t*sin(t), 0])+([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])*t^2-([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*t)/((2+t^2)^(3/2)*((5*t^2+8+t^4)/(2+t^2)^2)^(1/2))
(([-4*sin(t)-2*t*cos(t), 4*cos(t)-2*t*sin(t), 0])+([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])*t^2-([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*t)/((2+t^2)^(3/2)*((5*t^2+8+t^4)/(2+t^2)^2)^(1/2))
(([-4*sin(t)-2*t*cos(t), 4*cos(t)-2*t*sin(t), 0])+([-2*sin(t)-t*cos(t), 2*cos(t)-t*sin(t), 0])*t^2-([cos(t)-t*sin(t), sin(t)+t*cos(t), 1])*t)/((2+t^2)^(3/2)*((5*t^2+8+t^4)/(2+t^2)^2)^(1/2))
 

 

Wasn't that easy? 

Let's try another...First reset our variables 

r := 'r'; 1 

r 

v := 'v'; 1 

v 

a := 'a'; 1 

a 

T := 'T'; 1 

T 

N := 'N'; 1 

N 

In the following, don't type the letter e for e^t. Use the expression box on the left to pick out e^a or use exp(t) 

r := [exp(t)*sin(t), exp(t)*cos(t), exp(t)]; 1 

[exp(t)*sin(t), exp(t)*cos(t), exp(t)] 

spacecurve(r, t = -2*Pi .. 2*Pi, opts); 1 

 

Plot 

 

 

 

T := (diff(r, t))/sqrt(innerprod(diff(r, t), diff(r, t))); 1 

([exp(t)*sin(t)+exp(t)*cos(t), exp(t)*cos(t)-exp(t)*sin(t), exp(t)])/(2*(exp(t))^2*sin(t)^2+2*(exp(t))^2*cos(t)^2+(exp(t))^2)^(1/2) 

([exp(t)*sin(t)+exp(t)*cos(t), exp(t)*cos(t)-exp(t)*sin(t), exp(t)])/(2*(exp(t))^2*sin(t)^2+2*(exp(t))^2*cos(t)^2+(exp(t))^2)^(1/2) 

N := (diff(T, t))/sqrt(innerprod(diff(T, t), diff(T, t))); 1 

1/2*(([2*exp(t)*cos(t), -2*exp(t)*sin(t), exp(t)])/(2*(exp(t))^2*sin(t)^2+2*(exp(t))^2*cos(t)^2+(exp(t))^2)^(1/2)-1/2*([exp(t)*sin(t)+exp(t)*cos(t), exp(t)*cos(t)-exp(t)*sin(t), exp(t)])*(4*(exp(t))^2...
1/2*(([2*exp(t)*cos(t), -2*exp(t)*sin(t), exp(t)])/(2*(exp(t))^2*sin(t)^2+2*(exp(t))^2*cos(t)^2+(exp(t))^2)^(1/2)-1/2*([exp(t)*sin(t)+exp(t)*cos(t), exp(t)*cos(t)-exp(t)*sin(t), exp(t)])*(4*(exp(t))^2...
1/2*(([2*exp(t)*cos(t), -2*exp(t)*sin(t), exp(t)])/(2*(exp(t))^2*sin(t)^2+2*(exp(t))^2*cos(t)^2+(exp(t))^2)^(1/2)-1/2*([exp(t)*sin(t)+exp(t)*cos(t), exp(t)*cos(t)-exp(t)*sin(t), exp(t)])*(4*(exp(t))^2...
1/2*(([2*exp(t)*cos(t), -2*exp(t)*sin(t), exp(t)])/(2*(exp(t))^2*sin(t)^2+2*(exp(t))^2*cos(t)^2+(exp(t))^2)^(1/2)-1/2*([exp(t)*sin(t)+exp(t)*cos(t), exp(t)*cos(t)-exp(t)*sin(t), exp(t)])*(4*(exp(t))^2...
 

simplify(%); 1 

-1/2*([-exp(t)*cos(t)+exp(t)*sin(t), exp(t)*sin(t)+exp(t)*cos(t), 0])*2^(1/2)/(exp(2*t))^(1/2) 

 

 

Beats doing it by hand!