31

I asked Wolfram Alpha to compute the following limit:

$\lim_{n\to\infty} \prod_{i=1}^n (1- \frac{1}{n+2i})$ and the answer was $\infty$. enter image description here I do not understand how this can be, as all elements in the product are smaller than 1.

For comparison, when I asked about the following limit:

$\lim_{n\to\infty} \prod_{i=1}^n (1- \frac{1}{n+i})=1/2$.

What is the real value of these limits?

amWhy
  • 210,739
  • 3
    I notice that the factors involve $ n $, so this is not simply an infinite product. But that doesn't matter, since each finite product is still between $ 0 $ and $ 1 $, so any limit must also be (possibly equal to $ 0 $ or $ 1 $ but certainly not $ \infty $). – Toby Bartels Apr 03 '24 at 18:52
  • WA still gets it wrong if you specify discrete. –  Apr 03 '24 at 19:13
  • If you put in 1.99i instead of 2i, it gives you a close approximation. –  Apr 03 '24 at 19:24
  • You can force it to approximate using $2.0$ to get an ever close approximation than the one that @Doug found. So it's apparently about $0.57735$, but WA doesn't offer me more digits. – Toby Bartels Apr 03 '24 at 19:31
  • I do not get why people are surprised that WA gives Wrong Answers. Isn't that what it is very famous for? By the way, any mathematician can with some effort generate an inexhaustible supply of limits for which WA gets the wrong answer, because the programmers who wrote the algorithms behind WA didn't care about correctness and literally used a (wrong) whack-a-mole approach to get rid of wrong answers to questions that people report. – user21820 Apr 04 '24 at 03:40
  • 1
    @user21820: for what it’s worth, that’s the first time I’m hearing of WA often getting the wrong answers. So to answer your (obviously rhetorical, but still) question, no, WA is not very famous for giving Wrong Answers. – Aphelli Apr 04 '24 at 08:22
  • 4
    @Aphelli: Sure let me clarify: WA is very famous among mathematicians for giving Wrong Answers. =P More seriously, it's well-known to Math SE, and perplexed people periodically pop up posting WA's poor output (e.g. 1, 2, 3, ...) – user21820 Apr 04 '24 at 12:56

4 Answers4

37

We may as well treat the more general product $$\prod_{i = 1}^n \left(1 - \frac{1}{n + a i}\right), \qquad a > 0 .$$ Rewriting gives $$\prod_{i = 1}^n \left(\frac{i+\frac{n - 1}a}{i + \frac{n}a}\right) = \frac{\prod_{i = 1}^n \left(i+\frac{n - 1}a\right)}{\prod_{i = 1}^n \left(i + \frac{n}a\right)} = \frac{\left(1 + \frac{n - 1}a\right)_n}{\left(1+\frac{n}a\right)_n},$$ where $(b)_n$ denotes the Pochhammer symbol. Rewriting this expression using the Gamma function representation $$(b)_n = \frac{\Gamma(n + b)}{\Gamma(n)}$$ of the Pochhammer symbol and using the Stirling series of $\Gamma$, $$\Gamma(s) = \sqrt{\frac{2 \pi} s} \left(\frac{s}e\right)^s \left(1 + \frac1{12 s} + R_1(s)\right), \quad R_1(s) \in O\left(\frac1{s^2}\right),$$ gives that as $n \to \infty$, the ratio behaves as $$\prod_{i = 1}^n \left(1 - \frac{1}{n + a i}\right) = (a + 1)^{-\frac1a} \left(1 + \frac{a - 1}{2 (a + 1) n} + R_2(n)\right),$$ where $R_2(n) \in O\left(\frac1{n^\frac32}\right)$. In particular, $$\boxed{\lim_{n \to \infty} \prod_{i = 1}^n \left(1 - \frac{1}{n + a i}\right) = (a + 1)^{-\frac1a}} .$$ For $a = 1$ the limit is $\boxed{\frac12}$, and for $a = 2$ the limit is $\boxed{\frac1{\sqrt3}}$

The same argument applies to the case $a > -1$, $a \neq 0$; in the limiting case $a = 0$ the product is $\left(1 - \frac1n\right)^n$, which has limit $\frac1e$ as $n \to \infty$.

I don't see how to explain WolframAlpha's behavior. Mathematica returns the correct result using the input Limit[Product[1 - 1/(n + 2*i), {i, 1, n}], n -> Infinity], but WolframAlpha gives $\infty$ for the same.

Travis Willse
  • 108,056
21

Here's WolframAlpha's incorrect reasoning as identified through the "Show steps" button.

$$\prod_{i=1}^n \left(1-\frac{1}{n+2i}\right)=\frac{\left(\frac{n+1}{2}\right)_n}{\left(\frac{n}{2}+1\right)_n}$$ (where that's the Pochhammer function)

By the quotient rule, we can distribute the limit operation over the fraction; the limit of the denominator is claimed incorrectly without further reasoning to be $1$, while the limit of the numerator is claimed without further reasoning to be $\infty$.


You can get the right answer from WolframAlpha by taking logs:

Exp@Limit[Sum[Log[1 - 1/(n + 2 i)], {i, 1, n}], n -> \[Infinity]]

$\frac{1}{\sqrt{3}}$

11

Edit: Seems Patrick Stevens beat me to it

For what it's worth, here's a lightly-edited copy-paste of the step-by-step """solution""" Wolfram offers.

Find the following limit: $$ \lim_{n \to \infty} \prod_{i=1}^n \left(1 - \frac{1}{n+2i}\right).$$ Apply $\displaystyle\prod_{i=1}^n \left(1 - \frac{1}{n + 2i}\right) = \frac{\left(\frac{n+1}{2}\right)_n}{\left(\frac{n}{2} + 1\right)_n} $ to get $$\lim_{n\to\infty} \frac{(\frac{n+1}{2})_n}{(\frac{n}{2}+1)_n}.$$ Applying the quotient rule, write $$\lim_{n\to\infty} \frac{(\frac{n+1}{2})_n}{(\frac{n}{2}+1)_n} = \frac{\displaystyle\lim_{n\to\infty} (\frac{n+1}{2})_n}{\displaystyle\lim_{n\to\infty} (\frac{n}{2}+1)_n}.$$ Now $\displaystyle\lim_{n\to\infty} (\frac{n}{2} + 1)_n = 1$, so $$\lim_{n\to\infty} \left( \frac{n+1}{2}\right)_n = \infty$$

I guess the issue is occurring in the step where it asserts $$\lim_{n\to\infty} \left(\frac{n}{2} + 1\right)_n = 1.$$

mathman
  • 29
1

Taking the logarithm of the product and applying a Taylor expansion we get $$ \log\left(\prod_{i=1}^n \left(1 - \frac{1}{n + ki}\right)\right)= \sum_{i=1}^n \log\left(1 - \frac{1}{n + ki}\right) =-(1+o(1)) \sum_{i=1}^n \frac{1}{n + ki} $$ as $n\to \infty$, where $k\in \mathbb{R}^+$ is fixed. The last term converges as a Riemann sum to $$ \int_1^n \frac{1}{n + kx} \, dx = \frac{\log(k+1)}{k}(1+o(1)), $$ as $n\to \infty$. Thus $$ \lim_{n \to \infty} \prod_{i=1}^n \left(1 - \frac{1}{n + ki}\right)=\exp\left({\lim\limits_{n\to \infty}\sum_{i=1}^{n}\log\left(1 - \frac{1}{n + ki}\right)}\right)=(k+1)^{-\frac{1}{k}}. $$

Jonas
  • 569