MCS 222 Surface Plotting Lab

MCS222: Multivariable Calculus
The purpose of this lab is to introduce you to Maple, a mathematics program which allows you to do computation and graphing. You will not need to hand anything in, and you are welcome to consult with your neighbor as you are working.

For this lab, please carry out the following:
  1. Open Maple by going to the start menu (the little multi-colored star icon at the bottom left (or upper right) of your screen) and select Maple from the MCS menu.
  2. After opening Maple, you will have an "Untitled" window where you can do computations. Start by typing in the following text and then press the "Enter" key.
with(plots):

  1. The colon at the end of the input will suppress any return information from Maple, so don't worry if you don't see anything happen.  Next type in the following to create the 3d plot of a surface as shown: (Note: when you type a power like x2, type in "x^2" and Maple will automatically convert that into x2.  But be careful when typing an expression involving powers -- always use the right arrow key to get out of a power)

plot3d(`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2))), x = -5 .. 5, y = -5 .. 5); 1 

Plot

  1. The surface is actually "Live."  Place the mouse over the surface and click and drag to move the surface for better viewing.  Now, we will plot a surface with its contour lines (level sets) visible. To do this, we use plot3d again, but use a "style" option.  We will plot the saddle and its level sets. Type in the following and hit "enter":

plot3d(`+`(`*`(`^`(x, 2)), `-`(`*`(`^`(y, 2)))), x = -5 .. 5, y = -5 .. 5, style = patchcontour); 1 

Plot

  1. Move the surface so you are looking down on it from abaove. Compare the level sets drawn to what we did in class.  The patchcontour style option draws in curves of constant z-values (level sets) on top of the surface.  To see just the level sets (without the surface) type in:

plot3d(`+`(`*`(`^`(x, 2)), `-`(`*`(`^`(y, 2)))), x = -5 .. 5, y = -5 .. 5, style = contour); 1 

Plot
 

  1. We may want a denser collection of level sets -- that is more level sets drawn so we can get a better idea of how they change from z value to z value. We use the contours option to increase the number of contours drawn.

plot3d(`+`(`*`(`^`(x, 2)), `-`(`*`(`^`(y, 2)))), x = -5 .. 5, y = -5 .. 5, style = patchcontour, contours = 20); 1 

Plot
 

  1. It is often useful to just look at the contours as they would appear when drawn in the x-y plane (when projected down into the plane from above).  To see these cirves we use the contourplot command:

contourplot(`+`(`*`(`^`(x, 2)), `-`(`*`(`^`(y, 2)))), x = -5 .. 5, y = -5 .. 5); 1 

Plot_2d
 

  1. Try graphing some of the functions we looked at in class or that were discussed in the book. You can try some of your homework problems, or for more practice, try graphing the following functions (and their level sets):