Calculate $\pi$ precisely using integrals? 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?
 A: 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}$$
A: Yes, this integral converges to $\pi/2$. If you evaluate the integral numerically, with your favorite integration scheme, you can compute digits of $\pi$.
A: 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 .$$
A: You can also refer this thread:


*

*Is there an integral that proves $\pi > 333/106$?
$$ \int\limits_{0}^{1} \frac{x^{5}(1-x)^{6}(197+462x^{2})}{530(1+x^{2})} + \frac{333}{106}= \pi$$
A: There is one more that is not necessarily an integral but is interesting nonetheless $\tan^{-1} x=x-\frac{x^3}{3}+\frac{x^5}{5}...\frac{(-1)^{n}x^{2n+1}}{2n+1}$ so $\pi=4\tan^{-1} 1=4\left (1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}...\right )=$ $4\sum_{n=0}^{\infty}\frac{(-1)^{n}}{2n+1}$ but as an integral... $4\int_{0}^{1}\frac{1}{1+x^2}\text{d}x=\pi$
A: 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.
A: 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.
A: Want to calculate $PI$ through methods of Calculus?

Here are the steps to follow:


*

*First, we need to calculate the distance of a line

*Then we need to geometrically look at the graph of any arbitrary curve

*From there, we can assign points and derive equations to approximate individual line segments between two points with the same $dx$ value.

*After this we will algebraically manipulate the distance formula into a form with respect to $dx$.

*Now we need to apply the Mean Value Theorem to our modified distance formula.

*Next we'll use Summations to approximate the length of that curve.

*Once we have our Summation in the form we want; we can replace it with a Riemann Integral.

*After that, we need to gather some information about $pi$ and relate it to our Reimann Integral.

*We can find the lower and upper bounds quite easily from the unit circle.

*We can use the general equation of the circle that is fixed at the origin $(0,0)$

*Here we need to find $y$ then we can convert it to a function $f(x)$.

*Before we can use it, we first need to find its derivative.

*Once we have the derivative we can plug it into our Integral.

*Finally, we can go through the steps of Integration and evaluate it and see that we do in fact end up with $pi$.



To calculate the length of a line we can use the Distance Formula or basically the Pythagorean Theorem: $$L = \sqrt{\left(x_2 - x_1\right)^2 + \left(y_2 - y_1\right)^2}$$
This is simple for a straight line, so how do we go about finding the length of a curved line?

Take a look at the following graph of an arbitrary curved defined by some function $f(x)$.

The graph above shows the formula for finding the approximate length of each of the line segments $P_{i-1}P_i$. We can approximate the total length of the curve through summation by the following formula.
$$L\approx\sum_{i=1}^n \lvert{P_{i-1}P_i}\rvert$$
We can write the distance formula as:
$$\lvert P_{i-1}P_i\rvert = \sqrt{\left(\Delta x\right)^2 + \left(\Delta y\right)^2}$$
We know that $\Delta x = x_i-x_{i-1}$ and $\Delta y = y_i-y_{i-1}$.
However, we know that for every $\Delta x$ its length doesn't change, but for every $\Delta y$ it depends on $\Delta x$.
Let $\Delta y_i = y_i-y_{i-1}$ and the distance formula now becomes:
$$\lvert P_{i-1}P_i\rvert = \sqrt{\left(\Delta x\right)^2 + \left(\Delta y_i\right)^2}$$
With the distance formula written in this form we can now use the Mean Value Theorem show below:

Therefore:
$$f'\left(x_i^*\right) = \frac{\Delta y_i}{\Delta x}$$
$$\Delta y_i = f'\left(x_i^*\right)\Delta x$$
Now the distance formula becomes:
$$ = \sqrt{\left(\Delta x\right)^2 + \left(f'\left(x_i^*\right)\Delta x\right)^2}$$
$$ = \sqrt{\left(\Delta x\right)^2 + \left[1 + \left[f'x_i^*\right]^2\right]}$$
Since $\Delta x$ is positive
$$ = \Delta x\sqrt{1 + \left(f'\left(x_i^*\right)\right)^2}$$
$$ = \sqrt{1 + \left(f'\left(x_i^*\right)\right)^2}\Delta x$$
Where this calculates the length of a single line segment based on $\Delta x$.
Since this summation
$$L\approx\sum_{i=1}^n \lvert P_{i-1}P_i\rvert$$
is an approximation of all of the line segments, can we do better than this?
Yes, we can! We can apply limits!

We can now apply limits to the number of line segments $\left(n\right)$
By taking the limits we can now write our length formula as:
$$L = \lim\limits_{n \to \infty}\sum_{i=1}^n\sqrt{1 + \left[f'\left(x_i^*\right)\right]^2}\Delta x$$
The above is a Riemann Integral therefore:
$$ = \int_a^b\sqrt{1+\left(f'\left(x\right)\right)^2}dx$$
This will give us an accurate length of a curve by a given function $f\left(x\right)$ based on its derivative $f'\left(x\right)$.
We can use this to accurately calculate $\pi$.

Before using the above to calculate $\pi$ we need to consider what $\pi$ is. We know that the circumference of a circle is defined by $c = 2\pi r$. We can let $r = 1$. This will simply give us $2\pi$ for the circumference of the Unit Circle.
We need a function for the curve to use in our integral above. We know that the arc length of the full circle is $2\pi$ so we know that $\frac{1}{2}$ of this will be $\pi$ which is what we are looking for. The equation of an arc length is $s = r\theta$. We know that $r = 1$ and $\theta = \pi$ radians. This doesn't help us with the above equation. We need two points $a$ and $b$.
There are two properties about the unit circle that we can use here. First, we know that the diameter of the circle along the $x-axis$ contains the points $\left(1,0\right)$ and $\left(-1,0\right)$. We also know that a straight line has an angle of $180°$ which is $\pi$ radians.This is nice an all but we need a function.
We know that the general equation of a circle is defined as
$$\left(x-h\right)^2 + \left(y-k\right)^2 = r^2$$
where $\left(h,k\right)$ is the center point to the circle. We are going to fix the unit circle at the origin $\left(0,0\right)$. This will give us
$$x^2 + y^2 = r^2$$
which is basically a form of our Distance Formula or the Pythagorean Theorem that we started with. So how does this help us?
It's quite simple, we know that the radius of the unit circle is $(1)$.
We can set this in our equation above. $x^2 + y^2 = (1)^2$ which simplifies to $x^2 + y^2 = 1$. Since we need a function with respect to $x$, we can solve this equation for $y$.
$$x^2 + y^2 = 1$$
$$-x^2      = -x^2$$
$$      y^2 = 1-x^2$$
and since $y^2$ will result in a $+$ value we can just simply take the square root of both sides
$$y=\sqrt{1-x^2}$$
then convert it to a function of $x$
$$f(x)=\sqrt{1-x^2}$$
Now we are ready to use it, except for one more step. The integral above requires the derivative of the curve that we need so we need to find the derivative of the above function.
$$f'\left(x\right) = \frac{d}{dx}\left[\sqrt{1-x^2}\right]$$
$$ = \frac{1}{2} \left(1-x^2\right)^{\frac{1}{2}-1}*\frac{d}{x}\left[1-x^2\right]$$
$$ = \cfrac{\frac{d}{dx}\left[1\right] - \frac{d}{dx}\left[x^2\right]}{2\sqrt{1-x^2}}$$
$$ = \cfrac{0-2x}{2\sqrt{1-x^2}}$$
$$ = -\cfrac{x}{\sqrt{1-x^2}}$$
Now that we have our derivative with respect to $x$ and we know the $x$ values from the two points are $1$ and $-1$ we can use these in our integral.
$$\pi = \int_{-1}^1\sqrt{1+\left(f'\left(x\right)\right)^2}dx$$
$$\pi = \int_{-1}^1\sqrt{1+\left(\cfrac{-x}{\sqrt{1-x^2}}\right)^2}dx$$
Now we can solve - evaluate our integral.
Problem:
$$\arcsin(x) + C$$
Rewrite/simplyfy
$$ = \int\sqrt{\cfrac{x^2}{1-x^2}+1}dx$$
This is standard integral:
$$ = \arcsin(x)$$
The Problem is solved:
$$\int\cfrac{1}{\sqrt{1-x^2}}dx$$
$$ i\ln\left(\left|\sqrt{x^2-1}+x\right|\right) + C$$
And this approximates $\pi$ with a value of $3.141592653589793$
Here's a graph of the approximate integral since computers can not perform infinite limits.

