I have two expressions which, if my maths is correct, should both be true. But Mathematica doesn't agree. I can take the expression E^(-n^3)
out of the single summation, but not out of the double summation...
TrueQ[Sum[a*E^(a - n^3), {a, 1, n}]/E^n ==
E^(-n^3 - n)*Sum[a*E^a, {a, 1, n}]]
*True*
TrueQ[Sum[a*b*E^(a*b - n^3), {a, 1, n},
{b, 1, n}]/E^n == E^(-n^3 - n)*
Sum[a*b*E^(a*b), {a, 1, n}, {b, 1, n}]]
*False*
...but E^(-n^3)
is not dependent on a
or b
, so surely it can be moved outside of the summation in both cases.
Is my maths wrong, or is Mathematica? And if Mathematica, can it be fixed or worked around?