{VERSION 2 3 "SUN SPARC SOLARIS" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "2D Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE " " -1 290 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 327 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 328 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 329 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 330 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 343 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 344 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 4 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 3 " 4 5 1 {CSTYLE "" -1 -1 "" 1 12 0 0 0 0 1 0 0 0 0 0 0 0 0 }0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 }{PSTYLE "Bullet Item" 0 15 1 {CSTYLE "" -1 -1 " " 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 3 3 0 0 0 0 0 0 15 2 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 33 "Geometry of Real-Valued Functions" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "Maple Worksheet for Se ction 2.1 of Marsden and Tromba" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 28 "Prepared by Douglas B. Meade" }}{PARA 0 " " 0 "" {TEXT -1 15 "17 January 1997" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 63 "URL: http://www.math.sc.edu/~meade/math5 50-S97/maple/sec2-1.mws" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 10 "Objectives" }}{EXCHG {PARA 15 "" 0 "" {TEXT -1 74 "reproduce the plots of level curves, surfaces \+ for functions of 2 variables" }}{PARA 15 "" 0 "" {TEXT -1 68 "repoduce book's plots of level surfaces for functions of 3 variables" }}{PARA 15 "" 0 "" {TEXT -1 74 "provide a framework within which other functio ns can be viewed and studied" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "Introduction" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 411 "This first section of the workshe et contains many of the figures from section 2.1. It should not be too difficult to see how these commands can be modified for use with othe r functions and/or level curves/surfaces. Feel free to play with the f unctions and the arguments to the commands. If you discover anything \+ \"interesting\", please let me know. (I'll also be glad to answer any \+ questions that you might have.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 475 "You should pay particular attention to s ome of the different ways in which plots can be displayed. The Style, \+ Axes, and Projection menus are of most interest for 2D plots; the Colo r menu is useful for 3D plots. Another feature of 3D plots is the abil ity to rotate the plot to see the surface from different perspectives. To activate this, click the mouse on top of a 3D plot (below). You ca n either slide the mouse with the left mouse button depressed or manua lly enter the " }{XPPEDIT 18 0 "theta" "I&thetaG6\"" }{TEXT -1 7 " a nd " }{XPPEDIT 18 0 "phi" "I$phiG6\"" }{TEXT -1 203 " angles for sph erical coordinates. In either case, it will be necessary to ask Maple \+ to redraw the plot after you have made all of your changes. This can b e done by tapping the left mouse button on the " }{TEXT 290 1 "R" } {TEXT -1 34 " icon that appear in the task bar." }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "It is \+ a good habit to begin all worksheets with the " }{TEXT 19 8 "restart; " }{TEXT -1 16 " command. The " }{TEXT 19 14 "with( plots );" } {TEXT -1 142 " defines some of the special plots that we will be usin g. The third command simply specifies an option that we will be using \+ in all 3D plots." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "setoptions3d( axes=BOXED );" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 23 "Fi gures 2.1.4 and 2.1.5" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "Both of t hese plots concern the function " }{XPPEDIT 18 0 "f(x,y) = x+y+2" "/- %\"fG6$%\"xG%\"yG,(F&\"\"\"F'F)\"\"#F)" }{TEXT -1 49 ". Here is the M aple definition of this function:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f := x + y + 2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 176 "The first pl ot is a contour plot. Here we provide the function to be plotted, rang es for the independent variables, the specific contours to be plotted, and a meaningful title." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "contourplot( f, x = -5 .. 5, y = -5 .. 5, contours = [ 0, 2, 4 ], tit le=`Figure 2.1.4` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "A 3D view of the plot is created \+ using the plot3d command:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "plot3d( f, x=-5..5, y=-5..5, title=`Figure 2.1.5` );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Rotate this plot to see the plane from di fferent perspectives." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 23 "Figures 2.1.6 and 2.1.7" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 202 "The next pair of plots provide th e same views, but for a different function and different contours. Cha nge the arguments so you can view the function on a larger and smaller domain. What happens if the " }{TEXT 19 8 "contours" }{TEXT -1 21 " a rgument is omitted?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f := x^2 + y^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "contourplot( f, x = -4 .. 4, y = -4 .. 4, contours = [ 1, 4, 9, 16 ], title=`Figur e 2.1.6` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "plot3d( f, x = -3 .. 3, y = -3 .. 3 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Figures 2.1.9 and 2.1.10" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "The next two figures are similar to the previous pai rs of plots." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f := x^2 - \+ y^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "contourplot( f, x = -3 .. 3, y = -3 .. 3, contours = [ -4, -1, 0, 1, 4 ], title=`Figure 2 .1.9` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 133 "plot3d( f, x = -3 .. 3, y = -3 .. \+ 3, contours = 3, view = [ -3 .. 3, -3 .. 3, -4 .. 4 ], style=PATCHCONT OUR, title=`Figure 2.1.10` );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 " Notice the following three differences in this command" }}}{EXCHG {PARA 15 "" 0 "" {TEXT -1 16 "the argument to " }{TEXT 19 8 "contours " }{TEXT -1 52 " is a single number, not a specific list of contours" }}{PARA 15 "" 0 "" {TEXT -1 4 "the " }{TEXT 19 4 "view" }{TEXT -1 90 " argument truncates the view to a specific region (look at the plot wi thout this argument)" }}{PARA 15 "" 0 "" {TEXT -1 4 "the " }{TEXT 19 5 "style" }{TEXT -1 77 " argument plots the surface as a surface (not \+ a wireframe) with contour plots" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 9 "Challenge" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "Rotate the plot until it looks more like \+ the one in the text." }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 4 "Hint" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "theta" "I&theta G6\"" }{TEXT -1 11 " = 60 and " }{XPPEDIT 18 0 "phi" "I$phiG6\"" } {TEXT -1 30 " = 50 seems to be pretty close" }}}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 35 "Figure 2.1.13 (static and animated)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 172 " The a good version of the plot in figure 2.1.13 is quite hard to repro duce. But, there are a number of things we can do with Maple that aren 't possible in the printed text." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "f := x^2 + y^2 - z^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "The level cur ves to be displayed correspond to these values of the constant " } {XPPEDIT 18 0 "c" "I\"cG6\"" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "cSET := [-4,-1,0,1,4];" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 95 "The next co mmand will create the equations of the specific level surfaces that ar e of interest." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "LEV_SURF \+ := \{ seq( f=c, c=cSET) \};" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 15 "E xplanation of " }{TEXT 19 3 "seq" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 19 3 "seq" }{TEXT -1 19 " command is like a " }{TEXT 19 3 "for" }{TEXT -1 4 " or " }{TEXT 19 2 "do" }{TEXT -1 80 " loop in oth er programming languages. Maple has other means of looping, but the " }{TEXT 19 3 "seq" }{TEXT -1 48 " command is more efficient, when it ca n be used." }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "Be patient! These plots can take a couple minutes to create." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "impl icitplot3d( LEV_SURF, x=-3..3, y=-3..3, z=-3..3, title=`Figure 2.1.13 \+ -- quick and dirty` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "It would help if the plots mad e better use of colors. Next, each plot is created in a different colo r." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "COL := [ CYAN, RED, BLUE, GREEN, MAGENTA ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "for i from 1 to nops( cSET ) do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 " c := cSET[i];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 " print( i, c );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 105 " P.i := implicitplot3d( f=c, x=-3..3, y=-3..3, z=-3..3, color=COL[i], title=` Level Surface with c=`.c );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 43 "Now, we put the plots together for viewing." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "PLOTS := [ seq( P.i, i=1..nops(cSET ) ) ]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "display( PLOTS, t itle=`Figure 2.1.13 -- much improved` );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "Try viewing this plot using the " }{TEXT 327 5 "Patch" } {TEXT -1 11 " and the " }{TEXT 328 9 "Wireframe" }{TEXT -1 47 " styl es. (It's faster to select these from the " }{TEXT 329 5 "Style" } {TEXT -1 64 " menu that to insert the appropriate optional argument in to the " }{TEXT 19 7 "display" }{TEXT -1 9 " command." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 287 "Even this picture can be difficult to understand. Another alte rnative, not possible in a textbook, is to animate the level curves. H ere are two possibilities. To activate the animation, click the left m ouse button in the plot. A set of VCR-like controls will appear in the tool bar; the " }{TEXT 330 9 "Animation" }{TEXT -1 68 " menu will als o become active. Use these to cycle through the plots." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "display( PLOTS, insequence=true ); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "This is even fancier -- and more illustrative -- but it does take a little longer to compute." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 81 "PLOTS := [ seq( display( \{ seq( P.j, j=1..i ) \}, \+ title=`` ), i=1..nops(cSET) ) ]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "display( PLOTS, orientation=[60,75], insequence=true \+ );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 13 "Figure 2.1.15" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 295 "The text uses the final figure to illustrate some of the plots th at can be obtained from computer graphing packages. Three of the four \+ views of the function can be obtained from a single command in Maple. \+ See if you can modify the different options to obtain each of the thre e plots in the text." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f : = (x^2+3*y^2)*exp(1-x^2-y^2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "plot3d( f, x=-2..2, y=-2..2, title=`Figure 2.1.15 -- three in on e` );" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 5 "Hints" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "2.1.15 a is essentially the default view;" }} {PARA 0 "" 0 "" {TEXT -1 33 "2.1.15b is obtained by selecting " } {TEXT 343 17 "Patch and contour" }{TEXT -1 10 " from the " }{TEXT 344 5 "Style" }{TEXT -1 6 " menu;" }}{PARA 0 "" 0 "" {TEXT -1 39 "2.1.15c \+ is not easily produced in Maple" }}{PARA 0 "" 0 "" {TEXT -1 47 "2.1.15 d is incorrect! (do you see the problem?)" }}}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} }{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }