{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "with(Maplets[Tools]): with(Maplets[ Elements]): with(plots):\nStartEngine();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "randomize():" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "fs:=[u^2, 4*u^3, ln(u), exp(u), sin(u), cos(u), u^4/4];" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "randfs:=rand(1..nops(fs)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "gs:=[x+1, x^2-3, x^3+2*x^ 2, 7*x, sin(x), cos(x)];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "randgs:=rand(1..nops(gs)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 350 "new_function:=proc()\nglobal fs, gs, randfs, randgs, f, g, Df, Dg , Dfg, Dfog;\nf:=fs[randfs()];\ng:=gs[randgs()];\nDf:=diff(f,u);\nDg:= diff(g,x);\nDfg:=subs(u=g,Df);\nDfog:=Dfg*Dg;\nSet('f_g_xMML'=MathML[E xport](eval(f,u=g)));\nSet(f_u=\"\");\nSet(g_x=\"\");\nSet(dfu=\"\"); \nSet(dgx=\"\");\nSet(dfgx=\"\");\nSet(df_o_g=\"\");\nSet(reply=\"\", \+ reply(background)=white);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 314 "check_ fu:=proc()\nglobal f;\nlocal user_f;\nuser_f:=Get('f_u'::anything);\ni f f-user_f=0 then\n Set(reply=\"That's the correct f(u). You're aweso me! Try another one.\", reply(background)=green);\nelse\n Set(reply= \"f(u) is incorrect. f(u) is the outer function. Please try again.\", \+ reply(background)=red);\nend if\nend proc:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 89 "show_fu:=proc()\nglobal f;\nSet('f_u'=f);\nSet(repl y=\"\", reply(background)=white);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 315 "c heck_ugx:=proc()\nglobal g;\nlocal user_g;\nuser_g:=Get('g_x'::anythin g);\nif g-user_g=0 then\n Set(reply=\"That's the correct g(x). You're awesome! Try another one.\", reply(background)=green);\nelse\n Set(r eply=\"g(x) is incorrect. g(x) is the inner function. Please try again .\", reply(background)=red);\nend if\nend proc:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 90 "show_ugx:=proc()\nglobal g;\nSet('g_x'=g);\nSe t(reply=\"\", reply(background)=white);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 313 "check_dfu:=proc()\nglobal Df;\nlocal user_Df;\nuser_Df:=Get('dfu' ::anything);\nif Df-user_Df=0 then\n Set(reply=\"Correct derivative o f f(u). You're awesome! Try another one.\", reply(background)=green); \nelse\n Set(reply=\"The derivative of f(u) is incorrect. Please try \+ again.\", reply(background)=red);\nend if\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "show_dfu:=proc()\nglobal Df;\nSet('dfu'=D f);\nSet(reply=\"\", reply(background)=white);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 313 "check_dgx:=proc()\nglobal Dg;\nlocal user_Dg;\nuser_ Dg:=Get('dgx'::anything);\nif Dg-user_Dg=0 then\n Set(reply=\"Correct derivative of g(x). You're awesome! Try another one.\", reply(backgro und)=green);\nelse\n Set(reply=\"The derivative of g(x) is incorrect. Please try again.\", reply(background)=red);\nend if\nend proc:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "show_dgx:=proc()\nglobal Dg; \nSet('dgx'=Dg);\nSet(reply=\"\", reply(background)=white);\nend proc: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 335 "check_dfgx:=proc()\nglobal Dfg;\nlocal user_D fg;\nuser_Dfg:=Get('dfgx'::anything);\nif Dfg-user_Dfg=0 then\n Set(r eply=\"f '(g(x)) is correct. You're awesome! Try another one.\", reply (background)=green);\nelse\n Set(reply=\"f '(g(x)) is incorrect. Just replace u by g(x) in f '(u). Please try again.\", reply(background)=r ed);\nend if\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 " show_dfgx:=proc()\nglobal Dfg;\nSet('dfgx'=Dfg);\nSet(reply=\"\", repl y(background)=white);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 370 "check_ Dfog:=proc()\nglobal Dfog;\nlocal user_Dfog;\nuser_Dfog:=Get('df_o_g': :anything);\nif Dfog-user_Dfog=0 then\n Set(reply=\"The final answer \+ is correct. You really got it together! Try another function.\", reply (background)=green);\nelse\n Set(reply=\"The answer is incorrect. Sim ply multiply f '(g(x)) by g '(x). Please try again.\", reply(backgroun d)=red);\nend if\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 100 "show_Dfog:=proc()\nglobal Dfog;\nSet('df_o_g'=Dfog);\nSet(reply= \"\", reply(background)=white);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 546 "Prev iew:=proc(TFname)\n local expr;\n global CurrentTFname;\n options ` Copyright 2005, Philip B. Yasskin, Texas A&M Univ., and Douglas B. Mea de, Univ of South Carolina`;\n CurrentTFname := TFname;\n if Get(TFn ame)=\"\" then\n Set('reply'=\"You must enter an expression to be p reviewed.\",\n 'reply'(background)=orange, reply(foreground)=blac k);\n else\n expr:=Get(TFname::anything, corrections=true, update= true);\n Set('TFPreview' = expr);\n Set('MMLPreview' = MathML[Ex port](expr));\n Set('ARunPreview'(run)=true);\n end if;\nend proc: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 313 "Update_Preview:=proc() \n local expr;\n global CurrentTFname;\n options `Copyright 2005, P hilip B. Yasskin, Texas A&M Univ., and Douglas B. Meade, Univ of \+ South Carolina`;\n expr:=Get(TFPreview::anything, corrections=true );\n Set('MMLPreview' = MathML[Export](expr));\n Set(CurrentTFname = expr);\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2210 "Chain_Rule:= Maplet(onstar tup = RunWindow(MAIN), Font[helv10](\"helvetica\",10),\n Window[MAIN] ('title'=\"Chain Rule\",\n[ halign=none, background=black, \n [ Butto n(\"New Function\", Evaluate('function' = \"new_function\"),background =turquoise),\n \"f(g(x))=\",\nMathMLViewer[f_g_xMML]('value' = Math ML[Export](\"\"), width=150, height=75),\n Button(\"Quit\", Shutdow n(),background=white)\n ],\n [ \"f(u) = \",\n TextField['f_u' ]('width'=10),background=turquoise,\n HorizontalGlue(),\n Button [Bf_u_pr](\"Preview\", onclick=APreview_f_u),\n Button(\"Check\", E valuate('function' = \"check_fu\")),\n Button(\"Show\", Evaluate('f unction' = \"show_fu\"))\n ],\n [ \"u=g(x) =\",\n TextField['g_x' ]('width'=10),\n HorizontalGlue(),\n Button[Bfugpr](\"Preview\", onclick=APreview_g_x, background=turquoise),\n Button(\"Check\", E valuate('function' = \"check_ugx\"),background=turquoise),\n Button (\"Show\", Evaluate('function' = \"show_ugx\"),background=turquoise)\n ],\n [ \"f '(u) = \",\n TextField['dfu']('width'=10),backgroun d=turquoise,\n HorizontalGlue(),\n Button[Bdfupr](\"Preview\", o nclick=APreview_dfu),\n Button(\"Check\", Evaluate('function' = \"c heck_dfu\")),\n Button(\"Show\", Evaluate('function' = \"show_dfu\" ))\n ],\n [ \"g '(x) = \",\n TextField['dgx']('width'=10),\n \+ HorizontalGlue(),\n Button[Bdgxpr](\"Preview\", onclick=APreview_d gx, background=turquoise),\n Button(\"Check\", Evaluate('function' \+ = \"check_dgx\"),background=turquoise),\n Button(\"Show\", Evaluate ('function' = \"show_dgx\"),background=turquoise)\n ],\n [ \"f '(g(x )) =\",\n TextField['dfgx']('width'=10),background=turquoise,\n \+ HorizontalGlue(),\n Button[Bdfgxpr](\"Preview\", onclick=APreview_d fgx),\n Button(\"Check\", Evaluate('function' = \"check_dfgx\")),\n Button(\"Show\", Evaluate('function' = \"show_dfgx\"))\n ],\n [ \+ \"(fog)'(x) = f '(g(x)) g '(x) =\",\n TextField['df_o_g']('width'=1 0),\n HorizontalGlue(),\n Button[BDfogpr](\"Preview\", onclick=A Preview_Dfog, background=turquoise),\n Button(\"Check\", Evaluate(' function' = \"check_Dfog\"),background=turquoise),\n Button(\"Show \", Evaluate('function' = \"show_Dfog\"),background=turquoise)\n ],\n [ background=turquoise, TextField[reply](\"\", background=white, 'wi dth'=50)\n ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 56 " BoxRow('backgro und'=\"#DDFFFF\", 'inset'=0, 'spacing'=0," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 68 " Label(\"Programmers: Neil Matula / Kim Dulock \" , 'font'=helv10)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " Horizontal Glue()," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 74 " Label(\"Copyright 20 06, D.B. Meade and P.B. Yasskin \", 'font'=helv10)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " HorizontalGlue()," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 " Label(\"v. 1.2a May 2006\", 'font'=helv10)" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 950 " )\n]\n),\n Window[PREVIEW]( 'ti tle'=\"Preview\", 'defaultbutton'='UpdatePreview', \n [ halign=none, \+ background=wheat,\n [ background=wheat,\n TextField['TFPreview ']('width'=50, background=turquoise),\n Button['UpdatePreview']( \"Update\", Evaluate('function' = \"Update_Preview()\"), background=tu rquoise),\n Button['ClosePreview'](\"Close\", CloseWindow(PREVIEW ), background=white)\n ],\n [ background=wheat,\n MathMLVie wer[MMLPreview]('value'=MathML[Export](Int(f(x),x)), 'width'=500, 'hei ght'=100)\n ]\n ]),\nAction[ARunPreview](RunWindow(PREVIEW)),\nAct ion[APreview_f_u](Evaluate('function' = \"Preview(f_u)\")),\nAction[AP review_g_x](Evaluate('function' = \"Preview(g_x)\")),\nAction[APreview _dfu](Evaluate('function' = \"Preview(dfu)\")),\nAction[APreview_dgx]( Evaluate('function' = \"Preview(dgx)\")),\nAction[APreview_dfgx](Evalu ate('function' = \"Preview(dfgx)\")),\nAction[APreview_Dfog](simplify( Evaluate('function' = \"Preview(df_o_g)\")))\n):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Maplets[Display](Chain_Rule);" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }