Calculating Pi with Integrals

Yahweh

Philosopher
Joined
Apr 7, 2003
Messages
9,006
I've seen some of the interesting summations to calculate the value of pi, but it occurred to me that it would be much easier to calculate pi by finding the area under the curve sqrt(1-x^2) as x goes from -1 to 1, then multiplying the value by 2 (to get the other half of the circle, of course).

SemiCircle.gif


I want to find the area without making reference to trigonometric functions (they implicitly make use of pi, which would defeat the purpose of solving for pi in the first place).

It should be very simple math, but apparently I missing something very fundamental. I cant seem to find the antiderivative of sqrt(1-x^2), what are the steps to taking this antiderivative?

Thanks in advance :)
 
The first step is to realize that for expression p:
sqrt(p) = p^½

So ∫sqrt(1-x)dx = ∫[(1-x)^½]dx

The second step is to realize that for expression t:
∫(t^n)dt = (t^[n+1])/(n+1) + C

I assume that you can take it from here.
 
I'll probably regret this, but....

Yahweh,

The first step is to realize that the way to solve this problem is by trigonmetric substitution. For information on this I direct you to this page:

http://www.sosmath.com/calculus/integration/trigsub/trigsub.html

In this case, the easiest substitution is:

x = sin(a), so dx = cos(a) da.

I'll skip a few steps and tell you that when you evaluate the above expression, it ends up as the integral of:

[cos(a)]^2 da, which is equal to {[1+cos(2a)]/2} da (you can use this link to get this)

http://www.sosmath.com/calculus/integration/powerproduct/powerproduct.html

The problem is that the trigonmetric substitution changes the limits of integration. Instead of integrating from -1 to 1, now we have to integrate from pi/2 to 3pi/2. So the pi unfortunately comes back here, and when you evaluate the expression you are left with pi/2, which is expected but unfortunately not what you are looking for.

What this means is that trying to calculate pi by this method is a little 'circular' (alright, it's late and I couldn't resist the dumb pun)

--E
 
You can't find the indefinite integral of that equation or else you could get pi from a simple equation. I don't know how far you are in Calculus but the best way to find the integral without using trignometric functions is to use Taylor Expansion Series.

You can find the equation here: http://mathworld.wolfram.com/TaylorSeries.html Just use the first equation having a=0 to rewrite sqrt(1-x^2). I believe from there you can find the integral of each term and the sum should equal 1/2 pi.
 
Yahweh said:
...It should be very simple math, but apparently I missing something very fundamental. I cant seem to find the antiderivative of sqrt(1-x^2), what are the steps to taking this antiderivative?...
Antiderivative of sqrt(1-x^2) is:

(x/2)sqrt(1-x^2) + Arcsin(x)/2

Easy to verify, if you remember that the derivative of Arcsin(x) is
1/sqrt(1-x^2)
 
However, he doesn't want to use any trig, whatsoever to solve it, so, I agree, the only choice is to look for a taylor polynomial that works
 
bennator said:
However, he doesn't want to use any trig, whatsoever to solve it, so, I agree, the only choice is to look for a taylor polynomial that works

Taking a 20 term Taylor polynomial of sqrt(1-x^2) and taking 2*(the integral of that from -1 to 1) gives:

3.152564...

So let n go to infinity... ;)
 
(Deleted my masterful dissertation on the subject, because we wanted *no trig*.)

Unfortunately, the antiderivative of sqrt(1-x^2) is going to have that pesky arcsin in it, and you'll have to know what pi is to calculate that.

I guess the Taylor series would be the way to go.
 
I took down my page, but here's the script and the statistics and graph it produces (with the title and axes of the graph edited out to trim the file size)

---
#to estimate the area of a unit circle using random numbers
#the upper right quadrant of a unit circle is inside a square
#and points are uniformly thrown at them
#pi is calculated as pi=4*(circle hits/total)
n<-10000
a<-0
vec<-vector(mode="numeric", length=n)
x<-runif(n)
y<-runif(n)
DistFromOrigin<-sqrt(x^2+y^2)
for (i in 1:n) {
if (DistFromOrigin<1) (a<-a+1)
}
pi<-4*(a/n)
c(n,pi)
#graphs the quarter circle
curve(sqrt(1-x^2),0,1,col="red")
#graphs the points
points(x,y)
title("pi~4*(#points in circle/#total points)")
---

n = 10000
pi = 3.1328
 

Back
Top Bottom