Calculate $\pi$ precisely using integrals?

24k Views Asked by At

This is probably a very stupid question, but I just learned about integrals so I was wondering what happens if we calculate the integral of $\sqrt{1 - x^2}$ from $-1$ to $1$.

We would get the surface of the semi-circle, which would equal to $\pi/2$.

Would it be possible to calculate $\pi$ this way?

6

There are 6 best solutions below

1
On BEST ANSWER

In fact, the indefinite integral of $\sqrt{1-x^2}$ is $\frac12(x\sqrt{1-x^2} + \arcsin{x}) + C$, so you are actually "using" $\pi$ in the arcsine if you solve this somehow symbolically, as

$$\int_{-1}^1 \sqrt{1-x^2}\,\mathrm dx = \arcsin 1 = \frac{\pi}{2}$$

5
On

Yes, this integral converges to $\pi/2$. If you evaluate the integral numerically, with your favorite integration scheme, you can compute digits of $\pi$.

0
On

If you want to calculate $\pi$ in this way, note that the expansion of

$$\sqrt{1-x^2} = 1 - \sum_{n=1}^\infty \frac{(2n)!}{(2n-1)2^{2n}(n!)^2} x^{2n} $$

and so if we integrate term by term and evaluate from $-1$ to $1$ we will end up with the following formula for $\pi$:

$$ \pi = 4 \left\lbrace 1 - \sum_{n=1}^\infty \frac{(2n)!}{(4n^2-1)2^{2n}(n!)^2} \right\rbrace .$$

0
On

You can also refer this thread:

$$ \int\limits_{0}^{1} \frac{x^{5}(1-x)^{6}(197+462x^{2})}{530(1+x^{2})} + \frac{333}{106}= \pi$$

0
On

The answer is more no than yes.

There are plenty definite integrals giving an answer which is a function of $\pi$. In particular yours,

$$2\int_{-1}^1\sqrt{1-x^2}\,dx=\left.\left(x\sqrt{1-x^2}+\arcsin(x)\right)\right|_{-1}^1=\pi.$$

But this does not bring you any closer to the numerical value of $\pi$.

There are many ways to obtain a desired number of decimals of $\pi$, using finite approximations of various sequences, series or integrals (this is a broad topic). In particular, you can estimate the above area using the Newton-Cotes numerical method or similar, but this will be very slow and is not used in practice. You can also evaluate the antiderivative at the bounds (again using a numerical approximation such as a truncated Taylor series) but it is also dead slow in this particular setting.

0
On

As others have replied, yes, $\pi$ can be calculated that way using numerical integration or from an integrated infinite series. This is to provide a tip to improve the calculation's performance. Both the numerical and series methods suffer from slow convergence toward the correct value if integrated from -1 to 1, perhaps for different reasons. The infinite slopes at -1 and 1 are apparently problematic for the numerical methods and the infinite series, being an expansion around zero, performs poorly at those extremes. Both methods converge much faster if we integrate from 0 to 0.5. Those limits give you a 30 degree slice of the circle plus a 30 degree right triangle below the slice whose area must be subtracted out before multiplying by 12 to get the approximation to $\pi$.

The series method performs best. Starting with the series given by Derek Jennings, but integrating the terms only from 0 to 0.5, then doing the subtraction and multiplication, gives the following formula.

$\pi = 12 \left\lbrace 0.5 - \sum_{n=1}^\infty \frac{(2n)!}{(4n^2-1)2^{4n+1}(n!)^2} - \frac{ \sqrt{3}}{8} \right\rbrace .$

Sample results follow given as (-1 to 1, 0 to 0.5) carried out to the first incorrect digit. For n=1, (3.3, 3.15). For n=5, (3.17, 3.141595). For n=15, (3.148, 3.14159265359). I believe you will find a similarly dramatic improvement if you try the same approach using a numerical integration formula, such as Simpson's rule.