Mathematics 241 – Multivariable Calculus

Lab Day 1 – More on parametric curves and visualizing other coordinate systems September 15, 2010

Goals

In this first lab day of the semester, we want to

• Get familiar with the mechanics of the Maple computer algebra system and using the Swords 219 Linux workstation lab, and

• Learn how to use Maple for plotting lines and more general 2D and 3D parametric curves.

Maple commands for 3D parametric curve plotting

The spacecurve command in the plots package can be used to draw parametric curves in 3-dimensional space. To use it, you will need to enter the command

                           with(plots);

to begin (just once in each Maple session). The general format for the command to plot a single curve is

               spacecurve([x(t),y(t),z(t),t=a..b]);

where x = x(t), y = y(t), z = z(t) are the parametric equations of the curve and the range of parameter values to be plotted is a ≤ t ≤ b. For instance, try entering

                spacecurve([5-2*t,t,1+t,t=-2..2]);

to plot a part of a straight line.

The first plot you see here might be rather uninformative. Fortunately, Maple also lets you add axes and look at a 3D plot from different viewpoints. Here’s how:

1) Press the left mouse button over the graph. This should bring up a “bounding box” for the graph with corners you can drag and drop with the mouse to resize the graph.

2) If you place the mouse over the graph, depress the left button, and drag the cursor, you should see the graph rotating following the cursor position. Release the left mouse button when you get to the position you want.

3) If you click the right mouse button, you will bring up a menu containing the options Style, Axes, Color and several others. Select Axes, Normal with the left mouse button.

4) There are also options in this menu for changing the color of the curve plotted, setting the scales on the coordinate axes (“axes constrained” means equal scales on the three axes; the default is for Maple to choose the scales to “fill up” the graphics window as much as possible (for instance, Maple will not choose to produce a long, skinny plot even if −10 ≤ z ≤ 10 for −1 ≤ x, y ≤ 1, etc.)

Practice a few times repositioning the viewpoint (rotating the viewing box) and redrawing the graph, perhaps changing the color, and so forth.

To draw several parametric curves in the same graph, you can include several curve specifications in the form [x(t),y(t),z(t),t=a..b] between curly braces {,}, separated by commas, all inside the parentheses for the spacecurve command.

Lab Exercise 1

Recall that the line segment from (a, b, c) to (d, e, f) can be parametrized as follows

α(t) = (a, b, c) + t(d − a, e − b, f − c) = (a + t(d − a), b + t(e − b), c + t(f − c))

for 0 ≤ t ≤ 1. The points P = (0, 0, 0), Q = (2, 0, 0), R = (0, \sqrt{3}, 1), S = (0, −1, \sqrt{3}) are four corners of a cube in R^{3} with edges P Q, P R, and P S, because the vectors u⃗ = Q − P, v⃗ = R − P, w⃗ = S − P all have magnitude 2, and u⃗ · v⃗ = u⃗ · w⃗ = v⃗ · w⃗ = 0. Your assignment, should you decide to accept it (just kidding!), is to create a picture of this cube by drawing the 12 edges together on the same set of axes in R^{3}. Begin by drawing the line segments from P to Q, P to R, and P to S, using

spacecurve({[2*t,0,0,t=0..1],[0,sqrt(3)*t,t,t=0..1],[0,-t,sqrt(3)*t,t=0..1]});

(Be sure you understand where these come from!) Then add in edges until you have the whole cube. Explain how you found the other 4 corners of the cube. This can be done in a text region. (Suggestion: It is probably simplest to do the necessary calculations to find the other points and the parametrizations of the edges of the cube with pencil and paper by hand. Use Maple to generate the plot and check your work.)

Lab Exercise 2

Begin by plotting the curve called the twisted cubic in R^{3} using the command

                     spacecurve([t,t^2,t^3,t=-2..2]);

Then generate and display in your worksheet three separate plots showing what you see if you view the twisted cubic curve looking

a) Straight along the positive x-axis toward the origin,

b) Straight along the positive y-axis toward the origin,

c) Straight down the positive z-axis toward the origin.

d) Also, explain in a text region how your three plots relate to the three coordinate functions of the curve (t, t^{2}, t^{3}).

Note: You can also plot a parametric curve in the plane using Maple. The format for plotting a curve with parametric equations x = x(t), y = y(t) is

                         plot([x(t),y(t),t=a..b]);

(Note the placement of the square brackets which follows the same pattern as in the spacecurve command.) This generates a 2D plot similar to the plot generated by spacecurve, but without the rotation feature, etc. You may want to illustrate your assertions in part d of this question with several 2D plots.

Writeups

Lab writeups due no later than 8:00am on Monday, September 20. Please email your completed Maple worksheet file to

                           jlittle@holycross.edu

as an attachment. You may work together with your discussion group on this assignment, but everyone should generate his or her own worksheet and submit it individually for this assignment.