(*^ ::[ frontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.1"; macintoshStandardFontEncoding; paletteColors = 128; automaticGrouping; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; ; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier"; ; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; ; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = leftheader, inactive, L2, 12, "Times"; ; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times"; ; fontset = leftfooter, inactive, L2, 12, "Times"; ; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; ] :[font = special1; inactive; preserveAspect; ] Before Calculus -- The Sound of Trigonometry The next cell illustrates how Mathematica can plot several functions using a different color for each. The functions are listed inside curly brackets and separated by commas and the colors are listed in the same way. The color for each curve is specified in terms of its red, green, and blue components in that order. Each color component is between zero and one. For example, RGBColor[0, 0, 0] has no color at all and is black and RGBColor[1, 0, 0] is red. Evaluate the next cell now. ;[s] 13:0,0;23,1;47,0;48,1;109,0;139,3;150,0;492,1;509,0;547,1;564,0;573,1;575,2;603,-1; 4:6,13,9,Times,0,12,0,0,0;5,13,9,Times,1,12,0,0,0;1,13,9,Times,1,12,65535,0,0;1,13,9,Times,2,12,0,0,0; :[font = input; preserveAspect; ] Plot[{Sin[x], 2 Sin[x], 0.5 Sin[x]}, {x, 0, 2 Pi}, PlotRange -> {-2, 2}, PlotStyle -> {{RGBColor[0, 0, 0]}, {RGBColor[1, 0, 0]}, {RGBColor[0, 0, 1]}}] :[font = special1; inactive; preserveAspect; ] The next cell illustrates how Mathematica can Play a sound. In order to be audible the sound should have a frequency between 60 and 20,000 hertz depending on the listener's ears and the computer's sound system. The cell below plays a sound whose frequency is 440 hertz. Evaluate it now. Note: it may take a long time to evaluate. ;[s] 6:0,0;30,1;41,0;48,2;52,0;275,3;338,-1; 4:3,13,9,Times,0,12,0,0,0;1,13,9,Times,2,12,0,0,0;1,13,9,Times,1,12,0,0,0;1,13,9,Times,1,12,65535,0,0; :[font = input; preserveAspect; ] Play[Sin[2 Pi 440 t], {t, 0, 0.5}, PlayRange -> {0, 2}] :[font = special1; inactive; preserveAspect; ] You can replay the sound to hear to it again without recomputing it by selecting the output cell with the sound graphics and then selecting Play Sound from the Graph menu. The cell above is set-up so that an amplitude of 2 is the loudest sound produced by the computer. ;[s] 5:0,0;141,1;151,0;161,1;166,0;275,-1; 2:3,13,9,Times,0,12,0,0,0;2,13,9,Times,1,12,0,0,0; ^*)