(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 18324, 430]*) (*NotebookOutlinePosition[ 19073, 457]*) (* CellTagsIndexPosition[ 19029, 453]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Sine and Cosine", "Title", FontColor->RGBColor[1, 1, 0], Background->RGBColor[0, 0, 1]], Cell[CellGroupData[{ Cell["Read Me! (how to use this program)", "Section", FontColor->RGBColor[1, 1, 0], Background->RGBColor[0, 0, 1]], Cell[TextData[{ "This notebook is written using ", StyleBox["Mathematica", FontSlant->"Italic"], ", a highly sophisticated mathematical software program capable of doing \ intricate mathematics", ". ", "You will need to know only a few ", StyleBox["very basic", FontVariations->{"Underline"->True}], " things about ", StyleBox["Mathematica", FontSlant->"Italic"], " to be able to use this notebook; the programming has been done for you." }], "Text"], Cell[TextData[{ "\t1. ", StyleBox["Opening a section of the notebook", FontWeight->"Bold"], ": Scroll down the screen using the mouse on the scrollbar at the right of \ this screen until you see what appears to be a table of contents. Directly \ to the right of each topic is a short blue bracket sign. Some brackets have \ a small arrow or triangle at the bottom. This arrow indicates that there is \ hidden text which can be viewed by clicking with the mouse on the bracket \ containing the arrow. Try this on one of the arrowed brackets below. When \ you click on the bracket, new text should appear. When you are finished, you \ can close that section of the notebook by double-clicking on the same (now \ longer) bracket. If you are unsure which one it is, scroll up to the \ beginning of the section; it is the one that ", StyleBox["begins", FontSlant->"Italic"], " there. Try closing the section you just opened." }], "Text"], Cell[TextData[{ StyleBox["\t", FontWeight->"Bold"], "2. ", StyleBox["Activating a program command", FontWeight->"Bold"], ": The ", StyleBox["Mathematica", FontSlant->"Italic"], " programming always appears in bold type on a yellow background. To \ activate a program, use the mouse to move the \"I\" shaped cursor inside the \ yellow box and click once so that the straight line \"|\" cursor appears \ anywhere inside the yellow box. Now depress the \"shift\" and \"return\" \ keys ", StyleBox["simultaneously", FontVariations->{"Underline"->True}], ". Try this with the following short program which generates a random \ number between 1 and 10. Remember to click on these two keys ", StyleBox["simultaneously", FontVariations->{"Underline"->True}], "." }], "Text"], Cell[BoxData[ \(Random[Integer, {1, 10}]\)], "Input", FontColor->GrayLevel[0.666667], Background->RGBColor[1, 1, 0]], Cell[TextData[{ "\t3. ", StyleBox["Changing a program:", FontWeight->"Bold"], " Generally, you should not change any type in the yellow blocks. However, \ a few of the ", StyleBox["Mathematica", FontSlant->"Italic"], " programs have been designed so that you can change parts of the program. \ The parts that you should change are displayed in ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], ". To change these parts, simply highlight the ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], " type by sweeping over it with the cursor, and type in your change. Read, \ and take seriously, any instruction saying ", StyleBox["*do not change anything below this line*", FontColor->RGBColor[1, 0, 0]], ". Changing something there could radically change the commands, causing ", StyleBox["Mathematica", FontSlant->"Italic"], " to 'beep' in an error protest--or give you an answer to a totally \ different question!\n\n\t4. ", StyleBox["Quitting the program", FontWeight->"Bold"], ": When you have finished working and want to quit, click in the small box \ at the upper lefthand corner of the window to close it. Then choose `quit' \ or `exit' from the File menu. ", StyleBox["Mathematica", FontSlant->"Italic"], " will ask you if you want to save your changes. Say NO! Otherwise you \ will have a different notebook from the one you downloaded, and any \ misinformation you might have entered into the notebook will persist. If for \ any reason, you need to start with a fresh notebook in its original form, you \ can always trash the one you've been working with and download a new one off \ the Web." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Trig Functions and the Unit Circle", "Section", FontColor->RGBColor[1, 1, 0], Background->RGBColor[0, 0, 1]], Cell[TextData[{ "The following program will, for a given angle \[Theta], plot the \ corresponding point on the unit circle and indicate sin(\[Theta]) and cos(\ \[Theta]) as the ", StyleBox["y", FontSlant->"Italic"], " and ", StyleBox["x", FontSlant->"Italic"], " coordinates. Enter the angle \[Theta] in radians below (replacing the \ type in blue)." }], "Text"], Cell[BoxData[ RowBox[{ \(Clear[\[Theta], pt, l, unitcir, arc, legs, labels]\), ";", "\n", RowBox[{"\[Theta]", "=", StyleBox[ FractionBox[ RowBox[{ StyleBox["2", FontColor->RGBColor[0, 0, 1]], " ", "\[Pi]"}], StyleBox["3", FontColor->RGBColor[0, 0, 1]]], FontColor->RGBColor[0, 0, 1]]}], ";", "\n", StyleBox[\( (*Change\ nothing\ below\ this\ line*) \), FontColor->RGBColor[1, 0, 0]], "\n", \(pt = {PointSize[0.03], Point[{Cos[\[Theta]], Sin[\[Theta]]}]}\), ";", "\n", \(unitcir = Circle[{0, 0}, 1]\), ";", "\n", \(arc = Circle[{0, 0}, 0.2, {0, \[Theta]}]\), ";", "\n", \(l = {Thickness[0.006], Line[{{0, 0}, {1.3\ Cos[\[Theta]], 1.3\ Sin[\[Theta]]}}]}\), ";", "\n", "\t\t", \(legs = {Dashing[{0.02, 0.02}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {Cos[\[Theta]], 0}}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {0, Sin[\[Theta]]}}]}\), ";", \(labels = { Text[StyleForm[Cos[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]]\/2, Sin[\[Theta]] + 0.1}], \n\t\t Text[StyleForm[Sin[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]] + 0.01, Sin[\[Theta]]\/2}, {\(-1\), 0}], \n\t\t Text["\<1\>", {1, \(-0.05\)}, {\(-1\), 0}], \n\t\t Text["\<1\>", {0, 1.05}, {\(-1\), 0}]}\), ";", "\n", "\t\t\t\t", \(Show[Graphics[{pt, unitcir, arc, l, legs, labels}], AspectRatio -> 1, Axes -> True, Ticks -> None, PlotRange -> {{\(-1.8\), 1.8}, {\(-1.8\), 1.8}}, ImageSize -> {400, 400}]\), ";", "\n", \(Print["\", \[Theta], \ "\<, sin(\[Theta]) = \>", \ Sin[\[Theta]], \ "\< and cos(\[Theta]) = \>", Cos[\[Theta]]]\)}]], "Input", Background->RGBColor[1, 1, 0]], Cell[TextData[{ "The next one does the same except it is intended for animation, using \ integer multiples of ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\/6\)]], "." }], "Text"], Cell[BoxData[ \(Clear[\[Theta], pt, l, unitcir, arc, legs, labels]; \n \[Theta] = \(k\ \ \[Pi]\)\/6; \n pt = {PointSize[0.03], Point[{Cos[\[Theta]], Sin[\[Theta]]}]}; \n unitcir = Circle[{0, 0}, 1]; \narc = Circle[{0, 0}, 0.2, {0, \[Theta]}]; \nl = {Thickness[0.006], Line[{{0, 0}, {1.3\ Cos[\[Theta]], 1.3\ Sin[\[Theta]]}}]}; \n\t\t legs = {Dashing[{0.02, 0.02}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {Cos[\[Theta]], 0}}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {0, Sin[\[Theta]]}}]}; labels = { Text[StyleForm[Cos[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]]\/2, Sin[\[Theta]] + 0.1}], \n\t\t Text[StyleForm[Sin[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]] + 0.01, Sin[\[Theta]]\/2}, {\(-1\), 0}], \n\t\t Text["\<1\>", {1, \(-0.05\)}, {\(-1\), 0}], \n\t\t Text["\<1\>", {0, 1.05}, {\(-1\), 0}]}; \n Do[Show[Graphics[{pt, unitcir, arc, l, legs, labels}], AspectRatio -> 1, Axes -> True, Ticks -> None, PlotRange -> {{\(-1.8\), 1.8}, {\(-1.8\), 1.8}}, ImageSize -> {400, 400}]; Print["\", \[Theta], \ "\<, sin(\[Theta]) = \>", \ Sin[\[Theta]], \ "\< and cos(\[Theta]) = \>", Cos[\[Theta]]], \ {k, 0, 16}]\)], "Input", AnimationDisplayTime->1.79216, Background->RGBColor[1, 1, 0]], Cell[TextData[{ "The rest of these relate the ", StyleBox["x", FontSlant->"Italic"], " (or ", StyleBox["y", FontSlant->"Italic"], ") coordinate to the function value in the graph of cosine (or sine). The \ first two are for the sine function: one allowing you to specify \[Theta], \ the next for animation in multiples of ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\/6\)]], ". The animation is particularly effective.\nThen we do the same for \ cosine." }], "Text"], Cell[BoxData[ RowBox[{ \(Clear[\[Theta], pt, l, unitcir, legs, labels, ucirc, grf]\), ";", "\n", RowBox[{"\[Theta]", "=", StyleBox[\(\(\ \[Pi]\)\/6\), FontColor->RGBColor[0, 0, 1]]}], ";", "\n", StyleBox[\( (*Change\ nothing\ below\ this\ line*) \), FontColor->RGBColor[1, 0, 0]], "\n", \(pt = {PointSize[0.03], Point[{Cos[\[Theta]], Sin[\[Theta]]}]}\), ";", "\n", \(unitcir = Circle[{0, 0}, 1]\), ";", "\n", "\n", \(l = {Thickness[0.006], Line[{{0, 0}, {1.3\ Cos[\[Theta]], 1.3\ Sin[\[Theta]]}}]}\), ";", "\n", "\t\t", \(legs = {Dashing[{0.02, 0.02}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {Cos[\[Theta]], 0}}]}\), ";", "\n", \(labels = {\n\t\t Text[StyleForm[Sin[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]] + 0.01, Sin[\[Theta]]\/2}, {\(-1\), 0}], \n\t\t Text["\<1\>", {1, \(-0.05\)}, {\(-1\), 0}], \n\t\t Text["\<1\>", {0, 1.05}, {\(-1\), 0}]}\), ";", "\n", \(ucirc = Show[Graphics[{pt, unitcir, l, legs, labels}, AspectRatio -> 1, Axes -> True, Ticks -> None, DisplayFunction -> Identity, PlotRange -> {{\(-1.8\), 1.8}, {\(-1.8\), 1.8}}]]\), ";", "\n", \(grf = Plot[Sin[\[Theta]], {\[Theta], 0, 3\ \[Pi]}, Axes -> True, AspectRatio -> 1, DisplayFunction -> Identity, PlotRange -> {\(-1.8\), 1.8}, Epilog -> {{PointSize[0.03], Point[{\[Theta], Sin[\[Theta]]}]}, { Dashing[{0.02, 0.02}], Line[{{\[Theta], Sin[\[Theta]]}, {\[Theta], 0}}]}, Text[StyleForm["\", FontSize -> 14, FontWeight -> "\"], { \(3\ \[Pi]\)\/2, \(-1.2\)}], Text[Sin[\[Theta]], {\[Theta], Sin[\[Theta]]\/2}, {\(-1\), 0}]}] \), ";", "\n", \(Show[GraphicsArray[{ucirc, grf}], DisplayFunction -> $DisplayFunction, ImageSize -> {600, 300}]\), ";"}]], "Input", Background->RGBColor[1, 1, 0]], Cell[BoxData[ RowBox[{ \(Clear[\[Theta], pt, l, unitcir, legs, labels, ucirc, grf]\), ";", "\n", RowBox[{"\[Theta]", "=", StyleBox[\(\(\ \[Pi]\)\/6\), FontColor->RGBColor[0, 0, 1]]}], ";", "\n", StyleBox[\( (*Change\ nothing\ below\ this\ line*) \), FontColor->RGBColor[1, 0, 0]], "\n", \(pt = {PointSize[0.03], Point[{Cos[\[Theta]], Sin[\[Theta]]}]}\), ";", "\n", \(unitcir = Circle[{0, 0}, 1]\), ";", "\n", \(l = {Thickness[0.006], Line[{{0, 0}, {1.3\ Cos[\[Theta]], 1.3\ Sin[\[Theta]]}}]}\), ";", "\n", "\t\t", \(legs = {Dashing[{0.02, 0.02}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {0, Sin[\[Theta]]}}]}\), ";", "\n", \(labels = { Text[StyleForm[Cos[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]]\/2, Sin[\[Theta]] + 0.1}], \n\t\t Text["\<1\>", {1, \(-0.05\)}, {\(-1\), 0}], \n\t\t Text["\<1\>", {0, 1.05}, {\(-1\), 0}]}\), ";", "\n", \(ucirc = Show[Graphics[{pt, unitcir, l, legs, labels}, AspectRatio -> 1, Axes -> True, Ticks -> None, DisplayFunction -> Identity, PlotRange -> {{\(-1.8\), 1.8}, {\(-1.8\), 1.8}}]]\), ";", "\n", \(grf = Plot[Cos[\[Theta]], {\[Theta], 0, 3\ \[Pi]}, Axes -> True, AspectRatio -> 1, DisplayFunction -> Identity, PlotRange -> {\(-1.8\), 1.8}, Epilog -> {{PointSize[0.03], Point[{\[Theta], Cos[\[Theta]]}]}, { Dashing[{0.02, 0.02}], Line[{{\[Theta], Cos[\[Theta]]}, {\[Theta], 0}}]}, Text[StyleForm["\", FontSize -> 14, FontWeight -> "\"], { \(3\ \[Pi]\)\/2, \(-1.2\)}], Text[Cos[\[Theta]], {\[Theta], Cos[\[Theta]]\/2}, {\(-1\), 0}]}] \), ";", "\n", \(Show[GraphicsArray[{ucirc, grf}], DisplayFunction -> $DisplayFunction, ImageSize -> {600, 300}]\), ";"}]], "Input", Background->RGBColor[1, 1, 0]], Cell[BoxData[ \(Clear[\[Theta], pt, l, unitcir, legs, labels, ucirc, grf]; \n \[Theta] = \(k\ \[Pi]\)\/6; \n pt = {PointSize[0.03], Point[{Cos[\[Theta]], Sin[\[Theta]]}]}; \n unitcir = Circle[{0, 0}, 1]; \n l = {Thickness[0.006], Line[{{0, 0}, {1.3\ Cos[\[Theta]], 1.3\ Sin[\[Theta]]}}]}; \n\t\t legs = {Dashing[{0.02, 0.02}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {Cos[\[Theta]], 0}}]}; \n labels = {\n\t\t Text[StyleForm[Sin[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]] + 0.01, Sin[\[Theta]]\/2}, {\(-1\), 0}], \n\t\t Text["\<1\>", {1, \(-0.05\)}, {\(-1\), 0}], \n\t\t Text["\<1\>", {0, 1.05}, {\(-1\), 0}]}; \n ucirc = Show[ Graphics[{pt, unitcir, l, legs, labels}, AspectRatio -> 1, Axes -> True, Ticks -> None, DisplayFunction -> Identity, PlotRange -> {{\(-1.3\), 1.3}, {\(-1.3\), 1.3}}]]; \n grf = Plot[Sin[\[Theta]], {\[Theta], 0, 3\ \[Pi]}, Axes -> True, AspectRatio -> 1, DisplayFunction -> Identity, PlotRange -> {\(-1.3\), 1.3}, Epilog -> {{PointSize[0.03], Point[{\[Theta], Sin[\[Theta]]}]}, { Dashing[{0.02, 0.02}], Line[{{\[Theta], Sin[\[Theta]]}, {\[Theta], 0}}]}, Text[StyleForm["\", FontSize -> 14, FontWeight -> "\"], {\(3\ \[Pi]\)\/2, \(-1.2\)}], Text[Sin[\[Theta]], {\[Theta], Sin[\[Theta]]\/2}, {\(-1\), 0}]}]; \nDo[Show[GraphicsArray[{ucirc, grf}], DisplayFunction -> $DisplayFunction, ImageSize -> {600, 300}], {k, 0, 16}]\)], "Input", Background->RGBColor[1, 1, 0]], Cell[BoxData[ \(Clear[\[Theta], pt, l, unitcir, legs, labels, ucirc, grf]; \n \[Theta] = \(k\ \[Pi]\)\/6; \n pt = {PointSize[0.03], Point[{Cos[\[Theta]], Sin[\[Theta]]}]}; \n unitcir = Circle[{0, 0}, 1]; \n l = {Thickness[0.006], Line[{{0, 0}, {1.3\ Cos[\[Theta]], 1.3\ Sin[\[Theta]]}}]}; \n\t\t legs = {Dashing[{0.02, 0.02}], Line[{{Cos[\[Theta]], Sin[\[Theta]]}, {0, Sin[\[Theta]]}}]}; \n labels = { Text[StyleForm[Cos[\[Theta]], FontSize -> 10, FontWeight -> "\"], {Cos[\[Theta]]\/2, Sin[\[Theta]] + 0.1}], \n\t\t Text["\<1\>", {1, \(-0.05\)}, {\(-1\), 0}], \n\t\t Text["\<1\>", {0, 1.05}, {\(-1\), 0}]}; \n ucirc = Show[ Graphics[{pt, unitcir, l, legs, labels}, AspectRatio -> 1, Axes -> True, Ticks -> None, DisplayFunction -> Identity, PlotRange -> {{\(-1.3\), 1.3}, {\(-1.3\), 1.3}}]]; \n grf = Plot[Cos[\[Theta]], {\[Theta], 0, 3\ \[Pi]}, Axes -> True, AspectRatio -> 1, DisplayFunction -> Identity, PlotRange -> {\(-1.3\), 1.3}, Epilog -> {{PointSize[0.03], Point[{\[Theta], Cos[\[Theta]]}]}, { Dashing[{0.02, 0.02}], Line[{{\[Theta], Cos[\[Theta]]}, {\[Theta], 0}}]}, Text[StyleForm["\", FontSize -> 14, FontWeight -> "\"], {\(3\ \[Pi]\)\/2, \(-1.2\)}], Text[Cos[\[Theta]], {\[Theta], Cos[\[Theta]]\/2}, {\(-1\), 0}]}]; \nDo[Show[GraphicsArray[{ucirc, grf}], DisplayFunction -> $DisplayFunction, ImageSize -> {600, 300}], {k, 0, 16}]\)], "Input", Background->RGBColor[1, 1, 0]] }, Closed]] }, Open ]] }, FrontEndVersion->"Microsoft Windows 3.0", ScreenRectangle->{{0, 1024}, {0, 712}}, ShowPageBreaks->False, WindowSize->{986, 621}, WindowMargins->{{-3, Automatic}, {11, Automatic}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, Magnification->1.25 ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 97, 2, 150, "Title"], Cell[CellGroupData[{ Cell[1853, 57, 119, 2, 86, "Section"], Cell[1975, 61, 481, 14, 59, "Text"], Cell[2459, 77, 959, 17, 144, "Text"], Cell[3421, 96, 810, 21, 102, "Text"], Cell[4234, 119, 124, 3, 55, "Input"], Cell[4361, 124, 1691, 38, 229, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[6089, 167, 118, 2, 126, "Section"], Cell[6210, 171, 381, 11, 88, "Text"], Cell[6594, 184, 1956, 39, 708, "Input"], Cell[8553, 225, 187, 6, 63, "Text"], Cell[8743, 233, 1447, 27, 708, "Input"], Cell[10193, 262, 493, 14, 126, "Text"], Cell[10689, 278, 2114, 40, 936, "Input"], Cell[12806, 320, 2088, 40, 870, "Input"], Cell[14897, 362, 1708, 31, 912, "Input"], Cell[16608, 395, 1688, 31, 875, "Input"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)