Numerical error in wolfram

74 Views Asked by At

In Wolfram Alpha, we see that $$\sum_{n=0}^\infty\frac{e^{-\pi^2n(n+1)}}{2n+1}=1$$

This is equivalent to $$\sum_{n=1}^\infty\frac{e^{-\pi^2n(n+1)}}{2n+1}=0$$

However, the last sum is impossible since it is a sum of positive terms.

So,

q1) Is this an error of Wolfram Alpha?

q2) Is there a way for finding the explicit value of $\sum_{n=1}^\infty\frac{e^{-\pi^2n(n+1)}}{2n+1}$?

1

There are 1 best solutions below

0
On

I presume you entered something like this:

Sum[Exp[-Pi^2 n(n+1)]/(2n+1), {n,0,Infinity}]

into Wolfram Alpha. As already explained, the terms for $n > 0$ are very small, and Wolfram Alpha by default does not compute very many digits of precision unless prompted to do so. For instance, if you instead input

Table[N[Exp[-Pi^2 n(n+1)]/(2n+1)], {n,0,5}]

you will get a table like this:

$$\begin{array}{c|c} n & e^{-\pi^2 n(n+1)}/(2n+1) \\ \hline 0 & 1. \\ 1 & 8.91763 \times 10^{-10} \\ 2 & 3.8295 \times 10^{-27} \\ 3 & 5.23751 \times 10^{-53} \\ 4 & 2.08671 \times 10^{-87} \\ 5 & 2.33973 \times 10^{-130} \\ \end{array} $$

This shows that Wolfram Alpha knows that the sum is greater than $1$, it just isn't displaying enough significant digits. If you enter

Sum[Exp[-Pi^2 n(n+1)]/(2n+1), {n,1,Infinity}]

which differs from the original input by only excluding the first term, then Wolfram Alpha displays additional precision. This is intentional behavior of the Wolfram language, in which numbers of the form $1 + \epsilon$ where $\epsilon$ is a very small nonzero value, are not numerically represented to a precision that would be distinguishable from $1$. This can be avoided by using the option WorkingPrecision for instance. So in Mathematica, the input

NSum[Exp[-Pi^2 n (n + 1)]/(2 n + 1), {n, 0, Infinity}, WorkingPrecision -> 50]

evaluates to

$$1.0000000008917626636914132309098706248145118730038.$$

Notably, Mathematica does not provide a closed-form expression for this sum.