{VERSION 4 0 "IBM INTEL LINUX22" "4.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 Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 0 2 2 2 0 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 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "10x20" 1 20 0 0 0 0 2 2 2 0 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 24 0 0 0 0 2 2 2 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R 3 Font 3" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 24 0 0 0 0 2 2 2 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 4" -1 259 1 {CSTYLE "" -1 -1 "Times" 1 24 0 0 0 0 2 2 2 0 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 259 "" 0 "" {TEXT -1 62 "\nMaple Examples for Maximum Minimum Problems in Two Variables\n" }}{PARA 0 "" 0 "" {TEXT -1 275 "\nHere are some s ample commands related to finding maximum and minimum\nvalues of a fu nction f(x,y). In particular, Maple can find the partial derivativ es,\nsolve for the critical points, etc. Notice too how useful i t is to plot functions near\nthe critical points. \n" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "f := x^3+y^3+3*x ^2-3*y^2-8;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG,,*$)%\"xG\"\"$\" \"\"F**$)%\"yGF)F*F**&F)F*)F(\"\"#F*F**&F)F*)F-F0F*!\"\"\"\")F3" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "Let's solve for the critical poin ts. Note how the Maple commands\ngroups both the equations to be s olved and the variables to be solved for.\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "solve( \{diff(f,x)=0, diff(f,y)=0\},\{x,y\} );" }} {PARA 11 "" 1 "" {XPPMATH 20 "6&<$/%\"xG\"\"!/%\"yGF&<$F$/F(\"\"#<$F'/ F%!\"#<$F*F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 141 "OK, those are th e critical points. Which correspond to local maximum and minimum\n values? One approach is to look at the graphs ... \n\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "with(plots): contourplot(f,x=-2.5 .. 2.5, y=-2.5 .. 2.5); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "plot3 d(f,x=-2.5 .. 2.5, y=-2.5 .. 2.5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 312 "\nThe graphs are interesting, but they don't show everything. \+ Try zooming in a little\nmore closely to see what's happening at eac h of the four critical points.\nFor example, try the commands below to look more closely at the\ncritical point at (0,2). (The pict ures will show that it's a local minimum.)\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "contourplot(f,x=-0.5 .. 0.5, y=1.5 .. 2.5); " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "plot3d(f,x=-0.5 .. 0.5, y=1. 5 .. 2.5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 202 "Try the same thing around some of the other critical points ... \n\n\nHere's a Maple a pproach to Problem 11, page 218. Note that you can\neasily vary the \+ inputs to solve Problem 12, page 218, too. \n\n" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 28 "v := x*y*(12-x*y)/(2*x+2*y);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 10 "diff(v,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "v1 :=simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "diff(v,y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "v2 := simplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 99 "OK, now let's find our critical points. We could do this by hand, but Maple \nmakes it quite easy.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "solve( \{v1=0,v2=0\},\{x,y\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 209 "In th e present context, only the first critical point is of interest, becau se negative\nvalues for the sides of a box don't make any sense.\n\nSo let's try to figure out the matrix of second partial derivatives:\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "diff(v,x,x);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 19 "v11 := simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "v12 := simplify( diff(v,x,y));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "v21 := simplify(diff(v,y,x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "v22 := simplify( diff(v,y,y) );" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "subs(x=2,y=2,v11), subs(x=2 ,y=2,v12), subs(x=2,y=2,v22);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( linalg ): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 99 " This command loads some commands, including one to calculate the Hessian m atrix of a function. \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "hessian( v,[x,y]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "subs(x=2,y=2,% );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot3d( v,x=1..3, y=1 ..3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 192 "The plot shows, as it s hould, that the point (2,2) is a local (and actually global) maximum \nfor the function v.\n\nTry varying any of the data in this example \+ to solve other, similar problems." }}}}{MARK "5 1 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }