Vector Functions

>    restart:

Se e: Stewart, chapter 13. We start with loading the package VectorCalculus :

>    with(VectorCalculus):

A vector function   r (t) can be defined as follows:

 

>    r:= t -> < x(t), y(t), z(t) >;

r := t -> VectorCalculus:-`<,>`(x(t),y(t),z(t))

The output looks a little bit strange, but calling the function generates the expected result:

>    r(t);

Vector(%id = 150498976)

Then the velocity  vector v (t) and the acceleration  vector a (t) are given by:

>    v := t -> diff(r(t),t);

>    a := t -> diff(v(t),t);

v := t -> VectorCalculus:-diff(r(t),t)

a := t -> VectorCalculus:-diff(v(t),t)

Again this is what we want, since:

>    v(t); a(t);

Vector(%id = 149993240)

Vector(%id = 150962732)

Now, for instance, we can compute the arc length  of a curve given by r (t) with a <= t  and t <= b  :

>    L:=ArcLength(r(t),t=a..b);

L := Int((diff(x(t),t)^2+diff(y(t),t)^2+diff(z(t),t)^2)^(1/2),t = a .. b)

Now consider example 4 of § 13.1. That the curve given by the vector function

>    r:=t-><cos(t),sin(t),t>: r(t);

Vector(%id = 150846376)

represents a helix  can be seen by using the command SpaceCurve , which is included in the package VectorCalculus  since Maple 11. In Maple 10 this command was only available in the package Student[VectorCalculus] . Explore the numerous options (such as different views) when you select the picture by a mouse click!

>    SpaceCurve(r(t),t=0..6*Pi);

[Maple Plot]

In example 6 of § 13.1 a vector function is obtained that represents the intersection of the cylinder x^2+y^2 = 1  and the plane y+z = 2  :

>    with(plots): P1:=implicitplot3d({x^2+y^2=1,y+z=2},x=-2..2,y=-2..2,z=-2..4,orientation=[45,60]): display(P1);

[Maple Plot]

The vector function representing the curve of intersection is:

>    r:=t-><cos(t),sin(t),2-sin(t)>: r(t);

Vector(%id = 150534512)

>    P2:=SpaceCurve(r(t),t=0..2*Pi,color=red,thickness=5): display(P2);

[Maple Plot]

If we display the cylinder, the plane and the intersecting curve into one figure we see that it seems to be correct (again get different views by clicking the picture!):

>    display(P1,P2);

[Maple Plot]

The toroidal spiral in figure 7 of §  13.1 can be created as follows:

>    SpaceCurve(<(4+sin(20*t))*cos(t),(4+sin(20*t))*sin(t),cos(20*t)>,t=0..2*Pi,numpoints=1000);

[Maple Plot]

and the trefoil knot in figure 8 of § 13.1:

>    SpaceCurve(<(2+cos(1.5*t))*cos(t),(2+cos(1.5*t))*sin(t),sin(1.5*t)>,t=0..6*Pi,numpoints=1000);

[Maple Plot]

In example 1 of § 13.3 the arc length  of the helix given by

>    r:=t-><cos(t),sin(t),t>: r(t);

Vector(%id = 156145468)

is derived:

>    L:=ArcLength(r(t),t=0..2*Pi);

L := 2*2^(1/2)*Pi

We can also compute the curvature  of this curve:

>    Curvature(r(t));

1/4*(2*cos(t)^2+2*sin(t)^2)^(1/2)*2^(1/2)

>    simplify(%);

1/2

Example 3 of § 13.3, the curvature of a circle with radius a  :

>    Curvature(<a*cos(t),a*sin(t)>) assuming a::constant, a::positive;

(sin(t)^2+cos(t)^2)^(1/2)/a

>    simplify(%);

1/a

Therefore rho = 1/kappa  is often called the radius of curvature :

>    RadiusOfCurvature(<a*cos(t),a*sin(t)>) assuming a::constant, a::positive;

a

Example 4 of § 13.3:

>    simplify(Curvature(<t,t^2,t^3>));

2*((9*t^4+9*t^2+1)/(1+4*t^2+9*t^4)^2)^(1/2)/(1+4*t^2+9*t^4)^(1/2)

>    subs(t=0,%);

2

Example 5 of §  13.3:

>    simplify(Curvature(<x,x^2>)) assuming x::real;

2/(1+4*x^2)^(3/2)

Example 6 of §  13.3. We reconsider the circular helix:

>    r(t);

Vector(%id = 156662924)

The unit tangent vector   T (t), the principal unit normal vector   N (t) and the binormal vector   B (t) together form the so-called TNB frame (or Frenet frame):

>    TNBFrame(r(t));

Vector(%id = 170299696), Vector(%id = 170285872), Vector(%id = 170283780)

Note that the binormal vector B (t) can be simplified. This can be done by first isolating this vector:

>    TNBFrame(r(t),'output'=['B']);

Vector(%id = 157270108)

>    simplify(%);

Vector(%id = 157386752)

>