{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 59 "with(Maplets[Elements]):with(Maplet s[Tools]):StartEngine();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "lightorange:=\"#FFB300\":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "randomize():" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 218 "great \+ := [\n\" You're a winner. \",\n\" That's a winner. \",\n\" Whoop! Way \+ to go. \",\n\" That's the way, ah ha ah ha, I like it. \",\n\" Oh yeah ! \",\n\" You're the bomb! \",\n\" That was fantastic! \",\n\" Oh Snap ! \",\n\" That's krunk! \"\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "randgreat := rand(1..nops(great)):" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 102 "nextquest := [\n\"Keep it up.\",\n\"Keep going.\", \n\"On to the next function.\",\n\"Try another function.\",\n\"\"]:" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "randnext := rand(1..nops(n extquest)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 373 "sorry := [ \n\" Sorry, that's not right. \",\n\" Nope, but don't give up. \",\n\" Not quite, it's a little off. \",\n\" Bummer, thought you would get i t this time. \",\n\" Close, but no cigar. \",\n\" Even Einstein didn't get everything right. \",\n\" Oh man, you were so close. \",\n\" Toda y's not your lucky day. \",\n\" Don't quit your day job. \",\n\" You'r e colder than a polar bear's toenail. \"\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "randsorry := rand(1..nops(sorry)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 136 "tryagain := [\n\"Check your algebr a.\",\n\"Fix your answer and check it again.\",\n\"Give it another try .\",\n\"Try again.\",\n\"Please try again.\"\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "randtry := rand(1..nops(tryagain)):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 220 "showit := [\n\" OK That's j ust practice. But try doing it yourself.\",\n\" That's fine for practi ce. Try doing it yourself.\",\n\" Think about it and enter an answer y ourself.\",\n\" So that was practice. Try doing it yourself.\"\n]:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "randshow := rand(1..nops(sh owit)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "randpoint:= rand(-3..4):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 1973 "New_Function:= proc()\nlocal OK;\nglobal funcpos, pta, randsym, As, randpoint, funcpos0, funcvel, funcvel0, funcacc, fu ncacc0;\n\nOK:= false:\nwhile not OK do\n OK:= true;\n funcpos:= ran dpoly(t, coeffs=rand(-10..10), terms=2, degree=5);\n if diff(funcpos, t) = 0 then\n OK:= false;\n end if;\nend do;\npta:= randpoint();\n funcpos0:= eval(funcpos, t=pta):\nfuncvel:= diff(funcpos, t):\nfuncvel 0:= simplify(eval(funcvel,t=pta)):\nfuncacc:= diff(funcvel, t):\nfunca cc0:= simplify(eval(funcacc,t=pta)):\nSet('fMML' = \"x(t) = funcpos\") :\nSet('Lt'(caption) = cat(\"Now find its position, velocity, and acce leration at time t =\", convert(pta,string), \".\")):\nSet('pos0in' = cat(\"x(\", convert(pta,string), \") =\")):\nSet('vel0in' = cat(\"v( \", convert(pta,string), \") =\")):\nSet('acc0in' = cat(\"a(\", conver t(pta,string), \") =\")):\nSet('pos0' = \" \"):\nSet('pos0ck' = \" \", 'pos0ck'(background)=white, 'pos0ck'(foreground) = black):\nSet('vel' = \" \"):\nSet('velck' = \" \", 'velck'(background)=white, 'velck'(fo reground) = black):\nSet('vel0' = \" \"):\nSet('vel0ck' = \" \", 'vel0 ck'(background)=white, 'vel0ck'(foreground) = black):\nSet('acc' = \" \+ \"):\nSet('accck' = \" \", 'accck'(background)=white, 'accck'(foregrou nd) = black):\nSet('acc0' = \" \"):\nSet('acc0ck' = \" \", 'acc0ck'(ba ckground)=white, 'acc0ck'(foreground) = black):\nSet('reply' = \" \", \+ 'reply'(background)=white, 'reply'(foreground) = black);\nSet('Bpos0ck '(enabled)=true, Bpos0ck(background)=turquoise);\nSet('Bpos0sh'(enable d)=true, Bpos0sh(background)=turquoise);\nSet('Bvelck'(enabled)=true, \+ Bvelck(background)=turquoise);\nSet('Bvelsh'(enabled)=true, Bvelsh(bac kground)=turquoise);\nSet('Bvel0ck'(enabled)=true, Bvel0ck(background) =turquoise);\nSet('Bvel0sh'(enabled)=true, Bvel0sh(background)=turquoi se);\nSet('Baccck'(enabled)=true, Baccck(background)=turquoise);\nSet( 'Baccsh'(enabled)=true, Baccsh(background)=turquoise);\nSet('Bacc0ck'( enabled)=true, Bacc0ck(background)=turquoise);\nSet('Bacc0sh'(enabled) =true, Bacc0sh(background)=turquoise);\nend proc:" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 585 "Check_vel:= proc()\nlocal user_vel;\nglobal funcvel, t;\nuser_vel := Get('vel'::algebraic, corrections=true, update=true):\nif simplify( normal(funcvel - user_vel)) <> 0 then\n Set('velck' = \"incorrect\", \+ 'velck'(background) = red, 'velck'(foreground) = white):\n Set('reply ' = \"Check your algebra and try again.\", 'reply'(background)=red, 'r eply'(foreground) = white):\nelse\n Set('velck' = \" correct \", 'vel ck'(background) = green, 'velck'(foreground) = black):\n Set('reply' \+ = \"Now find the acceleration function.\", 'reply'(background)=green, \+ 'reply'(foreground) = black):\nend if;\nend proc:" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 237 "Show_vel:= proc()\nglobal funcvel;\nSet('ve l' = funcvel):\nSet('velck' =\" \", 'velck'(background)=white, 'velck' (foreground) = black):\nSet('reply' = showit[randshow()], 'reply'(back ground)=lightorange, 'reply'(foreground) = black):\nend proc:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 618 "Check_acc:= proc()\nlocal user_acc;\nglobal funcac c;\nuser_acc:= Get('acc'::algebraic, corrections=true, update=true):\n if simplify(normal(funcacc - user_acc)) <> 0 then\n Set('accck' = \"i ncorrect\", 'accck'(background)=red, 'accck'(foreground) = white):\n \+ Set('reply' = \"Check your algebra and try again.\", 'reply'(backgroun d)=red, 'reply'(foreground) = white):\nelse\n Set('accck' = \" correc t \", 'accck'(background)=green, 'accck'(foreground) = black):\n Set( 'reply' = \"Now find the position, velocity and acceleration at the in dicated time.\",\n 'reply'(background)=green, 'reply'(foreground) = black):\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 237 "Show_acc:= proc()\nglobal funcacc;\nSet('acc' = funcacc):\nSet( 'accck' =\" \", 'accck'(background)=white, 'accck'(foreground) = black ):\nSet('reply' = showit[randshow()], 'reply'(background)=lightorange, 'reply'(foreground) = black):\nend proc:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 574 "Chec k_pos0:= proc()\nlocal user_pos0;\nglobal funcpos0;\nuser_pos0:= Get(' pos0'::algebraic, corrections=true, update=true):\nif simplify(normal( funcpos0 - user_pos0)) <> 0 then\n Set('pos0ck' = \"incorrect\", 'pos 0ck'(background) = red, 'pos0ck'(foreground) = white):\n Set('reply' \+ = \"Check your arithmetic and try again.\", 'reply'(background)=red, ' reply'(foreground) = white):\nelse\n Set('pos0ck' = \" correct \", 'p os0ck'(background) = green, 'pos0ck'(foreground) = black):\n Set('rep ly' = \"Keep going.\", 'reply'(background)=green, 'reply'(foreground) \+ = black):\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 248 "Show_pos0:= proc()\nglobal funcpos0;\nSet('pos0' = funcpos0):\n Set('pos0ck' = \" \", 'pos0ck'(background) = white, 'pos0ck'(foregrou nd) = black):\nSet('reply' = showit[randshow()], 'reply'(background)=l ightorange, 'reply'(foreground) = black):\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 572 "Check_vel0:= proc()\nlocal user_vel0;\nglobal funcvel0;\nuser_v el0:= Get('vel0'::algebraic, corrections=true, update=true):\nif simpl ify(normal(funcvel0 - user_vel0)) <> 0 then\n Set('vel0ck' = \"incorr ect\", 'vel0ck'(background) = red, 'vel0ck'(foreground) = white):\n S et('reply' = \"Check your arithmetic and try again.\", 'reply'(backgro und)=red, 'reply'(foreground) = white):\nelse\n Set('vel0ck' = \" cor rect \", 'vel0ck'(background) = green, 'vel0ck'(foreground) = black): \n Set('reply' = \"One more.\", 'reply'(background)=green, 'reply'(fo reground) = black):\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 244 "Show_vel0:= proc()\nglobal funcvel0;\nSet('vel0' = f uncvel0):\nSet('vel0ck' =\" \", 'vel0ck'(background)=white, 'vel0ck'(f oreground) = black):\nSet('reply' = showit[randshow()], 'reply'(backgr ound)=lightorange, 'reply'(foreground) = black):\nend proc:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 577 "Check_acc0:= proc()\nlocal user_acc0;\nglobal func acc0;\nuser_acc0:= Get('acc0'::algebraic, corrections=true, update=tru e):\nif simplify(normal(funcacc0 - user_acc0)) <> 0 then\n Set('acc0c k' = \"incorrect\", 'acc0ck'(background)=red, 'acc0ck'(foreground) = w hite):\n Set('reply' = \"Try again.\", 'reply'(background)=red, 'repl y'(foreground) = white):\nelse\n Set('acc0ck' = \" correct \", 'acc0c k'(background)=green, 'acc0ck'(foreground) = black):\n Set('reply' = \+ cat(great[randgreat()], nextquest[randnext()]), 'reply'(background)=gr een, 'reply'(foreground) = black):\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 244 "Show_acc0:= proc()\nglobal funcacc 0;\nSet('acc0' = funcacc0):\nSet('acc0ck' =\" \", 'acc0ck'(background) =white, 'acc0ck'(foreground) = black):\nSet('reply' = showit[randshow( )], 'reply'(background)=lightorange, 'reply'(foreground) = black):\nen d proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3647 "PosVelAcc := Maplet(onstartup = R unWindow(MAIN), Font[helv10](\"helvetica\",10),\nWindow[MAIN]( 'title' =\"Position, Velocity, and Acceleration of an Object\", 'defaultbutton '='BHint',\n[ halign=none, background=wheat,\n [ background=wheat,\n \+ Button['Bnew'](\"New Function\", Evaluate('function' = \"New_Functi on\")),\n HorizontalGlue(),\n Button['BHint'](\"Hint\", Evaluate ('function' = \"Hint\"), background=turquoise, visible=false),\n Bu tton(\"Quit\", Shutdown())\n ],\n BoxRow(inset=0, spacing=0, border= true, background=wheat,\n caption=\"The position of an object at ti me t is:\",\n HorizontalGlue(),\n MathMLViewer[fMML]('value'=M athML[Export](x(t) = ` `), 'width'=300, 'height'=60),\n HorizontalG lue()\n ),\n BoxColumn( halign=none, inset=0, spacing=0, border=true , background=wheat,\n caption=\"Find its velocity, and acceleration at time t.\",\n [ background=wheat,\n TextField['velin'](\" \+ v(t) =\", 'width'=7, editable=false, background=white),\n TextFie ld['vel']('width'=20, 'background'=turquoise),\n HorizontalGlue() ,\n Button['Bvelck'](\"Check\", Evaluate('function' = \"Check_vel \"), background=wheat, enabled=false),\n TextField['velck']('widt h'=6, editable=false, background=white),\n Button['Bvelsh'](\"Sho w\", Evaluate('function' = \"Show_vel\"), background=wheat, enabled=fa lse)\n ],\n [ background=wheat,\n TextField['accin'](\" a(t ) =\", 'width'=7, editable=false, background=white),\n TextField[ 'acc']('width'=20, 'background'=turquoise),\n HorizontalGlue(),\n Button['Baccck'](\"Check\", Evaluate('function' = \"Check_acc\") , background=wheat, enabled=false),\n TextField['accck']('width'= 6, editable=false, background=white),\n Button['Baccsh'](\"Show\" , Evaluate('function' = \"Show_acc\"), background=wheat, enabled=false )\n ],\n [ background=wheat,\n Label[Lt](\"Now find its pos ition, velocity, and acceleration at time t = 0.\"),\n Horizonta lGlue()\n ],\n [ background=wheat,\n TextField['pos0in'](\" x(0) =\", 'width'=7, editable=false, background=white),\n TextFi eld['pos0']('width'=20, 'background'=turquoise),\n HorizontalGlue (),\n Button['Bpos0ck'](\"Check\", Evaluate('function' = \"Check_ pos0\"), background=wheat, enabled=false),\n TextField['pos0ck']( 'width'=6, editable=false, background=white),\n Button['Bpos0sh'] (\"Show\", Evaluate('function' = \"Show_pos0\"), background=wheat, ena bled=false)\n ],\n [ background=wheat,\n TextField['vel0in' ](\" v(0) =\", 'width'=7, editable=false, background=white),\n Te xtField['vel0']('width'=20, 'background'=turquoise),\n Horizontal Glue(),\n Button['Bvel0ck'](\"Check\", Evaluate('function' = \"Ch eck_vel0\"), background=wheat, enabled=false),\n TextField['vel0c k']('width'=6, editable=false, background=white),\n Button['Bvel0 sh'](\"Show\", Evaluate('function' = \"Show_vel0\"), background=wheat, enabled=false)\n ],\n [ background=wheat,\n TextField['acc 0in'](\" a(0) =\", 'width'=7, editable=false, background=white),\n \+ TextField['acc0']('width'=20, 'background'=turquoise),\n Horizo ntalGlue(),\n Button['Bacc0ck'](\"Check\", Evaluate('function' = \+ \"Check_acc0\"), background=wheat, enabled=false),\n TextField['a cc0ck']('width'=6, editable=false, background=white),\n Button['B acc0sh'](\"Show\", Evaluate('function' = \"Show_acc0\"), background=wh eat, enabled=false)\n ]\n ),\n TextBox['reply']('width'=70, 'heig ht'=2, 'editable'='false', background=white ),\n BoxRow('background'= \"#DDFFFF\", 'inset'=0, 'spacing'=0,\n Label(\"Programmer: J. Campb ell\", 'font'=helv10),\n HorizontalGlue(),\n Label(\"Copyright P . Yasskin Nov 2005\", 'font'=helv10)\n )\n])\n):" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 30 "Maplets[Display]( PosVelAcc );" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 1 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }