Tag Archives: pi

Computing pi with tools from Calculus

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
\begin{equation}\label{eq:base}
\frac{\pi}{4} = 1 – \frac{1}{3} + \frac{1}{5} – \frac{1}{7} + \frac{1}{9} + \cdots
\end{equation}
Let’s remind ourselves how. Begin with the geometric series
\begin{equation}
\frac{1}{1 + x^2} = 1 – x^2 + x^4 – x^6 + x^8 + \cdots = \sum_{n = 0}^\infty (-1)^n x^{2n}. \notag
\end{equation}
(We showed that this has interval of convergence $\lvert x \rvert < 1$). Integrating this geometric series yields
\begin{equation}
\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
\end{equation}
Note that this has interval of convergence $-1 < x \leq 1$.

We also recognize this integral as
\begin{equation}
\int_0^x \frac{1}{1 + t^2} dt = \text{arctan}(x), \notag
\end{equation}
one of the common integrals arising from trigonometric substitution. Putting these together, we find that
\begin{equation}
\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
\end{equation}
As $x = 1$ is within the interval of convergence, we can substitute $x = 1$ into the series to find the representation
\begin{equation}
\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
\end{equation}
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
\begin{equation}
\pi \approx 3.121594652591011. \notag
\end{equation}
The expansion of $\pi$ is actually
\begin{equation}
\pi = 3.141592653589793238462\ldots \notag
\end{equation}
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?

(more…)

Posted in Brown University, Expository, Math 100, Mathematics, Teaching | Tagged , , , | Leave a comment

Towards an Expression for pi II

Continuing from this post

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

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

$latex \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:

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

So we can rewrite this as

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

Because we know that $latex 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

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

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

$latex \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 $latex \dfrac{\pi}{2}$. It’s also one of the oldest infinite products.

Posted in Expository, Math.REC, Mathematics | Tagged , , , | Leave a comment

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 $latex \pi$.

But first:

Consider the following expression:

$latex \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 $latex sin$ in terms of $latex \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.

Posted in Humor, Story | Tagged , , | Leave a comment

A late pi day post

As this blog started after March 14th, it hasn’t paid the proper amount of attention to $latex \pi $. I only bring this up because I have just been introduced to Christopher Poole’s intense dedication to $latex \pi $. It turns out that Christopher has set up a $latex \pi $-phone, i.e. a phone number that you can call if you want to hear $latex pi $. It will literally read out the digits of $latex \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 $latex \pi $.

Of course, I can’t leave off on just that – I should at least mention two other great $latex \pi $-day attractions (late as they are). Firstly, any unfamiliar with the $latex \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 $latex \pi r^2 $).

Finally, there is a great musical interpretation and celebration of $latex \pi $. What if you did a round (or fugue) based on interpreting each digit of $latex \pi$ as a different musical note? Well, now you can find out!

Until $latex \tau $ day!

Posted in Mathematics, Story | Tagged , | 1 Comment