This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Chapter 2 Limits, Error, Approximation § 2.1 Summation Pi Via Tiling § 2.1 Keeping an Eye on Convergence Pi Via Polygons § 2.3 Rational Approximation* 22/7ths and Other Fractions The constant π is a neverending decimal: 3.14159265358979323846264338327950288419716939937510582097494459230781 64062862089986280348253421170679821480865132823066470938446095505822 31725359408128481117450284102701938521105559644622948954930381964428 81097566593344612847564823378678316527120190914564856692346034861045 43266482133936072602491412737245870066063155881748815209209628292540... In this chapter we compute some more modest approximations. Our first approach is to cover the circle x 2 + y 2 = n 2 with 1by1 “tiles”. If N is the number of tiles that are completely within the circle, then from the approximation πn 2 ≈ N we conclude that π ≈ N/n 2 . In this case the problem of estimating π reduces to a count thetiles problem. We will see that the error goes to zero as n → ∞ . Another approach is to approximate the unit circle with a polygon and regard the polygon area as an approximation to π . For a given n , a good approximating polygon is the regular ngon whose vertices are on the unit circle. This area will underestimate π . If we use the regular ngon whose edges are tangent to the unit circle, then its area will be an overestimate of π . In either case the error goes to zero as n → ∞ . Finally, we look to see how close we can get to π with a fraction p/q subject to the constraint that both p and q are less than some prescribed value M . The quotient 22/7 is a well known approximation in this regard. These πapproximation examples point to how we can cope with “infinities” when we compute. There isn’t enough time to compute a neverending decimal. And no computer has enough memory to store π exactly. Nevertheless, we are able to compensate for these shortfalls through intelligent approximation. 1 Example 2.1 Pi Via Tiling % Script Eg2_1 % Estimate Pi by tiling a circle. % Enter the circle radius... clc n = input(’Enter n: ’) % Tile just the first quadrant, then multiply by four. N1 = 0; for k = 1:n1 % The number of uncut tiles in row k... s = floor(sqrt(n^2  k^2)); N1 = N1 + s; end % Estimate pi... rho_n = 4*N1/n^2; clc disp(sprintf(’n = %d’,n)) disp(sprintf(’MyPi = %12.8f’,rho_n)) disp(sprintf(’Error = %12.8f’,abs(pirho_n))) Sample Output: n = 1000000 MyPi = 3.14158865 Error = 0.00000400 2 2.1. Summation 3 2.1 Summation Problem Suppose n is a positive integer and we trace the circle x 2 + y 2 = n 2 onto graph paper. For the case n = 10, Figure 2.1 is what we would obtain with the help of some scissors. Note that the area of the disk is πn 2 and that each “uncut” tile has unit area. If there are Figure 2.1: Tiling the Circle x 2 + y 2 = n 2 , ( n = 10) N uncut tiles, then we conclude that πn 2 ≈ N since the uncut tiles almost cover the disk....
View
Full
Document
This note was uploaded on 02/15/2008 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell University (Engineering School).
 Fall '07
 FAN/VANLOAN

Click to edit the document details