Approximations to famous mathematical constants

Approximating $e$

We know that $$e^x=\sum_{n=0}^\infty =1+x+\frac{1}{2!}x^2+\frac{1}{3!}x^3+\cdots$$ This provides us with a quickly converging series for $e$: $$e^1=e=1+\frac{1}{2}+\frac{1}{3!}+\frac{1}{4!}+\cdots$$ This is the series that computers and calculators use to compute $e$ and we can use it ourselves as well. See below for a little computer program that computes the partial sums for the series above.

Approximating $\pi$

We know that $\tan(\pi/4)=1$, so \[ 4\arctan(1)=\pi \] Furthermore, we know that for $-1\lt x\leq 1$ we have \[\arctan(x)=\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}x^{2n+1}=1-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\cdots\] so we find that \[\pi=4-\frac{4}{3}+\frac{4}{5}-\frac{4}{7}+\frac{4}{9}+\cdots\] which is a series that behaves comparable to an alternating harmonic series, so it converges (and in fact the partial sums give upper and lower limits on the value), but it converges relatively slowly.
We can do better. With a bit of trigonometry (in particular, the angle summation formulas for $\sin$ and $\cos$) one can prove $$\arctan\frac{1}{2}+\arctan\frac{1}{3}=\arctan\frac{3+2}{2\cdot3-1}=\frac{\pi}{4}$$ so we get $$\pi=4\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)}\left(\frac{1}{2}\right)^{2n+1}+4\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1) }\left(\frac{1}{3}\right)^{2n+1}= \sum_{n=0}^\infty \frac{4(-1)^n}{2n+1} \left(\left(\frac{1}{2}\right)^{2n+1}+\left(\frac{1}{3}\right)^{2n+1}\right) $$ which converges MUCH faster.

Written by Nils Bruin