{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 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 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "with(Maplets): with(Maplets[Tools]) : with(Maplets[Elements]): with(plots):\nStartEngine();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1728 "PlotDerivs:=Maplet(onstartup = Ru nWindow(MAIN),\nWindow[MAIN]('title'=\"1st and 2nd Derivative\",\n [ \+ [\"Type in a function of x. (ex: x^3)\"\n ],\n [\"Function:\", T extField['func']('width'=25)\n ],\n [\"Type in the x-interval fo r the plot as a..b (ex:4..5)\"\n ], \n [\"Interval:\", TextFiel d['interv']('width'=25)\n ],\n [ Button(\"Plot It NOW!\", onclic k=A1),\n Button(\"Get me OUTTA HERE!\", Shutdown())\n ],\n \+ [\"Programmers: Bass & Elliston Copyright P. Yasskin 2005\"\n ]\n \+ ]\n),\nAction[A1](RunWindow(PlotIt), Evaluate('function' = \"plotfunc 1\")),\nWindow[PlotIt]('title'=\"El Plot\",\n [ [Plotter['myplot']('w idth'=200, 'height'=200)\n ],\n [ \"Would you like to see the de rivative of this function? \",\n Button(\"Yes\",CloseWindow(PlotI t),onclick=B1)\n ],\n [ Button(\"No thanks\", CloseWindow(PlotIt ))\n ]\n ]\n),\nAction[B1](RunWindow(PlotIt2), Evaluate('function' =\"plotfunc2\")),\nWindow[PlotIt2]('title'=\"Original function and its derivative\",\n [ [Plotter['myplot2']('width'=200, 'height'=200)\n \+ ],\n [ \"Here is the graph of both the original function(Green) a nd its derivative(Blue). \"\n ],\n [ \"Would you like to see the second derivative of this function? \"\n ],\n [ Button(\"Sure\" ,CloseWindow(PlotIt2),onclick=C1),\n Button(\"No thanks\", CloseW indow(PlotIt2))\n ]\n ]\n),\nAction[C1](RunWindow(PlotIt3),Evaluat e('function'=\"plotfunc3\")),\nWindow[PlotIt3]('title'=\"Original func tion and its derivative(Blue) and its second derivative(Red)\",\n [ [ Plotter['myplot3']('width'=200, 'height'=200)\n ],\n [ \"Here is the graph of both the original function(Green) and its derivative(Blu e) plus the second derivative(Red). \"\n ],\n [ Button(\"Adios\" , CloseWindow(PlotIt3))\n ]\n ]\n)\n):" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 230 "plot func1:=proc()\nglobal userfunc, userinterv, p1;\nuserfunc:=Get(thismap let,'func'::'anything'):\nuserinterv:=Get(thismaplet,'interv'::'range' ):\np1:=plot(userfunc, x=userinterv, thickness=2, color=green);\nSet(' myplot'=p1)\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 249 "plotfunc2:=proc()\ngloba l userfunc, userinterv, p2;\nlocal dy,p3,p4;\ndy:=diff(userfunc,x);\np 3:=plot(userfunc, x=userinterv, thickness=2, color=green);\np2:=plot(d y, x=userinterv, thickness=2, color=blue);\np4:=display(p2,p3);\nSet(' myplot2'=p4)\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 328 "plotfunc3:=proc()\nglo bal userfunc, userinterv,p7;\nlocal dy,dy2,p5,p6,p8;\ndy:=diff(userfun c,x);\ndy2:=diff(dy,x);\np5:=plot(userfunc, x=userinterv, thickness=2, color=green);\np6:=plot(dy, x=userinterv, thickness=2, color=blue);\n p7:=plot(dy2, x=userinterv, thickness=2, color=red);\np8:=display(p5,p 6,p7);\nSet('myplot3'=p8)\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "Display (PlotDerivs);" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }