(*^ ::[ frontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.1"; macintoshStandardFontEncoding; paletteColors = 128; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L3, e8, 24, "New York"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L2, e6, 18, "New York"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L2, e6, 14, "New York"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L2, a20, 14, "New York"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L2, a15, 12, "New York"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L2, a12, 10, "New York"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; ; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L2, 10, "New York"; ; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L2, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L2, 12, "Courier"; ; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L2, 12, "Courier"; ; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L2, 12, "Courier"; ; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L2, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L2, 12, "Courier"; ; fontset = name, inactive, nowordwrap, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, B65535, L2, 10, "Geneva"; ; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, L2, 10, "Times"; ; fontset = leftheader, inactive, L2, 10, "Times"; ; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, L2, 12, "Times"; ; fontset = leftfooter, inactive, center, L2, 12, "Times"; ; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L2, 10, "Geneva"; ; fontset = clipboard, inactive, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; ; fontset = completions, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; ; fontset = special1, inactive, noPageBreakInGroup, preserveAspect, M40, N23, L2, 12, "Courier"; ; fontset = special2, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, center, M7, L2, 12, "New York"; ; fontset = special3, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, right, M7, L2, 12, "New York"; ; fontset = special4, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; ; fontset = special5, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; ; ] :[font = special1; inactive; dontPreserveAspect; ] Derivatives -- Introduction -- Curved Mirrors The following cell draws a concave mirror described by the function mirror[x] = 8 - Sqrt[64 - x^2] and n evenly spaced light rays coming down vertically and bouncing off the mirror. WARNING: This cell can take quite a while to evaluate. Evaluate it now. ;[s] 9:0,0;8,1;53,0;137,1;167,0;173,1;174,0;253,2;326,0;330,-1; 3:5,14,10,Courier,0,12,0,0,0;3,14,10,Courier,1,12,0,0,0;1,14,10,Courier,1,12,65535,0,0; :[font = input; dontPreserveAspect; ] n = 30; (* Number of rays *) mirror[x_] := 8 - Sqrt[64 - x^2] (* Mirror *) width := 5.0 (* x-axis runs from -width to width *) height := 2 width (* y-axis runs from 0 to height *) Clear[slope] slope[x_] := x/Sqrt[64 - x^2] (* Slope of tangent *) (* The next block of code computes and draws the light rays coming in and bouncing off the mirror *) rays = {} For[x = -width; i = 0, i <= n, ++i; x = x + 2 width/n, y = mirror[x]; rays = Join[{Line[{{x, height}, {x, y}}]}, rays]; der = slope[x]; If [Abs[der] > .001, m = (der^2 - 1)/(2 der); (* outgoing slope *) dx = -Sign[der] * 0.05 * width/Sqrt[1 + m*m]; rayx = x; rayy = y; oldrayx = rayx; oldrayy = rayy; sw = 0; While[sw == 0, rayx = rayx + dx; rayy = rayy + m * dx; Which[rayy < mirror[rayx], sw = 1, Abs[rayx] > width, sw = 1, rayy > height, sw = 1]; If[sw == 0, rays = Join[{Line[{{oldrayx, oldrayy}, {rayx, rayy}}]}, rays]; oldrayx = rayx; oldrayy = rayy] ] ] ] Show[Plot[mirror[z],{z, -width, width}, DisplayFunction -> Identity], Graphics[{rays}], AspectRatio -> Automatic, PlotRange -> {0, height}, Axes -> None, DisplayFunction -> $DisplayFunction] :[font = special1; inactive; dontPreserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981; ] You can modify this cell to try several experiments. 1. If you hold a cup of coffee so that the sides of the cup are vertical and the light rays come over the edge of the cup at an angle then the picture above is not quite right. In effect, the sides of the cup will look to the incoming light rays like an ellipse rather than a circle. The function mirror[x] : = a (8 - Sqrt[64 - x^2]) where a is a positive constant is an ellipse. If a = 1 then this is just a circle. If a < 1 then the ellipse is short and fat. If a > 1 then the ellipse is tall and thin. Try different values of a to see what the resulting caustics look like. Describe your results. 2. If the mirror is a parabola rather than a circle or an ellipse then a different phenomenon appears. The function mirror[x] = x^2/25 describes a parabola with dimensions similar to the mirrors we have been studying. Try this mirror to see if your results from the exercises match the graphics. ;[s] 15:0,1;388,2;424,1;443,2;444,1;487,2;492,1;529,2;534,1;578,2;583,1;648,2;649,1;872,2;890,1;1073,-1; 3:0,14,10,Courier,0,12,0,0,0;8,14,10,Courier,0,12,0,0,65535;7,14,10,Courier,1,12,0,0,65535; ^*)