31  π

31.1 Area of a Circle

We have defined π as the first zero of the sine function - a definition, but have finally developed enough tools to relate it to the area of a circle. This provides a relationship between the modern, rigorous theory of trigonometric functions and the ancient quest of Archimedes to measure the area of the circle.

Indeed, since we have defined area rigorously with integration, we can now make sense of the area of the circle as long as we can express the unit circle as a function. While this is not directly possible, we can take the implicit equation x2+y2=1 and solve for y giving two functions (one for the top half and one for the bottom). Then we can measure the area of the circle as twice the top half, or

Area=2[1,1]1x2

Now we compute this integral with our newfound integration techniques (substitution), and show it equals the half-period of our trigonometric functions in natural units.

Theorem 31.1 2[1,1]1x2=π

Proof. By subsitution, we see that the following two integrals are equal [0,1]1x2=I1(sin(t))2(sin(t)) Where I=[a,b] is the interval such that [sin(a),sin(b)]=[0,1]. Since sin(0)=0 and sin(π/2)=1 we see I=[0,π/2]. Now we focus on simplifying the integrand:

By the Pythagorean identity, 1sin2(t)=cos2(t), thus by , 1sin2(t)=cos2(t)=|cos(t)| and by definition we recall (sint)=cost. Thus [0,π/2]=[0,π/2]|cos(t)|cos(t)=[0,π/2]cos2(t) Where we can drop the absolute value as cos is nonnegative on [0,π/2] (its first zero is at half the period, so π). We can simplify this using the “half angle formula” cos2(x)=(1+cos(2x))/2 [0,π/2]cos2(t)=[0,π/2]1+cos(2t)2 Using the linearity of the integral, this reduces to

[0,π/2]cos2(t)=12[0,π/2]1+12[0,π/2]cos(2t)=π4+12[0,π/2]cos(2t)

The first of these integrals could be immediately evaluated as the integral of a constant, but the second requires us to do another substitution. If u=2t then [0,π/2]cos(2t)=12[0,π]cosu

We recall again that by definition cosu=(sinu), so by the first fundamental theorem

[0,π]cosu=[0,π](sinu)=sinu|[0,π/]

But, sin is equal to 0 both at 0 and π! So after all this work, this integral evaluates to zero. Thus

[0,1]1x2=[0,π/2]cos2t=π4+12[0,π]cos(2t)=π4+0

Now, we are ready to assemble the pieces. Because x2 is an even function so is 1x2, and so its integral over [1,1] is twice its integral over [0,1]. Thus

Area=2[1,1]1x2=4[0,1]1x2=4π4=π

This single result ties together so many branches of analysis, and proves a worthy capstone calculation for the course. However after all this work we shouldn’t let ourselves be satisfied too quickly! Now that we have related the area of a circle to trigonometry, we can hope to use other techniques from analysis to accurately calculate its value.

31.2 Calculating π’s Value

31.2.1 From the Area Integral

Having proven that π is the area of the circle, we may attempt to estimate its value by estimating the integral of 1x2:

π4=[0,1]1x2

Using the evenly spaced partition Pn with n bars of width Δ=1/n and the fact that 1x2 is monotone decreasing on [0,1], we can evaluate this integral as a limit of upper sums:

[0,1]1x2=limU(1x2,Pn)=i=1n1(iΔ)Δ

Simplifying gives an explicit limit of sums to compute:

Example 31.1 The following limit of infinite sums converges to π. π=lim4i=1n1i2n21n=lim4i=1nn2i2n2

This series is difficult to compute because it involves square roots: irrational quantities that we will also have to approximate in order to get a good approximate value for π. It also converges slowly, so there’s many square roots to approximate! Using a computer to help we find

4i=110100i21002.904 4i=110010000i2100003.120 4i=110001000000i210000003.139

31.2.2 From Inverse Trigonometry

One may use the inverse trigonometric functions to get integral representations of π. Perhaps the most natural thought is to use that sin(π/2)=1, so arcsin(1)=π/2 or

π2=arcsin(1)=[0,1]11x2

This integral is improper as the integrand becomes unbounded in a neighborhood of x=1: thus it must be calculated as a limit over intervals [0,t] with t1 which is rather difficult in practice: certainly more involved than the calculation from the area integral above.

Remark 31.1. If we were not bothered by the square roots for our computation-focused goals, one could easily replace the problematic integral above with something avoiding its problems. For instance, since sin(π/4)=1/2, we have

π4=[0,1/2]11x2

But this is much worse in terms of square roots: if you write out a Riemann sum here it’ll be a sum of nested roots, and still more complicated than the estimate from the area integral.

The same trouble plagues the cosine function, but things get much nicer with the tangent. We know that sin and cos are equal when evaluated at π/4, which means their ratio is 1=tanπ/4. Inverting this,

