{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 "" -1 256 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } {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 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times " 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 } {PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 0 "" }{TEXT 256 13 "Project \+ Three" }}{PARA 256 "" 0 "" {TEXT -1 27 "Maxima, Minima, and Saddles" } }{PARA 256 "" 0 "" {TEXT -1 56 "Authors: Sammuel Robles Jr. , Brandon \+ Johns , Bar Nguyen" }}{PARA 256 "" 0 "" {TEXT -1 27 "Math 253 Section \+ 201 Honors" }}{PARA 0 "" 0 "" {TEXT -1 379 " This maplet is design ed to test ones knowledge in computing maximum, minimum, and saddle po int values with their corresponding coordinates. Our maplet will rand omly generate a three dimensional function for which the user is expec ted to calculate the various points and check them with Maple. To see our maplet, click on the triple exclamation mark icon on the menu abo ve." }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 9 "Project 3" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 8 "Start up" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "with(Maplets): with(Maplets[Tools]): with(Maplets[Elements]): wit h(plots): with(student): with(linalg):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "StartEngine();" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 6 "Maplet" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2567 "MaxMin:= Mapl et(onstartup=RunWindow(MAIN),\nWindow[MAIN](title=\"Maxima and Minima \+ and Saddles\",\n [ [ \"Find the critical points for the following fun ction and classify each as a maximum, minimum or saddle point.\"],\n \+ [ Button(\"Show Function\", Evaluate(function=\"show\")),\n Mat hMLViewer[showf]('width'=300, 'height'=50)\n ],\n [ Button(\"Sho w Me the Graph\", 'onclick'='Plot_It'),\n \" \",\n Button (\"Help\", RunWindow(Help)),\n \" \"\n ],\n [ \"Enter an swers in exact form, e.g. [1+sqrt(3), 5], or as decimals, e.g. [2.732, 5.], with at least four significant figures.\"\n ],\n [ \"Local minimum \", TextField[min](\"[ , ]\"),\n [Button(\"Check \", Evaluate(function=\"check_min\"))],\n [Button(\"Show Answer\" , Evaluate(function=\"ans1\"))]\n ],\n [ \"Local maximum\", Text Field[max](\"[ , ]\"),\n [Button(\"Check\", Evaluate(functi on=\"check_max\"))],\n [Button(\"Show Answer\", Evaluate(function =\"ans2\"))]\n ],\n [ \"Saddle Point \", TextField[saddle]( \"[ , ]\"),\n [Button(\"Check\", Evaluate(function=\"check_ saddle\"))],\n [Button(\"Show Answer\", Evaluate(function=\"ans3 \"))]\n ],\n [ TextField[reply1](width=50,editable=false),\n \+ Button(\"Done\", Shutdown())\n ]\n ] \n),\nWindow[PlotIt](title =\"The Plot\",\n [ [ MathMLViewer[showfplot]('width'=300, 'height'=50 )\n ],\n [ [ [ \"Enter your intervals (in the form a..b):\"],\n \+ [ \"x-Interval:\",\n TextField['interv1']('width'=15)] ,\n [ \"y-Interval:\",\n TextField['interv2']('width'= 15)],\n [ \"z-Interval:\",\n TextField['interv3']('wid th'=15)],\n [ Button(\"Plot It\", Evaluate(function=\"plot_grap h\")),\n \" \",\n Button(\"Close\", CloseWindow(Pl otIt))]\n ],\n [ Plotter[myplot](width=300,height=300)\n \+ ]\n ]\n ]\n),\nWindow[Help](title=\"HELP\",\n [ [\"How to Deter mine Maxima, Minima, and Saddle Points:\"],\n \"\",\n TextBox(\" Step1: Compute the first partial derivatives, fx and fy, equate both \+ of these to zero and solve for the critical points.\", width=47, heigh t=3),\n TextBox(\"Step 2: Compute the second partial derivatives, f xx, fyy and fxy, and compute D=fxx*fyy-fxy^2.\", width=47, height=2), \n TextBox(\"Step 3: For each critical point evaluate fxx and D. If D>0 and fxx>0, then the critical point is a local minimum. If D>0 and fxx<0 then the critical point is a local maximum. If D<0 then the cr itical point is a saddle point. Otherwise the Second Derivative Test f ails.\", width=47, height=6)\n ]\n),\nAction[Plot_It](RunWindow(PlotI t), Evaluate(function=\"show_f_plot\")\n)\n):" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 10 "Procedures" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 952 "show:=proc()\nlocal rand4,rand6, r,s,x0, a,c,d, h, eqs, sol, fxx, fyy,fxy,Df, i, sadcount;\nglobal f, maximum, minimum, saddle1, saddle2 ;\nrand4:=rand(1..4);\nrand6:=rand(1..6);\nr:=rand4();\ns:=rand4();\nx 0:=rand6();\nwhile x00 and evalf(subs( sol[i],fxx))>0\n then minimum:=subs(sol[i],[x,y]);\n elif evalf(su bs(sol[i],Df))>0 and evalf(subs(sol[i],fxx))<0\n then maximum:=subs (sol[i],[x,y]);\n elif evalf(subs(sol[i],Df))<0\n then if sadcount =1 \n then saddle1:=subs(sol[i],[x,y]); sadcount:=2\n \+ else saddle2:=subs(sol[i],[x,y]);\n end if;\n end if;\nen d do\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "show_f_p lot:=proc()\nglobal f;\nSet('showfplot' = MathML[Export]('f'=f))\nend \+ proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 301 "plot_graph:=proc( )\nlocal p1,userinterv1,userinterv2,userinterv3;\nglobal f;\nuserinter v1:=Get(thismaplet,interv1::range):\nuserinterv2:=Get(thismaplet,inter v2::range):\nuserinterv3:=Get(thismaplet,interv3::range):\nSet('myplot '=plot3d(f, x=userinterv1, y=userinterv2, view=userinterv3, axes=box)) \nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 286 "check_min:= proc()\nlocal usermin;\nglobal minimum;\nusermin:= Get(thismaplet, min ::[realcons,realcons]):\nif evalf[4](usermin[1]-minimum[1])=0. and eva lf[4](usermin[2]-minimum[2])=0.\n then Set(reply1=\"He Shoots, HE SCO RES!!.\")\n else Set(reply1=(\"Not quite, try again.\"))\nend if;\nen d proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 289 "check_max:=proc ()\nlocal usermax;\nglobal maximum;\nusermax:= Get(thismaplet, max::[r ealcons,realcons]):\nif evalf[4](usermax[1]-maximum[1])=0. and evalf[4 ](usermax[2]-maximum[2])=0.\n then Set(reply1=\"Thats one point for y ou!\")\n else Set(reply1=\"Think about it some more.\")\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 440 "check_saddle:=pr oc()\nlocal usersaddle;\nglobal saddle1, saddle2;\nusersaddle:= Get(th ismaplet,saddle::[realcons,realcons]):\nif (evalf[4](usersaddle[1]-sad dle1[1])=0. and\n evalf[4](usersaddle[2]-saddle1[2])=0.)\nor (evalf [4](usersaddle[1]-saddle2[1])=0. and\n evalf[4](usersaddle[2]-saddl e2[2])=0.)\n then Set(reply1=\"Great Job, go ahead and try another fu nction!\")\n else Set(reply1=\"Don't give up just yet, try again!\") \nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 107 "an s1:=proc()\nglobal minimum;\nSet(reply1=cat(\"The correct minimum is \+ \", convert(minimum,string)));\nend proc:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 107 "ans2:=proc()\nglobal maximum;\nSet(reply1=cat(\"Th e correct maximum is \", convert(maximum,string)));\nend proc:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 151 "ans3:=proc()\nglobal saddle 1, saddle2;\nSet(reply1=cat(\"The correct saddles are \", convert(sadd le1,string), \" and \", convert(saddle2,string)));\nend proc:" }}}}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "Display(MaxMin);" }}}{EXCHG }}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 1 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }