I am completely puzzled why splitting an infinite sum into two parts, one where the index $i$ is negative, and another where the index $i$ is not negative, leads to a different result.
I posted the code below, and unless I am missing something very basic, which I can't tell, this is a bug. Note that $i$ varies from $-3$ to $\infty$. It's then split into a sum where $i$ goes from $-3$ to $-1$, and another one where $i$ goes from $0$ to $\infty$. Mathematica gives a different result.
Note the only difference between the three parts (x1
, x2
and x3
) is the range of $i$. Loosely speaking, since we're talking about relative integers, we should have $[k-1, \infty]=[k-1, -1] \cup [0, \infty]$ (because $k$ is a negative integer, which is why that should hold).
j = 1; k = -2; x1 = Simplify[{x1 =
Sum[((-z)^(i - k + 1)/(i - k + 1)!)*Binomial[j + i, i],
{i, k - 1, Infinity}], x2 = Sum[((-z)^(i - k + 1)/(i - k + 1)!)*Binomial[j + i, i],
{i, 0, Infinity}], x3 = Sum[((-z)^(i - k + 1)/(i - k + 1)!)*Binomial[j + i, i],
{i, k - 1, -1}], x1 - (x2 + x3)}]
The output (difference should be zero):
{-3 + E^-z + 2 z - z^2/2, -E^-z (2 + E^z (-2 + z) + z), -2 + z, -3 + 2 z - z^2/2 + E^-z (3 + z)}
I really appreciate the help.
Per my calculations, it's x1
that seems to be wrong.
x1
is wrong,x2+x3
is correct. $\endgroup$