{VERSION 3 0 "APPLE_PPC_MAC" "3.0" } {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 "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 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 "Title " 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "" 18 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT -1 25 "Surface and Contour Plots" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 236 "We can visualize a function of two vari ables in two ways--by examining the surface \{(x,y,f(x,y))\} in three \+ dimensional space, or by examining the level sets \{(x,y) : f(x,y) = k \} in the x-y plane. Here is an example of these approaches." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f := (x,y) -> x*y*exp(-x^2-y^2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "plot3d(f(x,y),x=-3..3,y=-3..3);\n " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 "Yo u can change your viewing angle by simply selecting the picture--" } {TEXT 256 3 "i.e" }{TEXT -1 242 "., click on it--and then with the arr ow anywhere in the box that appears, hold down the mouse button and mo ve the mouse around. Try it! You can also remove or add axes to your p icture--while the picture is selected, simply pull down the menu " } {TEXT 258 4 "Axes" }{TEXT -1 75 " from the top of the screen and take \+ your choice of axis schemes. Try this." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 128 " A plot of the level sets for this function is obtained using th e command \"contourplot,\" which is found in the \"plots\" package." } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "conto urplot(f(x,y),x=-3..3,y=-3..3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 234 "Keeping in mind that the level set \+ \{(x,y) : f(x,y) = k\} is just the intersection of the surface z = f(x ,y) with the horizontal plane z = k, compare the surface and contour p lots you have here and see the relationship between the two. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 52 "Here's a \+ contourplot with a few more contours shown." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 91 "contourplot(f(x,y ),x=-3..3,y=-3..3,\n contours = 12,\n grid = [50 ,50]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 219 "And here's yet one more variation. The colors vary from yellow to red, with yellow representing high portions of the surface \+ and red representing low portions. Try typing ?contourplot; to see ho w to change the colors." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 118 "contourplot(f(x,y),x=-3..3,y=-3..3 ,\n contours = 12,\n grid = [25,25],\n \+ filled = true);" }}}{PARA 0 "" 0 "" {TEXT -1 15 " Oooh, aah..." }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 257 10 "Exercises." }{TEXT -1 1 "\n" } }{PARA 0 "" 0 "" {TEXT -1 39 "1. Make surface and contour plots for \+ " }{XPPEDIT 18 0 "f(x,y) = y - y^3 - x^2" "6#/-%\"fG6$%\"xG%\"yG,(F(\" \"\"*$F(\"\"$!\"\"*$F'\"\"#F-" }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 39 "2. Make surface and cont our plots for " }{XPPEDIT 18 0 "f(x,y) = sin(x)*sin(y)*exp(-x^2 + x*y \+ - 3*y^2)" "6#/-%\"fG6$%\"xG%\"yG*(-%$sinG6#F'\"\"\"-F+6#F(F--%$expG6#, (*$F'\"\"#!\"\"*&F'F-F(F-F-*&\"\"$F-*$F(\"\"#F-F6F-" }{TEXT -1 1 "." } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 101 "3. Mak e surface and contour plots for an interesting function of two variabl es of your own choosing." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "0 \+ 0" 25 }{VIEWOPTS 1 1 0 1 1 1803 }