{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 60 "with(Maplets[Elements]):with(Maplet s[Tools]):\nStartEngine();" }}}{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 377 "grea t := [\n\" Bullseye. \",\n\" Great. \",\n\" That's absolutely right. \+ \",\n\" Awesome. You're unstoppable. \",\n\" Correct. \",\n\" You got \+ it! \",\n\" Way to go. \",\n\" Don't stop now. \",\n\" I knew you coul d do it! \",\n\" Perfect. You're unstoppable. \",\n\" Awesome! \",\n\" Good job! You really know what you are doing. \",\n\" You're a geniou s. \",\n\" Excellent! \",\n\" Oh yeah! \",\n\" That was fantastic! \" \n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "randgreat := rand(1 ..nops(great)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 136 "nextque st := [\n\"Keep it up.\",\n\"Keep going.\",\n\"On to the next problem. \",\n\"Try another function.\",\n\"Identify another shifted function. \"\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "randnext := rand( 1..nops(nextquest)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 498 "so rry := [\n\" Sorry, that's not right. \",\n\" Nope, but don't give up. \",\n\" Not quite, it's a little off. \",\n\" D'oh! \",\n\" Really cl ose. You'll get it next time. \",\n\" Nice try, but your answer is wro ng. \",\n\" Ask your neighbor for help. \",\n\" So, that was just prac tice. \",\n\" Better luck next time. \",\n\" Oops. \",\n\" Better luck next time. \",\n\" Tisk, tisk. It's a tough one. \",\n\" It takes a l ot of wrongs to make a right. \",\n\" Even Einstein didn't get everyth ing right. \",\n\" Oh man, you were so close. \"\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "randsorry := rand(1..nops(sorry)):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 113 "tryagain := [\n\"Fix your a nswer 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 263 "showit := [\n\" OK That's just practice. But try \+ doing it yourself.\",\n\" That's fine for practice. Try doing it yours elf.\",\n\" Think about it and enter an answer yourself.\",\n\" Next t ime, compute an answer yourself.\",\n\" So that was practice. Try doin g it yourself.\"\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "ran dshow := rand(1..nops(showit)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "func:=[\nx -> si n(x),\nx -> cos(x),\nx -> tan (x),\nx -> cot(x),\nx -> sec(x),\nx -> c sc(x)\n]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "colour:=maroon :\ncolour2:=white:\ncolour3:=plum:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 205 "randfunc := rand(1..nops(func)):\nhshifts:=[0, Pi, P i/2, 3*Pi/2, Pi/4, 3*Pi/4, 5*Pi/4, 7*Pi/4, Pi/6, Pi/3, 2*Pi/3, 5*Pi/6, 7*Pi/6, 4*Pi/3, 5*Pi/3, 11*Pi/6];\nrandhshift:=rand(1..16):\nrandvshi ft:=rand(-3..3):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 884 "Show_Shifted_Graph := proc( )\n local p1;\n global hshift, vshift, answer, x, func, randfunc, ra ndhshift, randvshift;\n hshift := hshifts[randhshift()];\n vshift := randvshift();\n answer := func[randfunc()](x - hshift) + vshift;\n \+ p1:=plot(answer, x=-2*Pi..2*Pi, -5..5, discont=true, scaling=constrain ed, \n tickmarks=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28 =\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ],\n color=blue, thic kness=2, numpoints=99):\n Set('PL1' = plots[display](p1)):\n Set('re ply' = \n\"This is the graph of one of the 6 basic trig functions shif ted left or right by multiples of Pi/6 or Pi/4 and/or shifted up or do wn by an integer.\\n\\nEnter its formula below.\", reply(background)=w hite, reply(foreground)=black):\n Set('TF1' = \"\"):\n Set('Bcheck'( enabled)=true, 'Bcheck'(background)=colour3);\n Set('Bshow'(enabled)= true, 'Bshow'(background)=colour3);\nend proc:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1391 "Check_Answer := proc()\nlocal user_answer, p1, p2;\nglobal answe r, x, great, randgreat, sorry, randsorry;\nuser_answer := Get('TF1'::a lgebraic, corrections=true, update=true):\nif simplify(normal(expand(a nswer - user_answer)))<> 0 then\n p1:=plot(answer, x=-2*Pi..2*Pi, -5. .5, discont=true, scaling=constrained, \n tickmarks=[ [-6.28=\"-2Pi \", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ],\n color=blue, thickness=2, numpoints=99):\n p2:=pl ot(user_answer, x=-2*Pi..2*Pi, -5..5, discont=true, scaling=constraine d, \n tickmarks=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28 =\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ],\n color=red, thic kness=2, numpoints=99):\n Set('PL1' = plots[display]( p1,p2 )):\n Se t('reply' = \ncat(sorry[randsorry()], \"The new plot shows the ORIGINA L FUNCTION in BLUE and YOUR ANSWER in RED. Modify your answer and Che ck Your Answer again.\"), reply(background)=violet, reply(foreground)= white):\nelse\n p1:=plot(answer, x=-2*Pi..2*Pi, -5..5, discont=true, \+ scaling=constrained, \n tickmarks=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ],\n \+ color=green, thickness=2, numpoints=99):\n Set('PL1' = plots[displ ay]( p1 )):\n Set('reply' = cat(great[randgreat()], nextquest[randnex t()],\n \" Click on Show Shifted Graph.\"), reply(background)=green , reply(foreground)=black):\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 163 "Show_Answer := proc()\nglobal answer, x;\nSet ('TF1' = answer):\nSet('reply' = showit[randshow()], 'reply'(backgroun d)=lightorange, reply(foreground)=black):\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4205 "Shift_Trig_Function := Maplet(onstartup = RunWindow(MAIN),\nFo nt[helv10](\"helvetica\",10),\nWindow[MAIN]( 'title'=\"Shifting Trigon ometric Functions\", 'defaultbutton'='Bcheck', \nBoxColumn( halign=non e, background=colour,\n BoxRow( background=colour, inset=0, spacing=0 ,\n BoxColumn( background=colour, inset=0, spacing=0, border=true, \+ halign=none,\n Button['BShowShiftGraph'](\"Show\\nShifted Graph\" , Evaluate('function' = \"Show_Shifted_Graph\"), background=turquoise) ,\n Button(\"Show\\n6 Basic Functions\", onclick=RunWindow(BASIC6 ), background=colour3)\n ),\n BoxColumn( background=colour, inse t=0, spacing=0, border=true, halign=none,\n Plotter['PL1'](plot(0 , x=-2*Pi..2*Pi, -5..5,\n tickmarks=[ [-6.28=\"-2Pi\", -3.14=\" -Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ]),\n 'width'=275, 'height'=275)\n )\n ),\n BoxRow( backg round=colour, inset=0, spacing=0, border=true,\n TextBox['reply']( \"Click on Show 6 Basic Functions to see the graphs of 6 basic trigono metric functions.\\n\\nClick on Show Shifted Graph to see one of the 6 basic trig functions shifted up or down and/or left or right.\", 'wid th'=50, 'height'=5, 'editable' = 'false', background=white)\n ),\n B oxRow( background=colour2,\n \"Answer = \",\n TextField['TF1'](' width'=20, background=colour3)\n ),\n BoxRow( background=colour, ins et=0, spacing=0, border=true,\n HorizontalGlue(),\n Button['Bche ck'](\"Check Answer\", Evaluate('function' = \"Check_Answer\"), enable d=false),\n HorizontalGlue(),\n Button['Bshow'](\"Show Answer\", Evaluate(function = 'Show_Answer'), enabled=false),\n HorizontalGl ue(),\n Button(\"Quit\", Shutdown(), background=colour3),\n Hori zontalGlue()\n ),\n [ \"Programmer: Cornforth & Rechard Copyright P . Yasskin 2005\"\n ]\n )),\nWindow[BASIC6]( 'title'=\"Basic 6 Trigon ometric Functions\", \nBoxColumn( halign=none, background=colour, inse t=0, spacing=0,\n [ background=colour2, inset=15,\n \"Look at each graph and learn its basic shape:\",\n HorizontalGlue(),\n Butto n(\"Close\", CloseWindow(BASIC6), background=colour3)\n ],\n BoxRow( background=colour, inset=0,\n BoxColumn( background=colour, inset= 0, spacing=0, border=true,\n caption=\"Basic functions\",\n \+ Button(\"Show sin(x)\", width=120, background=colour3, onclick=A 1),\n Button(\"Show cos(x)\", width=120, background=colour3, \+ onclick=A2),\n Button(\"Show tan(x)\", width=120, background= colour3, onclick=A3),\n Button(\"Show cot(x)\", width=120, back ground=colour3, onclick=A4),\n Button(\"Show sec(x)\", width= 120, background=colour3, onclick=A5),\n Button(\"Show csc(x)\", \+ width=120, background=colour3, onclick=A6)\n ),\n BoxColumn(back ground=colour, inset=0, spacing=0, border=true,\n caption=\"Plot \",\n Plotter['PL6'](plot(0, x=-2*Pi..2*Pi, -5..5,\n tickm arks=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5 , -4, -3, -2, -1, 1, 2, 3, 4, 5] ]),\n 'width'=275, 'height'=27 5)\n )\n )\n)),\nAction[A1](SetOption('PL6' = plot(sin(x), x=-2*Pi ..2*Pi, -5..5, thickness=3, color=blue,\n tickmarks=[ [-6.28=\"-2Pi\" , -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2 , 3, 4, 5] ]))),\nAction[A2](SetOption('PL6' = plot(cos(x), x=-2*Pi..2 *Pi, -5..5, thickness=3, color=blue,\n tickmarks=[ [-6.28=\"-2Pi\", - 3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3 , 4, 5] ]))),\nAction[A3](SetOption('PL6' = plot(tan(x), x=-2*Pi..2*Pi , -5..5, thickness=3, color=blue, discont=true,\n tickmarks=[ [-6.28= \"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, -4, -3, -2, \+ -1, 1, 2, 3, 4, 5] ]))),\nAction[A4](SetOption('PL6' = plot(cot(x), x= -2*Pi..2*Pi, -5..5, thickness=3, color=blue, discont=true,\n tickmark s=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2Pi\"], [-5, - 4, -3, -2, -1, 1, 2, 3, 4, 5] ]))),\nAction[A5](SetOption('PL6' = plot (sec(x), x=-2*Pi..2*Pi, -5..5, thickness=3, color=blue, discont=true, \n tickmarks=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\", 6.28=\"2P i\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ]))),\nAction[A6](SetOption( 'PL6' = plot(csc(x), x=-2*Pi..2*Pi, -5..5, thickness=3, color=blue, di scont=true,\n tickmarks=[ [-6.28=\"-2Pi\", -3.14=\"-Pi\", 3.14=\"Pi\" , 6.28=\"2Pi\"], [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5] ])))\n):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "Maplets[Display]( Shift_Trig _Function );" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 1 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }