# Tag Archives: pi

## Computing $\pi$

This note was originally written in the context of my fall Math 100 class at Brown University. It is also available as a pdf note.

While investigating Taylor series, we proved that
\label{eq:base}
\frac{\pi}{4} = 1 – \frac{1}{3} + \frac{1}{5} – \frac{1}{7} + \frac{1}{9} + \cdots

Let’s remind ourselves how. Begin with the geometric series

\frac{1}{1 + x^2} = 1 – x^2 + x^4 – x^6 + x^8 + \cdots = \sum_{n = 0}^\infty (-1)^n x^{2n}. \notag

(We showed that this has interval of convergence $\lvert x \rvert < 1$). Integrating this geometric series yields

\int_0^x \frac{1}{1 + t^2} dt = x – \frac{x^3}{3} + \frac{x^5}{5} – \frac{x^7}{7} + \cdots = \sum_{n = 0}^\infty (-1)^n \frac{x^{2n+1}}{2n+1}. \notag

Note that this has interval of convergence $-1 < x \leq 1$.

We also recognize this integral as

\int_0^x \frac{1}{1 + t^2} dt = \text{arctan}(x), \notag

one of the common integrals arising from trigonometric substitution. Putting these together, we find that

\text{arctan}(x) = x – \frac{x^3}{3} + \frac{x^5}{5} – \frac{x^7}{7} + \cdots = \sum_{n = 0}^\infty (-1)^n \frac{x^{2n+1}}{2n+1}. \notag

As $x = 1$ is within the interval of convergence, we can substitute $x = 1$ into the series to find the representation

\text{arctan}(1) = 1 – \frac{1}{3} + \frac{1}{5} – \frac{1}{7} + \cdots = \sum_{n = 0}^\infty (-1)^n \frac{1}{2n+1}. \notag

Since $\text{arctan}(1) = \frac{\pi}{4}$, this gives the representation for $\pi/4$ given in \eqref{eq:base}.

However, since $x=1$ was at the very edge of the interval of convergence, this series converges very, very slowly. For instance, using the first $50$ terms gives the approximation

\pi \approx 3.121594652591011. \notag

The expansion of $\pi$ is actually

\pi = 3.141592653589793238462\ldots \notag

So the first $50$ terms of \eqref{eq:base} gives two digits of accuracy. That’s not very good.

I think it is very natural to ask: can we do better? This series converges slowly — can we find one that converges more quickly?

| | 1 Comment

## Towards an Expression for pi II

Continuing from this post

We start with $\cos( \dfrac{\xi}{2})\cos(\dfrac{\xi}{4}) … \cos(\dfrac{\xi}{2^n})$. Recall the double angle identity for sin: $\sin 2 \theta = 2\sin \theta \cos \theta$. We will use this a lot.

Multiply our expression by $\sin(\dfrac{\xi}{2^n})$. Then we have

$\cos( \dfrac{\xi}{2})\cos(\dfrac{\xi}{4}) … \cos(\dfrac{\xi}{2^n})\sin(\dfrac{\xi}{2^n})$

Using the double angle identity, we can reduce this:

$= \dfrac{1}{2} \cos( \dfrac{\xi}{2})\cos(\dfrac{\xi}{4}) … \cos(\dfrac{\xi}{2^{n-1}})sin(\dfrac{\xi}{2^{n-1}}) =$
$= \dfrac{1}{4} \cos( \dfrac{\xi}{2})\cos(\dfrac{\xi}{4}) … \cos(\dfrac{\xi}{2^{n-2}})\sin(\dfrac{\xi}{2^{n-2}}) =$
$…$
$= \dfrac{1}{2^{n-1}}\cos(\xi / 2)\sin(\xi / 2) = \dfrac{1}{2^n}\sin(\xi)$

So we can rewrite this as

$\cos( \dfrac{\xi}{2})\cos(\dfrac{\xi}{4}) … \cos(\dfrac{\xi}{2^n}) = \dfrac{\sin \xi}{2^n \sin( \dfrac{\xi}{2^n} )}$ for $\xi \not = k \pi$

Because we know that $lim_{x \to \infty} \dfrac{\sin x}{x} = 1$, we see that $lim_{n \to \infty} \dfrac{\xi / 2^n}{\sin(\xi / 2^n)} = 1$. So we see that

$\cos( \dfrac{\xi}{2})\cos(\dfrac{\xi}{4}) … = \dfrac{\xi}{\xi}$
$\xi = \dfrac{\sin(\xi)}{\cos(\dfrac{\xi}{2})\cos(\dfrac{\xi}{4})…}$

Now we set $\xi := \pi /2$. Also recalling that $\cos(\xi / 2 ) = \sqrt{ 1/2 + 1/2 \cos \xi}$. What do we get?

$\dfrac{\pi}{2} = \dfrac{1}{\sqrt{1/2} \sqrt{ 1/2 + 1/2 \sqrt{1/2} } \sqrt{1/2 + 1/2 \sqrt{ 1/2 + 1/2 \sqrt{1/2} …}}}$

This is pretty cool. It’s called Vieta’s Formula for $\dfrac{\pi}{2}$. It’s also one of the oldest infinite products.

## Towards an Expression for Pi

I have stumbled across something beautiful! I haven’t the time to write of it now, but I can allude to it without fear. Eventually, I will reproduce a very fascinating formula for $\pi$.

But first:

Consider the following expression:

$\cos \dfrac{\xi}{2} \cos \dfrac{\xi}{4} \cos \dfrac{\xi}{8} … \cos \dfrac{\xi}{2^n}$

It can be simplified into a very simple quotient of $sin$ in terms of $\xi$.

Posted in Expository, Mathematics | Tagged , , | 1 Comment

## An even later pi day post

In my post dedicated to pi day, I happened to refer to a musical interpretation of pi. This video (while still viewable from the link I gave) has been forced off of YouTube due to a copyright claim. The video includes an interpretation by Michael Blake, a funny and avid YouTube artist. The copyright claim comes from Lars Erickson – he apparently says that he created a musical creation of pi first (and… I guess therefore no others are allowed…). In other words, it seems very peculiar.

I like Vi Hart’s treatment of the copyright claim. For completeness, here is Blake’s response.

As this blog started after March 14th, it hasn’t paid the proper amount of attention to $\pi$. I only bring this up because I have just been introduced to Christopher Poole’s intense dedication to $\pi$. It turns out that Christopher has set up a $\pi$-phone, i.e. a phone number that you can call if you want to hear $pi$. It will literally read out the digits of $\pi$ to you. I’ve only heard the first 20 or so digits, but perhaps the more adventurous reader will find out more. The number is 253 243-2504. Call it if you are ever in need of some $\pi$.
Of course, I can’t leave off on just that – I should at least mention two other great $\pi$-day attractions (late as they are). Firstly, any unfamiliar with the $\tau$ movement should read up on it or check out Vi Hart’s pleasant video. I also think it’s far more natural to relate the radius to the circumference rather than the diameter to the circumference (but it would mean that area becomes not as pleasant as $\pi r^2$).
Finally, there is a great musical interpretation and celebration of $\pi$. What if you did a round (or fugue) based on interpreting each digit of $\pi$ as a different musical note? Well, now you can find out!
Until $\tau$ day!