MAPLE output for calculating Pi using the area under the curve y=2*sqrt(1-x^2).

First, we know that the area under the curve y=sqrt(1-x^2) from x=-1..1 is Pi/2, because it is simply half of the unit circle.

> int(2*sqrt(1-x^2), x=-1..1); evalf(%);

Pi

3.141592654

> with(student):

If we want to estimate Pi, we can use the rectangle method with increasing numbers of rectangles in order to get better approximations.

> leftbox(2*sqrt(1-x^2), x=-1..1, 10);

[Maple Plot]

> evalf(leftsum(2*sqrt(1-x^2), x=-1..1, 10));

3.037048828

> rightbox(2*sqrt(1-x^2), x=-1..1, 30);

[Maple Plot]

> evalf(rightsum(2*sqrt(1-x^2), x=-1..1, 30));

3.121391413

> middlebox(2*sqrt(1-x^2), x=-1..1, 50);

[Maple Plot]

We can also take a look at roughly how much error there is in each of our calculations.

> evalf(middlesum(2*sqrt(1-x^2), x=-1..1, 50)); evalf(Pi-%);

3.144340711

-.2748057e-2

> evalf(middlesum(2*sqrt(1-x^2), x=-1..1, 100)); evalf(Pi-%);

3.142565552

-.972898e-3

> evalf(middlesum(2*sqrt(1-x^2), x=-1..1, 1000)); evalf(Pi-%);

3.141623456

-.30802e-4

> evalf(middlesum(2*sqrt(1-x^2), x=-1..1, 10000)); evalf(Pi-%);

3.141593628

-.974e-6

Using 100,000 rectangles, we get an approximation of Pi that is correct to the seventh place.

> evalf(middlesum(2*sqrt(1-x^2), x=-1..1, 100000)); evalf(Pi-%);

3.141592684

-.30e-7