(*********************************************************************** 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[ 30705, 984]*) (*NotebookOutlinePosition[ 31760, 1020]*) (* CellTagsIndexPosition[ 31716, 1016]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[ "Mathematics 161 Laboratory 11 \ November 12, 1992\n\t \nName: _____________________________ \ Lab Partner: ___________________________\n\t \nConsulted with: \ ____________________________________________________________"], "Text", CellMargins->{{17, Inherited}, {Inherited, Inherited}}, Evaluatable->False, CellLabelMargins->{{1, Inherited}, {Inherited, Inherited}}, AspectRatioFixed->True], Cell[TextData["\[Copyright] Lafayette College, 1994"], "SmallText", Evaluatable->False, TextAlignment->Right, AspectRatioFixed->True], Cell[TextData["Area of a Region with Curved Boundary"], "Title", Evaluatable->False, AspectRatioFixed->True, FontSize->23], Cell[TextData[ "This laboratory is designed to give you experience with numerical estimation \ of area."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Part 0: The Region of Interest"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Preliminaries"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "As in preceding labs, we will use some special commands. They are in a new \ package called \"IntegralGraphics.\" We input the package as follows:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["<True], Cell[TextData["Hard Copy"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox[" Consider the region which lies under the graph of ", Evaluatable->False, AspectRatioFixed->True], StyleBox["f", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[") = 1/", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[", above the ", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["-axis, and between the ", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" values ", Evaluatable->False, AspectRatioFixed->True], StyleBox["a", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" = 1.0 and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["b", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" = 2.0. The command below defines ", Evaluatable->False, AspectRatioFixed->True], StyleBox["f", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->True], StyleBox["a", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[", and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["b", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[", and plots the graph of ", Evaluatable->False, AspectRatioFixed->True], StyleBox["f", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ "). Print out the graph and shade in the region described. In this lab we \ aim to estimate the area of this region to about ten decimal place accuracy \ with little computer time\[LongDash]no more than ten seconds.", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "a = 1.0;\nb = 2.0;\nf[x_] := 1/x;\nPlot[f[x], {x,0.01,3}, \ PlotRange->{0,2}];"], "Input", AspectRatioFixed->True], Cell[TextData["Skinny Rectangles"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "The idea we use is that the area under the curve (which has an \"irregular\" \ top) can be approximated by the sum of the areas of \"skinny rectangles\" \ (which have flat tops, and therefores areas easy to compute). To see how \ this works, look at the curve and a suitable group of rectangles. The \ command:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["leftrect[f[x], {x, a, b, 10}];"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["plots the graph of ", Evaluatable->False, AspectRatioFixed->True], StyleBox["f", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ ") over the relevant region along with a ten-rectangle approximation to the \ area under the curve. The rectangles take their height from the value of the \ function at the left endpoint of their base. As a result, the sum of the \ area of the rectangles overestimates the area. If we use more rectangles, as \ in the following command:", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["leftrect[f[x], {x, a, b, 25}];"], "Input", AspectRatioFixed->True], Cell[TextData[ "then the error in our estimation by summing of the areas of the rectangles \ is still larger than the area of the region. Suppose we take the rectangle's \ height from the function value at the right endpoint of the base, then we \ would have an underestimation of the region's area, as the following plot \ shows:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["rightrect[f[x], {x, a, b, 10}];"], "Input", AspectRatioFixed->True], Cell[TextData[ "In what follows, you will investigate the algebra of actually summing these \ sorts of estimates, and investigate the actual errors involved."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Complete Part 1 before starting Part 2."], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True, FontSize->18, FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], Cell[TextData["Part 1: Left and Right Endpoints"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Let's begin by finding the area estimate given by the first plot we \ generated. The width of each rectangle in the plot is"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["h = (b - a)/10.0"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["while the height of the ", Evaluatable->False, AspectRatioFixed->True], StyleBox["n", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["th rectangle is ", Evaluatable->False, AspectRatioFixed->True], StyleBox["f", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["a", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" + (", Evaluatable->False, AspectRatioFixed->True], StyleBox["n", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" \[Dash] 1)", Evaluatable->False, AspectRatioFixed->True], StyleBox["h", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["). So the sum of the areas is ", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica MathPictureStart % Start of picture % Scaling calculations 0 1 0 1 [ [ 0.000000 0.000000 0 0 ] [ 1.000000 0.310680 0 0 ] ] MathScale % Start of Graphics 0 setgray 0 setlinewidth gsave 0.000000 0.000000 translate 1.000000 0.310680 scale 1 string 103 32 1 [103 0 0 32 0 0] { currentfile 1 index readhexstring pop } false 3 colorimage 1F8FFFFFFFF8FFFFFFFFFFFFF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FF8 FFFFC71FF1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF8 FFFFC71FF1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF8 FFFFC71FF1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF8 FFFE071FF1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF8 FFFFC7E00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF8 pop grestore %% End of Graphics MathPictureEnd %% End of picture \ \>"], "Graphics", Evaluatable->False, AspectRatioFixed->True, ImageSize->{103, 32}, ImageMargins->{{140, Inherited}, {Inherited, 5}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgIoc>Ic3>IVC>IIS>II03=Voc=Vc3=V VC=VIS=V0005o`000?l00`001ol0003o0?l00`0000P00olA0005o`000?l01@000ol0000300Go0P05o`D0 00?o00000`001_l0003o00Co20001Ol0003o00@000Co00000_l300002002oa<00_l20003o`000080 00?o000010001Ol0003o00<000?o00001@000ol0000400;o0P000ol0000:0005o`000?l01@02o`80 00?o00000@0000L00_lD0004o`3oo`D00_l600?o10000ol000050003o`0000@000Co0?oo3@001Ol0 003o00D000?o0?l00_l300001P02oaH000?o00001@02oaH000?o00004`02o`8000?o00001@000ol0 o`0400001@02o`H000?o00003P000ol000050004o`3ooa@000?o000050001?l00?l70003o`3o00@0 000400Wo6P000ol0000D0003o`0001H000?o00001`000ol000030000I`0006L0001W00001`000ol0 0003oeX000070003o`3o00<000?o0000E`0000L000?o0?l00`000ol0001G00001`000ol0o`030003 o`0005L000070003o`3o00<000?o0000E`0000H00_l00`3o00020003o`0005L000070003o`0000?o FP000001\ \>"], ImageRangeCache->{{{0, 102}, {31, 0}} -> {-0.0111238, -1.55342*^-6, 0.010022, 0.010022}}], Cell[TextData[{ StyleBox["The ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSlant->"Italic"], StyleBox[" notation for this summation is:", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Sum[h f[a + (n - 1)h],{n, 1, 10}]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["Modify these commands (the definition of ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["h", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSlant->"Italic"], StyleBox[ " and the summation above) to find the area estimate given by the 25 \ rectangle approximation. Try a 100 rectangle approximation next. Write your \ estimates below:\n\n Using 10 rectangles we estimate the area to be: \ _____________\n \n Using 25 rectangles we estimate the area to \ be: _____________\n \n \:ffffUsing 100 rectangles we estimate \ the area to be: _____________", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["To automate this process, define ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["h", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSlant->"Italic"], StyleBox[" to be a function of the number of rectangles as follows", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[h];\nh[nrec_] := (b - a)/nrec\n"], "Input", AspectRatioFixed->True], Cell[TextData[ "and the area estimate using rectangles with height taken at their left \ endpoints is"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "leftest[nrec_] := Sum[h[nrec]f[a + (n-1)h[nrec]],{n,1,nrec}]\n"], "Input", AspectRatioFixed->True], Cell[TextData[ "Verify that this function gives the same estimates you found above."], "Text",\ Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Modify the definition of ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["leftest", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" to define a new function ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["rightest", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " that estimates the area of the region using rectangles with height taken \ at the right endpoint. Write your definition here.\n", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Use ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["rightest", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " to obtain area estimates using 10, 25, and 100 rectangles, and write them \ below:\n\n Using 10 rectangles we estimate the area to be: \ _____________\n \n Using 25 rectangles we estimate the area to \ be: _____________\n \n \:ffffUsing 100 rectangles we estimate \ the area to be: _____________", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Do the estimates obtained thus far agree with our insight in Part 0 that \ left-endpoint estimates overestimate the area and right-endpoint estimates \ underestimate it? Explain.\n\n"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "To compute the error in a given estimate of the area of the region we are \ considering, use a special function defined in the IntegralGraphics package: \ ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["error[", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox["estimate", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" gives the error in the estimate ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["estimate", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontSlant->"Italic"], StyleBox[ " to the area of the region. Use this function to compute the errors in \ the following table:", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ " Left endpoint \ Right endpoint\n\nError in 10 rectangle estimate: ____________ \ _____________\n\nError in 25 rectangle estimate: ____________ \ _____________\n\nError in 100 rectangle estimate: ____________ \ _____________"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Have any of our estimates thus far achieved ten decimal place accuracy?"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["At best, how many decimal places are correct?"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["How does the error in ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["leftest", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " change as the\nnumber of rectangles is increased by a factor of ten?", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Based on the information you have, estimate how many\nrectangles must be \ used to obtain ten place accuracy:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Could your computer perform the necessary computation in ten seconds?"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "The error table verifies that the left- and right-endpoint methods over- and \ under-\nestimate respectively. Given that this is the case, how can we \ combine these two estimates to arrive at a better estimate? "], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Part 2: Approximations using Trapezoids"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "One answer to the last question is to average the estimates given by ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["leftest", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["rightest", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ ". Geometrically, this is like replacing the rectangles in Part 1 with \ trapezoids. We can implement this averaging with", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["trap[nrec_] := (leftest[nrec] + rightest[nrec])/2."], "Input", AspectRatioFixed->True], Cell[TextData[ "View this graphically for 10 subdivisions (now trapezoids, not rectangles) \ with"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["trapezoid[f[x], {x, a, b, 10}];"], "Input", AspectRatioFixed->True], Cell[TextData[ "From the plot, does this appear to be a more promising technique? Explain.\n\ \n"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Estimate the area by using ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["trap", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" with ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["n", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSlant->"Italic"], StyleBox["rec", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], StyleBox[ " = 10, 100, 1000. What are the errors in these estimates?\n\n \ Area estimate Error in estimate\n\n\ Using 10 trapezoids: _____________ _______________\n\nUsing 100 \ trapezoids: _____________ _______________\n\nUsing 1000 \ trapezoids: _____________ _______________", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["How does the error of ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["trap", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " change as the number of subdivisions is increased by a factor of ten?\n\n\ Would it be possible to estimate the area to the desired 10 decimal places \ with this method using ten seconds or less of computer time?", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Part 3: Midpoints"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Now define another rectangle method. This time, let the rectangle heights \ be given by the values of the function at the midpoints of the subintervals. \ To see how this will work, use the following command:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["midrect[f[x], {x,a,b,10}]"], "Input", AspectRatioFixed->True], Cell[TextData[ "From the plot, do you think that the midpoint method will provide better or \ worse estimates than a comparable number of trapezoids? Explain.\n"], "Text",\ Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Define a function ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["mid[nrec]", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " to estimate the sum of the areas of these rectangles. Give your \ definition of ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["mid", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" here:\n\n", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Estimate the area by using ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["mid", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" with ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["n", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSlant->"Italic"], StyleBox["rec", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], StyleBox[" = 10, 100, 1000. What are the errors in these estimates?", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "\n Area estimate Error in \ estimate\n\nUsing 10 rectangles: _____________ _______________\n\ \nUsing 100 rectangles: _____________ _______________\n\nUsing \ 1000 rectangles: _____________ _______________"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["How does the error of ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["mid", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " change as the number of subdivisions is increased by a factor of ten?", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Part 4: An Improved Method"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Make a careful comparison of the errors you found using ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["trap", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["mid", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ ". A table like that at the end of Part 1 might be helpful. Find a way to \ combine ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["trap", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"], StyleBox["mid", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " to get better estimates for the desired area. Write a definition for \ your new rule here.\n\n\n\nHow does the error of this method change as the \ subinterval width is decreased by a factor of ten?", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Chicago"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "How many seconds (approximately) does this method take to compute an \ estimate accurate to 10 decimal places? What step size did you use for that \ estimate?"], "Text", Evaluatable->False, AspectRatioFixed->True] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{52, Automatic}, {30, Automatic}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ AVU/IFiQKFD000000V8/009R==0000000P;_@09BfMP0AP1Y06`0I@1^0642HR`0 0V8dl00000020^lP0U;If000000000000000009R;00000000000000000000000 00000000000000000000000000000000\>" ] (*********************************************************************** 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[1711, 51, 478, 8, 70, "Text", Evaluatable->False], Cell[2192, 61, 139, 3, 70, "SmallText", Evaluatable->False], Cell[2334, 66, 128, 3, 70, "Title", Evaluatable->False], Cell[2465, 71, 162, 4, 70, "Text", Evaluatable->False], Cell[2630, 77, 108, 2, 70, "Section", Evaluatable->False], Cell[2741, 81, 93, 2, 70, "Subsection", Evaluatable->False], Cell[2837, 85, 225, 5, 70, "Text", Evaluatable->False], Cell[3065, 92, 92, 1, 70, "Input"], Cell[3160, 95, 89, 2, 70, "Subsection", Evaluatable->False], Cell[3252, 99, 2486, 93, 70, "Text", Evaluatable->False], Cell[5741, 194, 132, 3, 70, "Input"], Cell[5876, 199, 97, 2, 70, "Subsection", Evaluatable->False], Cell[5976, 203, 387, 7, 70, "Text", Evaluatable->False], Cell[6366, 212, 83, 1, 70, "Input"], Cell[6452, 215, 827, 25, 70, "Text", Evaluatable->False], Cell[7282, 242, 83, 1, 70, "Input"], Cell[7368, 245, 390, 7, 70, "Text", Evaluatable->False], Cell[7761, 254, 84, 1, 70, "Input"], Cell[7848, 257, 216, 4, 70, "Text", Evaluatable->False], Cell[8067, 263, 304, 10, 70, "Text", Evaluatable->False], Cell[8374, 275, 109, 2, 70, "Section", Evaluatable->False], Cell[8486, 279, 198, 4, 70, "Text", Evaluatable->False], Cell[8687, 285, 69, 1, 70, "Input"], Cell[8759, 288, 1039, 41, 70, "Text", Evaluatable->False], Cell[9801, 331, 5669, 130, 45, 3043, 92, "GraphicsData", "PostScript", "Graphics", Evaluatable->False], Cell[15473, 463, 431, 16, 70, "Text", Evaluatable->False], Cell[15907, 481, 86, 1, 70, "Input"], Cell[15996, 484, 844, 22, 70, "Text", Evaluatable->False], Cell[16843, 508, 474, 16, 70, "Text", Evaluatable->False], Cell[17320, 526, 90, 1, 70, "Input"], Cell[17413, 529, 160, 4, 70, "Text", Evaluatable->False], Cell[17576, 535, 116, 2, 70, "Input"], Cell[17695, 539, 144, 4, 70, "Text", Evaluatable->False], Cell[17842, 545, 795, 27, 70, "Text", Evaluatable->False], Cell[18640, 574, 730, 21, 70, "Text", Evaluatable->False], Cell[19373, 597, 258, 5, 70, "Text", Evaluatable->False], Cell[19634, 604, 1149, 40, 70, "Text", Evaluatable->False], Cell[20786, 646, 410, 7, 70, "Text", Evaluatable->False], Cell[21199, 655, 149, 4, 70, "Text", Evaluatable->False], Cell[21351, 661, 119, 2, 70, "Text", Evaluatable->False], Cell[21473, 665, 484, 17, 70, "Text", Evaluatable->False], Cell[21960, 684, 184, 4, 70, "Text", Evaluatable->False], Cell[22147, 690, 147, 4, 70, "Text", Evaluatable->False], Cell[22297, 696, 289, 5, 70, "Text", Evaluatable->False], Cell[22589, 703, 117, 2, 70, "Section", Evaluatable->False], Cell[22709, 707, 814, 28, 70, "Text", Evaluatable->False], Cell[23526, 737, 103, 1, 70, "Input"], Cell[23632, 740, 156, 4, 70, "Text", Evaluatable->False], Cell[23791, 746, 84, 1, 70, "Input"], Cell[23878, 749, 155, 4, 70, "Text", Evaluatable->False], Cell[24036, 755, 1162, 36, 70, "Text", Evaluatable->False], Cell[25201, 793, 625, 19, 70, "Text", Evaluatable->False], Cell[25829, 814, 95, 2, 70, "Section", Evaluatable->False], Cell[25927, 818, 285, 5, 70, "Text", Evaluatable->False], Cell[26215, 825, 78, 1, 70, "Input"], Cell[26296, 828, 222, 5, 70, "Text", Evaluatable->False], Cell[26521, 835, 722, 27, 70, "Text", Evaluatable->False], Cell[27246, 864, 864, 31, 70, "Text", Evaluatable->False], Cell[28113, 897, 364, 6, 70, "Text", Evaluatable->False], Cell[28480, 905, 481, 17, 70, "Text", Evaluatable->False], Cell[28964, 924, 104, 2, 70, "Section", Evaluatable->False], Cell[29071, 928, 1394, 48, 70, "Text", Evaluatable->False], Cell[30468, 978, 234, 5, 70, "Text", Evaluatable->False] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)