You know about the tangent function, tan(x). If you draw a right triangle, the tangent is the ratio of the two sides which comprise the right angle. If the angle between the long sides and each of the short sides is 45 degrees, then clearly the two short sides have the same length. That means the tangent of 45 degrees is 1.

Now the tangent function has an inverse, which we call the arctangent. It’s our Sunday Function, and it looks like this:

In mathematics we never use degrees as a measurement of angle, we use radians. There’s 2π radians per 360 degrees, and so a 45 degree angle is equal to π/4 radians. And since the tangent of 45 degrees is 1, the arctangent of 1 must be 45 degrees. In radians, arctan(1) = π/4.

Like all analytic functions, the arctangent function can be expanded in terms of a power series, which in this case takes the following form:

Plug into that the fact that with x = 1, arctan(1) = π/4 and we get:

So, if you add up the reciprocals of the odd integers with negative signs inserted appropriately and multiply the result by 4, you’ll get pi. Clearly you can’t actually add up an infinite number of fractions, but the more you include the closer you’ll get. It’s an interesting example of pi cropping up some place in mathematics that has no clear relationship to circles at all. It happens a truly surprising number of times.

Incidentally, you wouldn’t want to use this series to compute a large number of digits of pi. It closes in on pi very slowly and so you have to calculate the series out to a tremendous distance in order to get reasonable accuracy. In the real world there’s more complicated but much more quickly converging series that are used to actually find millions of digits worth of pi.