{VERSION 3 0 "SUN SPARC SOLARIS" "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 Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 0 1 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 0 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2 " -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 0 2 2 2 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 115 " Plotting with 2 and 3-dimensional functions\n \+ \n\n\nWe need to use with(plots) \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 150 "The first function we look at is sin(x)cos(y).\nWe plot the c urve and look at its contours.\nWe then repeat this process with sever al other functions.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f:=sin(x)* cos(y);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG*&-%$sinG6#%\"xG\"\" \"-%$cosG6#%\"yGF*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "plot3 d(f,x=0..2*Pi,y=0..2*Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "contourplot(f,x=0..2*Pi,y=0..2*Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 17 "Second functi on:\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "g:=(x^2+3*y^2)*exp(-x^2-y^ 2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"gG*&,&*$)%\"xG\"\"#\"\"\"\" \"\"*$)%\"yGF*F+\"\"$F,-%$expG6#,&F'!\"\"F-F5F," }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 26 "plot3d(g,x=-3..3,y=-3..3);" }}{PARA 13 "" 1 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "contourpl ot(g,x=-3..3,y=-3..3);" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 16 "Third function:\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "h:=x*y; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hG*&%\"xG\"\"\"%\"yGF'" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot3d(h,x=-2..2,y=-2..2);" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "contourplot(h,x=-2..2,y=-2..2);" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 17 "Fourth function:\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "l:=x/(x^2+y^2+1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"lG*&% \"xG\"\"\",(*$)F&\"\"#F'\"\"\"*$)%\"yGF+F'F,F,F,!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot3d(l,x=-4..4,y=-4..4);" }} {PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "contourplot(l,x=-4..4,y=-4..4);" }}{PARA 13 "" 1 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 108 "We now look at a function of three variables,\nand \+ we plot two of its contours.\nThe contours are ellipsoids.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "q:=x^2+4*y^2+z^2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"qG,(*$)%\"xG\"\"#\"\"\"\"\"\"*$)%\"yGF)F*\"\"%*$)% \"zGF)F*F+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "The function implicitplot3d will plot th e points that\ngive the function q a specified value;\nie, implicitplo t can be used to plot a contour of q.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "implicitplot3d(q=1,x=-1..1,y=-1..1,z=-1..1,color=red);" }} {PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "implicitplot3d(q=4,x=-2..2,y=-2..2,z=-2..2,color=yellow);" }} {PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 152 "We are going to plot th e two contours on the same graph.\nThe second contour totally surround s the first one,\nso we plot just half of the second contour." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "one :=implicitplot3d(q=1,x=-1..1,y=-1..1,z=-1..1,color=red):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "two:=implicitplot3d(q=4,x=-2..2,y=0 ..2,z=-2..2,color=yellow):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "display3d(\{one,two\});" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "8 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 }