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.
