8
$\begingroup$

Infinite series are challenging (even when you know it)! I describe some background before asking my question(s).

A programming assignment asked to use an abstraction called product to verify the following approximation of $\pi$:

$$ \frac{\pi}{4}=\frac{2\cdot 4\cdot 4\cdot 6\cdot 6\cdot 8\cdot 8 \cdots}{3\cdot 3\cdot 5\cdot 5\cdot 7\cdot 7 \cdots}\tag{1}\label{eq1} $$

I, rather credulously, rearranged the series in \eqref{eq1} as: $$ {\pi\over 4}=2\cdot \left(\frac{4\cdot 4}{3\cdot 3} \right)\cdot \left(\frac{6\cdot 6}{5\cdot 5} \right)\cdot \left(\frac{8\cdot 8}{7\cdot 7} \right)\cdots = 2\cdot\prod_{i=1}^{\infty} \left(\frac{2i+2}{2i+1} \right)^2 \tag{2}\label{eq2} $$

Then I wrote the program (using $10$ terms of the form $\left(\frac{2i+2}{2i+1} \right)^2$ where $i$ goes from $1$ to $10$) only to realize that I had committed a blunder. My faithful program calculated ${\pi\over 4}$ as $17.675817$.

I then looked up Wallis Product on Wikipedia which defines it as: $$ {\pi\over \textbf{2}}= \left(\frac{2\cdot 2}{1\cdot 3} \right)\cdot \left(\frac{4\cdot 4}{3\cdot 5} \right)\cdot \left(\frac{6\cdot 6}{5\cdot 7} \right)\cdots = \prod_{n=1}^{\infty}\frac{4n^2}{4n^2-1} \tag{3}\label{eq3} $$

I removed the bug in my program by using Wallis Product as defined in \eqref{eq3}.

I am somewhat aware of the convergent tests of infinite series, but I guess I am not that familiar with their valid manipulations. Here are my questions based on this experience:

  1. Exactly what disallows equation \eqref{eq2} as a rearrangement of \eqref{eq1}? Why aren't these two equations equivalent?

  2. Why is \eqref{eq3} a valid rearrangement of \eqref{eq1} (if it is, that is)?

$\endgroup$
1
  • 1
    $\begingroup$ Your copy of the Wallis product (3) had a few typos, I corrected them. Please check this is now right. $\endgroup$
    – user700480
    Commented Jun 10, 2023 at 8:30

3 Answers 3

8
$\begingroup$

For one thing: (1) does not make sense. There is no question about re-arranging it because it is not an infinite product. It is not of the form $\prod_{n=1}^\infty a_n$. How are you even supposed to calculate it? Multiply $2\cdot 4\cdot 4\cdot 6\cdot 6\cdots$ (which is infinite) and then multiply $3\cdot 3\cdot 5\cdot 5\cdot 7\cdot 7\cdots$ (which is also infinite) and then divide one infinity with the other??!

The actual Wallis product is (3) and you can get $\pi/4$ if you halve the first term $\frac{2\cdot 2}{1\cdot 3}$ to be just $\frac{2}{3}$ and leave all the other terms intact.

The other aspect is that (2) is not a rearrangement of (3), it has completely different terms and no wonder it is different. In fact, it diverges. To see that, let's see the partial products in the Wallis product:

$$P_n=\left(\frac{2\cdot 2}{1\cdot 3}\right)\left(\frac{4\cdot 4}{3\cdot 5}\right)\cdots\left(\frac{(2n)(2n)}{(2n-1)(2n+1)}\right)$$

with the partial products in (2):

$$Q_n=2\left(\frac{4\cdot 4}{3\cdot 3}\right)\left(\frac{6\cdot 6}{5\cdot 5}\right)\cdots\left(\frac{(2n)(2n)}{(2n-1)(2n-1)}\right)$$

Note that the terms are completely different, and moreover $\frac{P_n}{2}=\frac{Q_n}{2n+1}$ i.e. $Q_n=\frac{2n+1}{2}P_n$. As $P_n\to\pi/2$ and $\frac{2n+1}{2}\to\infty$ when $n\to\infty$, it follows that $Q_n\to\infty$, so your "rearrangement" (which, to emphasise again, isn't a rearrangement) is divergent.


As for the theorems when the re-arrangement is allowed:

  • Infinite sum $\sum_{n=1}^\infty a_n$ can be re-arranged at will if it is absolutely convergent, i.e. if $\sum_{n=1}^\infty |a_n|$ is convergent.
  • Infinite product $\prod_{n=1}^\infty a_n$ with $a_n>0$ can be re-arranged at will if it is absolutely convergent, which is if $\sum_{n=1}^\infty |\log a_n|$ is convergent, or, equivalently, if $\sum_{n=1}^\infty |a_n-1|$ is convergent. (See e.g.: https://encyclopediaofmath.org/wiki/Infinite_product)

None of those rules give you right to break up the terms themselves and re-arrange the pieces.

$\endgroup$
5
$\begingroup$

It appears that you have made a couple errors, but the one to explore first is the grouping of your terms seems to have accumulated more terms in the numerator compared to the denominator.

The wallis product is defined as (according to Wikipedia) $$ \frac{\pi}{2} = \left(\frac{2\cdot 2}{1\cdot 3} \right)\cdot \left(\frac{4\cdot 4}{3\cdot 5} \right)\cdot \left(\frac{6\cdot 6}{5\cdot 7} \right)\cdots = 4 \cdot \left(\frac{4\cdot 4}{3\cdot 3}\right)\cdot \left(\frac{6\cdot 6}{5\cdot 5}\right)\cdot \left(\frac{1}{7}\right)\cdots $$ so you appear to be off by one when computing your product

$\endgroup$
2
  • 1
    $\begingroup$ To be a bit more explicit, I think you just need to leave off one of the final $2i+2$. Then your 10 term approximation would have estimated $\pi$ to be 3.21378491. $\endgroup$
    – Teepeemm
    Commented Jun 10, 2023 at 18:06
  • $\begingroup$ @Teepeemm thanks for pointing this out - I was getting quite a few downvotes. I kept it like this to reflect how it should be grouped compared to his. But I understand now. $\endgroup$
    – Chinny84
    Commented Jun 10, 2023 at 18:58
1
$\begingroup$

Series are limit of partial sum and for the second one we have

$$ W_N=\left(\frac{2\cdot 2}{1\cdot 3} \right)\cdot \left(\frac{4\cdot 4}{3\cdot 5} \right)\cdot \left(\frac{6\cdot 6}{5\cdot 7} \right)\cdots\left(\frac{4N^2}{4N^2-1} \right)= \prod_{n=1}^{N}\frac{4n^2}{4n^2-1}$$

which can be reordered as follows

$$W_N=4\cdot \left(\frac{4\cdot 4}{3\cdot 3} \right)\cdot \left(\frac{6\cdot 6}{5\cdot 5} \right)\cdot \left(\frac{8\cdot 8}{7\cdot 7} \right)\cdots\left(\frac{(2N)^2}{(2N-1)^2} \right)\frac1{2N+1} =$$

$$= \frac4{2N+1}\cdot\prod_{n=1}^{N} \left(\frac{2n}{2n-1} \right)^2$$

while you have considered two different sequences with different limit.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .