You are on page 1of 5

# Pi Through Calculus

So you want to calculate pi the "real" way, just as the great Gottfried Wilhelm Leibniz did
in 1674? Hold on tight, here comes some calculus:

## Differentiation and Integration in a Nutshell

The derivative of a function is an equation for the tangent line at any value of x for which
that function is defined. Here is a technical explanation and formula:

The limit definition comes from the formula for the slope of a line, the classic "change in
vertical/change in horizontal." Here, the change in horizontal distance is approaching 0.
Fortunately, there are simpler rules for finding derivatives of specific functions.

The very first thing to be learned from the limit definition, however, is that the derivative
of any constant is 0. This is because the line y=c, such as y=4 or y=9, has no vertical
change and therefore no slope. So, if you see a constant that is not multiplied by a variable,
know that its derivative is 0.

The most important rule for approximating pi is the Power Rule. The Power Rule states
that the derivative of the function x^n is nx^(n-1). We represent "the derivative of" with the
letters "d/dx." In symbols:

## The other rule to bear in mind is the Constant Multiple Rule:

This means that, while the derivative of just any old number is 0, if it is multiplied by a
function, the constant stays multiplied by the function's derivative when that derivative is
taken. This applies especially to the number -1. For example, the derivative of -x^2 is
-1(2x).

So what's the derivative of -2x-5? We know that the derivative of 5 is 0, and by the
Constant Multiple rule, the derivative of -2x is -2 times the derivative of x. By the Power
Rule, the derivative of x is 1. Therefore, the derivative of -2x-5 is just -2!

The opposite, inverse process is called integration. The integral of a function is the function
whose tangent line is that of the original function, but it is also actually the area under its
graph, bounded by it and the x-axis and limits of integration. This is summarized as
follows:

Without plugging in any limits of integration, the integral of a function is its antiderivative.
Yes, that's right, the differentiation process can be reversed. The power rule for integrals
states that the antiderivative of x^n is x^(n+1)/(n+1).

Without limits of integration, there is a constant C in the antiderivative, because, when you
take the derivative of the antiderivative to get what you started with, the C disappears, as
the derivative of any constant by itself is 0.

What about those limits of integration? Simply plug in the top limit, plug in the bottom
limit, and then subtract the second quantity from the first. This is illustrated in the
following example:
Yes, now even you can do what those Calculus kids are always babbling about. Not only
that, in just a moment you will be able approximate pi using calculus- a topic unexplored
until Calculus II! But first, more vocabulary.

## The Infinite Series

A series is a sum of terms related by a general formula. Here is a typical geometric series:

A geometric series has a common ratio. (-X), that is, -1 times x, is the ratio between each
term in the above series. To find the sum of a series, we use the following formula:

## The sum of the above series is therefore

This means that if you plug in 1 for x, the series will converge to 1/(1+1), or 1/2.

Now let's put it all together. Recall the series we were just discussing. What if you wanted
to find a series that converged to the following:

Notice the striking resemblence to the sum found above. In fact, it is identical, except that
"x-squared" is plugged in for x. For the series expansion, we do the same:
Doing the Inverse Trig Jig

Recall that the function arctan(x) is the inverse tangent function, also denoted tan^-1(x).
This means "the angle whose tangent is x," or "the angle in a triangle whose opposite
side/adjacent side" as in the following diagram:

## In calculus, the angle x is always measured in radians. 1 radian is pi/180 degrees. If a 45

degree angle has a tangent of 1, pi/4 radians also has a tangent of 1. This means that arctan
(pi/4)=1.
Got it? Good. Now, let's put our knowledge of Calculus, Series, and Trigonometry together
to get our favorite number.

## Integrating the Series

Thanks to Newton, Leibniz, and the other calculus greats, we know that the antiderivative,
without limits of integration, of 1/(1+x^2) is arctan(x) + a constant, because the derivative
of any constant by itself is 0. However, we want just plain old arctan(x), so we will
integrate from 0 to x. This means that

Above, we found a series expansion for the expression under the integrand. If we integrate
this series term by term, from 0 to x so that the bottom limit will have no effect, we will
have a series for arctan(x). Surprisingly, all that is needed is the power rule. Just add 1 to
each exponent and divide by that number. Remember that 1 is actually x to the 0 power and
don't change those plus and minus signs! Because of these alternating signs, however, the (-
1)^n factor does not change. The technical reason for this is the constant multiple rule,
because -1 is just a number. Therefore, the general term will look a little funky:

We now have a series for arctan(x). This is called the Gregory-Leibniz series because
James Gregory discovered it first in 1671, but the infamous Leibniz found and published it
in 1674, plus the infinite series for pi, which we will find now. You see, if we plug in 1 to
the Gregory-Leibniz, the series will converge to arctan(1)=pi/4. But we wanted pi! Well,
just multiply the whole thing by 4 and we've got it!

The more terms you add, the closer you get to pi. Of course, only an infinite number of
terms would add up to pi exactly, but pi is an infinite, transcendental number and can only
be approached through approximation for this reason.