Multivariate Calculus with Matrices (Math 2720) Maple Warm-Up Worksheet and Quiz The purpose of this worksheet is to meet Maple for the first time and see some basic examples of graphs of various types. There are several sections, the last section being the quiz. The main purpose here is to learn a few of the most useful graphing commands and their syntax. Thus, you should be able to work the quiz by studying the examples in the preceeding sections. However, you should also feel free to peruse the help pages for more examples if you get stuck. (For that matter, you should peruse the help pages to see other examples of Maple's graphing capabilities.)
<Text-field style="Heading 1" layout="Heading 1">Plots of single-valued functions</Text-field> Here are some standard plots of single-variable functions like you might have seen in Calc I or Calc II. Notice how the function and domain are specified. plot(sin(x),x=-Pi..3*Pi); There are many different options for plotting. In this case, "constrained" means that both the x- and y-axes have the same scaling factor. plot(sin(x),x=-Pi..3*Pi,scaling=constrained); One may plot functions simultaneously. Here, three colors are used to distinguish between the three graphs. plot([sin(x),cos(x),x^2],x=-Pi..Pi,color=[red,blue,green]);
<Text-field style="Heading 1" layout="Heading 1">Parametrized curves in the plane</Text-field> One may plot parametric curves as as well as single-valued function. Notice the difference in syntax between these and the plots of single-valued functions. Two thirds of a circle. plot([cos(t),sin(t),t=0..4*Pi/3],scaling=constrained); A Lissajous curve. plot([sin(4*t),cos(3*t),t=0..2*Pi],axes=none,color=brown); Notice the differences in the two parametrized plots: plot([sin(t)+sin(50*t),cos(t)+cos(51*t),t=0..2*Pi],axes=none,numpoints=10); plot([sin(t)+sin(50*t),cos(t)+cos(51*t),t=0..2*Pi],axes=none,numpoints=100);
<Text-field style="Heading 1" layout="Heading 1">Parametrized curves in 3 dimensions</Text-field> with(plots): (Sometimes this is necessary. Different builds of Maple load different default packages.) Here is an example of a parametrized curve in 3-dimensional space. Notice the syntax of the function and the domain. Notice also that one may obtain different views of the curve using the mouse. Try right-clicking on the graph too. spacecurve([t*cos(t),t*sin(t),t],t=-10*Pi..10*Pi, numpoints=1000,thickness=2,color=black); A 3-dimensional Lissajous figure spacecurve([sin(7*t),sin(5*t),sin(11*t)],t=0..2*Pi, numpoints=1000,color=black,thickness=2); This is called a "moment curve": spacecurve([t,t^2,t^3],t=-3..3, numpoints=500,color=blue,thickness=2);
<Text-field style="Heading 1" layout="Heading 1">Plots of single-valued functions over plane</Text-field> Here are some examples of 3-dimensional graphs of functions of two variables. The two commands featured here are "plot3d" and "contourplot3d". They both generate 3-dimensional models of graphs of functions, but they differ in that plot3d shows vertical cross-sections (parallel to the x- and y-axes) whereas countourplot3d displays horizontal cross sections. Notice that the use of these commands requires the package "plots". with(plots): A circular paraboloid: plot3d(x^2+y^2,x=-5..5,y=-5..5); A hyperbolic paraboloid: contourplot3d(x^2-y^2,x=-5..5,y=-5..5, contours=20,filled=true,coloring=[blue,green]); A circular paraboloid and a horizontal plane z=20 on the same graph: plot3d([x^2+y^2,20],x=-5..5,y=-5..5,color=[red,blue]); A "bump" function: plot3d(1/(x^2+y^2+1),x=-5..5,y=-5..5); Periodic peaks and dimples with vertical cross-sections: plot3d(sin(x)+sin(y),x=-7..7,y=-7..7,numpoints=1000); Periodic peaks and dimples with horizontal cross-sections: contourplot3d(sin(x)+sin(y),x=-7..7,y=-7..7, numpoints=1000,color=blue,thickness=2,contours=15); A nice way to visualize a surface given as z=f(x,y) when the values of z get big quickly is to plot z=cos(f(x,y)). The rate at which the peaks of this function change tells you something about how f behaves. Here is an example with the circular paraboloid: plot3d(cos(x^2+y^2),x=-4..4,y=-4..4,numpoints=1000); Here is an example of a plot in cylindrical coordinates. plot3d(z,theta=0..2*Pi,z=-2..2, coords=cylindrical,axes=normal,style=patch);
<Text-field style="Heading 1" layout="Heading 1">Plots of parametrized surfaces</Text-field> with(plots): A parametrization of part of an ellipsoid. Note the resemblance to spherical coordinates. Try to change the bounds to obtain the entire ellipsoid. plot3d([3*cos(s)*sin(t),2*sin(s)*sin(t),cos(t)],s=0..3*Pi/2,t=Pi/4....Pi/2,scaling=constrained); This parametrizes part of a hyperboloid of one sheet. (Can you prove this?) plot3d([sqrt(1+s^2)*cos(t),sqrt(1+s^2)*sin(t),s],s=-3..3,t=0..3*Pi/2,scaling=constrained);
<Text-field style="Heading 1" layout="Heading 1">The Quiz</Text-field> 1. For each of the following, write a single-line command which will generate the specified shape. Put your answers in a new file, and include the names of all members of your team. Email the file to your instructor at "david.richter@wmich.edu". (a) A parabola. (b) Plots of the graph z=xy^2 displaying vertical cross sections (c) Plots of the graph z=xy^2 displaying horizontal cross sections (c) A hyperboloid of two sheets. (d) A parametrized helix. (See #11 in section 1.9.)