{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 257 1 {CSTYLE "" -1 -1 "Ti mes" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }} {SECT 0 {PARA 256 "" 0 "" {TEXT -1 47 "Constrained Optimization of Biv ariate Functions" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "restart; \nwith(plots):" }}}{SECT 1 {PARA 257 "" 0 "" {TEXT -1 18 "General Para meters" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 125 "Set some options for al l plots. You can change these to your liking (or simply change the set tings for each individual plot)." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "setoptions3d(labels=[`x`,`y`, 'z'], axes=frame):" }}}}{SECT 1 {PARA 257 "" 0 "" {TEXT -1 9 "Example 1" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "Define the function along with its rectangular domains." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 81 "f := (x,y) -> x^2 + y;\nxf := x=-2..2:\ny f := y=-2..2:\ng := (x,y) -> x^2 + y^2 - 1;" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 18 "Plot the graph of " }{XPPEDIT 18 0 "f" "6#%\"fG" } {TEXT -1 170 " along with the constraint circle (black, its projection onto the surface as well as below the surface as a planar level curve ), and the extreme points computed in class:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 602 "fplot := plot3d(f(x,y), xf, yf, style=patchnogrid): \ng1plot := spacecurve([cos(t),sin(t),-2], t=0..2*Pi, thickness=3, col or=black):\ng2plot := spacecurve([cos(t),sin(t),f(cos(t),sin(t))], t=0 ..2*Pi, thickness=3, color=black):\np1plot := pointplot3d([0,-1,f(0,-1 )], symbolsize=20, symbol=diamond, color=blue, thickness=10):\np2plot \+ := pointplot3d([sqrt(3)/2,1/2,f(sqrt(3)/2,1/2)], symbolsize=20, symbol =diamond, color=blue, thickness=10):\np3plot := pointplot3d([-sqrt(3)/ 2,1/2,f(-sqrt(3)/2,1/2)], symbolsize=20, symbol=diamond, color=blue, t hickness=10):\ndisplay(\{fplot,g1plot,g2plot,p1plot,p2plot,p3plot\}); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 257 "" 0 "" {TEXT -1 9 "Example 2" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 90 "T his is an illustration of the solution of the following constrained op timization problem:" }}{PARA 0 "" 0 "" {TEXT -1 9 "Maximize " } {XPPEDIT 18 0 "f(x,y,z) = x + 2*y + 3*z" "6#/-%\"fG6%%\"xG%\"yG%\"zG,( F'\"\"\"*&\"\"#F+F(F+F+*&\"\"$F+F)F+F+" }{TEXT -1 34 " on the intersec tion of the plane " }{XPPEDIT 18 0 "x-y+z=1" "6#/,(%\"xG\"\"\"%\"yG!\" \"%\"zGF&F&" }{TEXT -1 18 " and the cylinder " }{XPPEDIT 18 0 "x^2+y^2 =1" "6#/,&*$%\"xG\"\"#\"\"\"*$%\"yGF'F(F(" }{TEXT -1 1 "." }}{PARA 0 " " 0 "" {TEXT -1 48 "The plane is colored according to the values of " }{XPPEDIT 18 0 "f" "6#%\"fG" }{TEXT -1 174 ", so the two extrema (iden tify with blue markers) occur at the \"hottest\" and \"coldest\" point s in the plane along the black intersection curve of the cylinder with the plane. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 424 "p1 := plot3d(1-x+y , x=-1..1, y=-1..1, style=patchnogrid, color=x+2*y+3*(1-x+y)):\np2 := \+ spacecurve([cos(t),sin(t),1-cos(t)+sin(t)], t=0..2*Pi, thickness=2, co lor=black):\np3 := pointplot3d([-2/sqrt(29),5/sqrt(29),1+7/sqrt(29)], \+ symbolsize=20, symbol=diamond, color=blue, thickness=10):\np4 := point plot3d([2/sqrt(29),-5/sqrt(29),1-7/sqrt(29)], symbolsize=20, symbol=di amond, color=blue, thickness=10):\ndisplay3d(\{p1,p2,p3,p4\});" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "3 0 0" 9 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }