Chap2 - Chapter 2 Limits and Error 2.1 Pi via Tiling...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 2 Limits and Error 2.1 Pi via Tiling Summation 2.2 Pi via Polygons Sequences The number π is a neverending decimal: 3.141592653589793238462643383279502884197169399375105820974. .. 944592307816406286208998628034825342117067982148086513282. .. 306647093844609550582231725359408128481117450284102701938. .. 521105559644622948954930381964428810975665933446128475648. .. 233786783165271201909145648566923460348610454326648213393. .. In this chapter we compute more modest approximations using two di f erent ideas. Our f rst approach is to cover the circle x 2 + y 2 = n 2 with 1-by-1 “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-the-tiles problem. We will see that the error goes to zero as n →∞ . Alternatively, we can approximate the unit circle with a polygon and regard the polygon area as an approximation to π .F o rag i v e n n , a good approximating polygon is the regular n -gon whose vertices are on the unit circle. This area will underestimate π .I fw eu s eth er e gu l a r n -gon whose edges are tangent to the unit circle, then its area will be an overestimate of π . The “inner” and “outer” polygon areas converge to π as n and the di f erence between the two estimates bounds the error. These π -approximation examples illustrate how iteration can be used to ap- proximate limits. Indeed, it is through iteration that we are able to bridge the gap between the discrete ( f nite) world of digital computing and the continuous (in f nite) world of the calculus. Integrals and derivatives give way to summations and divided di f erences. In many ways, computational science and engineering is all about choosing n . Hardware limitations and economic constraints motivate the search for better algorithms, i.e., methods that run quicker because n does not have to be quite so large. Mathematical intuition and analysis is required to assess the di f erence between what is computed and “the real thing.” 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Chapter 2. Limits and Error 2.1 Pi Via Tiling Problem Statement Suppose n is a positive integer and we draw the circle x 2 + y 2 = n 2 on graph paper that has 1-by-1 squares. 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 Figure 2.1. Tiling the Circle x 2 + y 2 = n 2 ,( n = 10) each “uncut” tile has unit area. If there are N uncut tiles, then we conclude that π n 2 N since the uncut tiles almost cover the disk. Write a script that inputs an integer n and displays the π -approximation ρ n = N n 2 together with the error | ρ n π | . Program Development The f rst thing to observe is that by symmetry, each quadrant has exactly the same number of uncut tiles. Thus, we need only count the number uncut tiles in the f rst quadrant as displayed by Figure 2.2. If N 1 is the number of uncut tiles in the f rst quadrant, then ρ n =4 N 1 /n 2 . To compute N 1 we sum the number of uncut tiles that are located in each horizontal row. Referring to Figure 2.2, we see that there are nine uncut tiles in row 1, nine uncut tiles in row 2, etc. For general n ,wemayproceedasfo l lows :
Background image of page 2
2.1. Pi Via Tiling 3 row 1 row 2 row 3 row 4 row 5 row 6 row 7 row 8 row 9 row 10 Figure 2.2.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/30/2008 for the course CS 100 taught by Professor Fan/vanloan during the Spring '07 term at Cornell University (Engineering School).

Page1 / 12

Chap2 - Chapter 2 Limits and Error 2.1 Pi via Tiling...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online