Corollary 31.1 π4=arctan(1)=[0,1]11+x2,dx

This function is integrable (its continuous), so we can compute its value as the limit of any shrinking sequence of Riemann sums. Below is an explicit example, given for evenly spaced partitions sampled at their right endpoints.

Example 31.2 The following infinite series converges to π: π=limn4i=1n11+(iΔ)2Δ=limn4i=1nnn2+i2

This sequence of sums is much better to work with: each term is a rational number, so it can be computed exactly, giving a sequence of better and better rational approximations to π.

4i=11010100+i23.0395 4i=110010010000+i23.13155 4i=1100010001000000+i23.140592 4i=110000001000000(1000000)2+i23.14159165359

This is great - these sums are trivial to do on a computer (I did these in a simple python for loop) and get us an accurate value for π. But we shouldn’t be satisfied just yet! First of all, these sums take a while to converge - we need a thousand terms to get the first two digits after the decimal, and a million to get the first five!

31.2.3 From Series

Power series are much easier to deal with than the limits arising from integrals: to get a better approximation of a power series you keep the terms you have, and just add more whereas to compute better approximate Riemann sums you need to start all over from scratch! Thus its certainly advantageous from a computational perspective to look for series converging to π.

A particularly nice example is given by the arctangent, whose series we computed in to be n0(1)nx2n+12n+1 on the interval (1,1). Since tan(π/4)=1, we can calculate π as π/4=arctan(1), which lies right at the boundary of the interval of convergence. Luckily, this proves not to be an issue

Proposition 31.1 π4=arctan(1)=n0(1)n2n+1

Proof. The arctangent function is continuous on R, so

arctan(1)=arctan(limx1x)=limx1arctan(x)

For x(1,1) the arctangent can be expressed as a power series, so

limx1arctan(x)=limx1n0(1)nx2n+12n+1

This series converges at x=±1 by the alternating series test. Hence, by Abel’s theorem (?thm-pseries-continuous-endpoints) it defines a continuous function on [1,1] and so the limit can be pulled inside:

limx1n0(1)nx2n+12n+1=n0(1)n(limx1x)2n+12n+1=n0(1)n12n+12n+1=n0(1)n12n+1

Putting this all together yields the claim:

π4=arctan(1)=n0(1)n2n+1

This formula is exceedingly beautiful, and worthy of writing out without summation notation to take in

π4=113+1517+19

However, way out here at the endpoint the series converges very slowly. Using a computer to do a little experimenting:

4n=010(1)n2n+1=3.2323 4n=0100(1)n2n+1=3.1549 4n=01,000(1)n2n+1=3.1425

Like the Riemann sum approach, we needed a thousand terms to get the first two decimals right. This problem only occurs as we are evaluating a series at the very boundary of its interval of convergence: we know via comparison that power series converge exponentially quickly within their radius of convergence, so to get better behavior we should seek a point inside (1,1) at which the arctan will give us information aboout π. How do we find such a value? Here’s one clever possibility: we actually realize π/4 as the sum of two different arctangent values:

Proposition 31.2 π4=arctan(12)+arctan(13)

Proof. Let θ=arctan(1/2) and ψ=arctan(1/3). Now use the tangent addition law tan(θ+ψ)=tanθ+tanψ1tanθtanψ to compute θ+ψ:

tan(θ+ψ)=12+1311213=56116=1

Thus, tan(θ+ψ)=1 so θ+ψ=π/4, as claimed.

Now, both 1/2 and 1/3 lie well within the radius of convergence of the arctangent, so we can add the two together to get a formula for π. Since series converge absolutely within their radii of convergence, we can re-arrange terms as we please, even combining the two into a single sum:

Theorem 31.2 π4=k0(1)k(2k+1)22k+1+n0(1)k(2k+1)32k+1 =k0(1)k2k+1(122k+1+132k+1)

This series converges very quickly, as the exponents 22k+1 and 32k+1 in the denominators grow rapidly. Indeed, summing up to N = TWO already gives the first two decimal digits!

(12+13)13(18+127)+15(132+1243)=3.14558

Using up until N=10 terms in this series gives the approximation π3.14159257960635 Which is correct to 7 decimal digits. To get 15 significant digits using 22 terms in this series is enough!

This is truly a marvelous machine we have built - conjuring directly from the lowly geometric series an efficient formula for π.

Example 31.3 Want to be even more clever? In 1796 John Machin showed the following identity:

π4=4arctan(1/5)arctan(1/239)

Note: If you wish to prove this, probably the easiest way is to notice that (5+i)4(239i)=114244(1+i) and use the polar form of complex numbers to get the result. See here: https://people.math.sc.edu/howard/Classes/555c/trig.pdf

This allows you to compute π to five or six decimals without much trouble. Just using the first five terms in the series gives π3.14159268240440 so we are already good to seven decimals. Using nine terms in the series gives you 15 significant digits