{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]):\nwith(plots):\nStartEngine();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "randomize():" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 1443 "ReflectionsofFunctions:=Maplet(onstartup = R unWindow(MAIN),\nWindow[MAIN]('title'=\"Reflections of Functions\",\n[ [ background=wheat,\n [ [ Button(\"New Function\", onclick=Evaluat e('function' = \"Ask_Question\")),\n Button(\"Close\", Shutdown (), background=pink)\n ],\n [ \"The graph of a function y = f(x) is shown at the right:\"\n ],\n [ HorizontalGlue(),\n \+ \"Which of the following is the graph of\",\n TextField[ 'question'](\"\", width=10),\n HorizontalGlue()\n ]\n ] ,\n Plotter['PL0'](plot(0,x=-10..10, y=-10..10), 'width'=250, 'heig ht'=250)\n ],\n [\n [ background=wheat,\n Plotter['PL1'](plo t1, 'width'=250, 'height'=250),\n RadioButton['RP1'](\"Plot # 1\" , 'value'='false', 'group'='BG1', 'background'=turquoise)\n ],\n \+ [ background=wheat,\n Plotter['PL2'](plot2, 'width'=250, 'height '=250),\n RadioButton['RP2'](\"Plot # 2\", 'value'='false', 'grou p'='BG1', 'background'=turquoise)\n ],\n [ background=wheat,\n \+ Plotter['PL3'](plot3, 'width'=250, 'height'=250),\n RadioButt on['RP3'](\"Plot # 3\", 'value'='false', 'group'='BG1', 'background'=t urquoise)\n ]\n ],\n [ Button(\"Check\",Evaluate('function' = \"C heck_Answer\"), background=turquoise),\n Button(\"Show\", Evaluate( 'function' = \"Show_Answer\"), background=turquoise),\n TextBox['Pl otComment'](\"\", width=40)\n ],\n [ \"Programmers: Mirochna & Naize r Copyright P. Yasskin 2005\"\n ] \n]\n),\nButtonGroup['BG1']()\n): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "Fns:=[ (x+1)^3, (x-2)^ 2, x^3-1, ln(x), exp(x), x^(1/2), x+2, -(x+1)^2, 1/(x+1), 2^(x-2) ];\n rand10:=rand(1..10):\nrand3:=rand(1..3):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 617 "Ask_Question := proc()\nlocal f, f1, f2, f3, p0, p1, p2, p3;\nglobal Fns, x, ans, rand3, rand10;\nans:=rand3();\nif ans = \+ 1 then (Set('question' = \"y = f(-x)\")) end if;\nif ans = 2 then (Set ('question' = \"y = -f(x)\")) end if;\nif ans = 3 then (Set('question' = \"y = -f(-x)\")) end if;\nf:=Fns[rand10()];\np0:=plot(f,x=-3..3, y= -3..3);\nSet(PL0=p0);\nf1:=subs(x=-x,f);\nf2:=-f;\nf3:=subs(x=-x,f2); \np1:=plot(f1,x=-3..3, y=-3..3);\np2:=plot(f2,x=-3..3, y=-3..3);\np3:= plot(f3,x=-3..3, y=-3..3);\nSet(PL1=p1);\nSet(PL2=p2);\nSet(PL3=p3);\n Set('RP1' = 'false');\nSet('RP2' = 'false');\nSet('RP3' = 'false');\nS et('PlotComment' = \"\"): \nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 428 "Check_ Answer := proc()\nlocal plotans;\nglobal ans;\nplotans:=0;\nif Get('RP 1') then plotans:=1 end if;\nif Get('RP2') then plotans:=2 end if;\nif Get('RP3') then plotans:=3 end if;\nif plotans = 0 then\n Set('PlotC omment' =\n \"Please select a plot.\")\nelif plotans = ans then\n \+ Set('PlotComment' =\n \"Good Job! You are correct\"):\nelse\n Set( 'PlotComment' =\n \"You did not pick the correct plot. Try again. \+ \"): \nend if; \nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 169 "Show_Answer := proc()\nglobal ans;\nif ans=1 then Set('RP1' = 'tr ue') end if;\nif ans=2 then Set('RP2' = 'true') end if;\nif ans=3 then Set('RP3' = 'true') end if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Display (ReflectionsofFunctions):" }}}{EXCHG }}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 1 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }