** Next:** About this document ...
**Up:** No Title
** Previous:** No Title

Maple has several useful functions for working with vectors. This lab
provides a brief introduction to the most basic
such commands. All of the commands used in this lab come from the
Maple `linalg` and the `CalcP` packages, which must be
loaded before
any of the commands can be used.

Here is a list of the Maple functions we will be using from the
`linalg`
package. Note that these functions form only a small subset of the
package, which is designed primarily for linear algebra. Examples for
some of the commands are given below, more examples can be found in the `
help` screens for each command. Several of these commands appeared in
the previous lab, so you might want to refer back to it.

**vector**- Used to define a vector.
**add**- Adds two vectors or two matrices together.
**scalarmul**- Multiplies a vector by a scalar or a matrix by a scalar.
**innerprod**- Computes the dot product of two vectors.
**crossprod**- Computes the cross product of two vectors.
**evalm**- Evaluates expressions involving vectors.
**norm**- Computes the norm, or magnitude, of a vector. For reasons explained below, the use of this command is not recommended. A better alternative for our purposes is to use the square root of the inner product of a vector with itself. Examples appear below.

This is a list of the commands from the `CalcP` package that
are appropriate for this lab. Several should be familiar from the
previous lab.

**VDiff**- Differentiates vector-valued functions.
**VPlot**- Plots vector-valued functions in two and three dimensions.
**VMag**- Computes the magnitude of a vector.
**ParamPlot**- Animates parametric curves in two dimensions.
**ParamPlot3D**- Animates parametric curves in three dimensions.
**unitvect**- Computes the unit vector associated with a vector ..
**Curvature**- Computes the curvature, , for a vector-valued function .

The first set of examples below demonstrates how to compute linear combinations of vectors, dot and cross products, magnitudes, and vector components for fixed vectors.

> with(linalg):

Warning: new definition for norm Warning: new definition for trace

> a := vector([2,13,-6]);

> b := vector([5,-4,17]);

> add(a,b);

> evalm(5*a-2*b);

> innerprod(a,b);

> crossprod(a,b);

> crossprod(b,a);

> innerprod(a,crossprod(a,b));

The next two commands show two different ways to compute the magnitude
of a vector. The first way uses the `norm`
command. Note the `2` as the second argument of the command. This
`2` *has* to be there, or else Maple uses a different norm
than the one we want. The second way, using the fact that , is probably the
preferred one.

> norm(a,2);

> sqrt(innerprod(a,a));

As we've seen in class, computing the curvature, , and the
unit normal and tangent vectors is a tedious process, even for the
simplest of curves. Fortunately, Maple procedures can be written to do
these calculations and this lab will introduce you to the ones that we
have written here at WPI as part of the `CalcP` package. As usual,
before you can use any of these commands, you must load the package with the
following command. Since some of the commands use the `linalg`
package, it is probably a good idea to load it as well.

> with(linalg):

Warning: new definition for norm Warning: new definition for trace

> with(CalcP):

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. Note the use of the `axes`
option in the `VPlot` command. Including axes in a plot is
often helpful in visualizing a curve in three dimensions. Also, recall
that if you click on a plot, controls appear in the context bar that
allow you to modify the plot, including changing the axes style and
rotating the plot. If you have trouble doing this, ask your TA for help.

Note also
that we've used the `linalg` command `vector` to define
the function instead of the simpler list notation we
used in the previous lab. The commands in the `CalcP` package
can handle either notation, but the commands in the `linalg`
package require you to use the `vector` command to define fixed
vectors or vector-valued functions.

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

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

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

> Curvature(h(t),t);

- 1.
- Use Maple to compute the following, given that , , and .
- (a)
- .
- (b)
- .
- (c)
- (d)
- Explain why the vector you computed in the previous part of this exercise is perpendicular to .

- 2.
- As discussed in the text, the curve associated with a function
of the form
where
*b*is a positive constant and*a*is an arbitrary constant, is called a circular helix.- (a)
- Compute the speed. Is it independent of the parameter
*t*? - (b)
- Compute the curvature. Is it independent of the parameter
*t*? - (c)
- Compute the normal and tangential components of the acceleration.
- (d)
- Find values of
*a*and*b*that give a speed of 5 and a radius of curvature of 6.25. Include a plot of the resulting curve.

- 3.
- In the old days, students at WPI used to do projects in calculus
as well as labs. One such project called for students to design a loop for a
roller coaster. Pete Coppenrath, Matt Dunn, and Rob Roy from the class
of `95 came up with the
following design.
Here is the position in units of meters of the car on the loop
and
*t*is the time in seconds.- (a)
- Plot the position for . The best way to view
the loop is probably looking in along the
*x*axis. How high (approximately) is the top of the loop, in meters? - (b)
- Find the speed of the car and convert it to units of miles per hour or kilometers per hour. Does it seem reasonable for a roller coaster?
- (c)
- Plot the curvature of the loop for .
- (d)
- What is the radius of curvature of the loop at
*t*=0? At*t*=3.2? - (e)
- Plot the normal acceleration of the loop for . To put it in perspective, you might want to plot the normal acceleration divided by 9.8, the acceleration due to gravity in units of meters per second squared.
- (f)
- Based on your results, do you think this would be a fun loop to go on?

- 4.
- In the roller coaster project, the students were asked to design
a loop whose curvature increased linearly with distance measured along
the loop. To get an idea of how the students obtained the formula for
their loop, consider the following curve in two dimensions.
where
*a*and*b*are positive constants and*t*is a parameter with .- (a)
- Show that the speed is constant and equal to 1. Explain why
this means that the parameter
*t*is the same as the arc length. - (b)
- Show that the curvature is given by . Note that the assumptions on
*a*,*b*, and*t*mean that . - (c)
- Use your results from the previous exercise to find a formula for a curve in whose curvature is given by for .

1/24/2000