Next: Exercises Up: Background Previous: Background

### Examples

For more examples, see the help screens for the individual procedures. Note that all of the procedures accept either Maple vectors or Maple lists as arguments. Note also that several of the procedures allow you to evaluate the result at a specific value of t by using a second argument of the form t=a (to evaluate at t=a). If the second argument is simply t, then the result of the procedure is an expression involving t. This does not apply to the VDiff command, however, where argumets after the first are used to indicate derivatives.

> circ := t -> vector([12*sin(t),12*cos(t)]);

> VDiff(circ(t),t);

> tanvect(circ(t),t);

> normalvect(circ(t),t);

> Curvature(circ(t),t);

> r := t -> vector([t,t^2]);

> tanvect(r(t),t);

> tanvect(r(t),t=0);

> tanvect(r(t),t=1);

Computing the unit normal vector is always more complicated than computing the unit tangent vector . In addition, Maple likes to do computations as generally as possible, which can cause complications. In particular, Maple assumes that all variables can be complex numbers. This isn't a good assumption in calculus, so the tanvect, normalvect, and Curvature procedures had to be written to give results that are real numbers. A side-effect of this is that results of the commands, especially the normalvect command, do not always appear in the simplest form. Consider the following example.

> normalvect(r(t),t);

The notation appears because Maple had to differentiate the absolute value function to obtain the normal vector. Recall that the deriviative of is 1 if x > 0 and -1 if x < 0. Maple's notation stands for the derivative of , evaluated at . Because Maple assumes that t can be complex, it allows for to be negative. In our calculations, can never be negative so the value of is simply 1.

This may seem like a pain, but it won't affect your ability to compute normal vectors at fixed values of t, as shown in the following examples, or plot normal vectors. Putting the absolute value in several of the CalcP package functions for curve comptations was a necessary evil, because leaving it out produced answers that were just plain wrong. By putting it in, the procedures give the correct answer, but in a form that is more complicated than we would like.

> normalvect(r(t),t=0);

> normalvect(r(t),t=1);

> Curvature(r(t),t);

The absolute value also appears in the output of the Curvature procedure, as shown above. This means that if you differentiate the output of the Curvature function, for example to find extreme values, you may see the Maple abs procedure in the results. You shouldn't be alarmed by this, just remember that the value will always be 1. Fortunately, the Maple solve command usually handles cases involving the abs procedure just fine.

In the following example, plots of a vector-valued function and its curvature are generated. You should compare the two plots and try to understand their relationships.

> plot(Curvature(r(t),t),t=-2..2);

> VPlot(r(t),t=-2..2);

The next few commands deal with a simple example of a curve known as a helix. In one of the exercises, you will be investigating a more general version of a helix, so you are encouraged to pay close attention to the following examples.

> h := t -> vector([cos(t),sin(t),t]);

> VPlot(h(t),t=0..4*Pi);

> ParamPlot3D(h(t),t=0..4*Pi);

> tanvect(h(t),t);

> Speed(h(t),t);

> Curvature(h(t),t);

> normalvect(h(t),t);

Next: Exercises Up: Background Previous: Background

Sean O Anderson
Wed Mar 27 11:12:57 EST 1996