0
$\begingroup$

I perform two equivalent sums. Mathematica returns a symbolic expression in one case but not the other. Shouldn't Mathematica be able to do either sum?

First sum

summand1 = Exp[a1 x1 + a2 x2]/((a1 - a2)! a2! (eT - (a1 - a2))! (sT - a1)!)
Z1=Sum[summand1, {a1, 0, sT}, {a2, 0, Infinity}]

for which Mathematica returns a DifferenceRoot.

With the following change of variable

a1 = a2 + es;
summand2 = Exp[a1 x1 + a2 x2]/((a1 - a2)! a2! (eT - (a1 - a2))! (sT - a1)!)
Z2=Sum[summand2, {es, 0, eT}, {a2, 0, Infinity}]

In the latter case Mathematica is able to find a symbolic answer. Shouldn't it return the same answer either way?

I've edited this top demonstrate that the two sums are in fact equal for specific values of eT and sT. Set eT and sT to something small, say sT=3;eT=4; Then evaluate Z1 and Z2. Then take the difference.

EDIT TO SHOW THAT THE ORDER OF THE SUMMATION WITH at and es DOESN"T ALTER THE OUTCOME when integer values of eT and sT are used.

 Z3 = Sum[summand2, {a2, 0, Infinity}, {es, 0, eT}];
 Print["Z3=", Z3]

 eT = 8; sT = 11;

 Print["Z1-Z2=", FullSimplify[Z1 - Z2]]

 Print["Z2-Z3=", FullSimplify[Z2 - Z3]]
$\endgroup$
6
  • $\begingroup$ It seems to me that you changed the nature of the summand in the second case. Could you spell out for me why they should lead to the same result? I think I must be missing something. $\endgroup$
    – MarcoB
    Aug 9, 2017 at 19:22
  • $\begingroup$ I think there are 2 errors in your second sum. It should be Sum[summand, {a2, 0, Infinity}, {es, -a2, sT - a2}] The order needs to be reversed because the sum over es now depends on a2 and also the limits for es needed to be changed. $\endgroup$
    – JimB
    Aug 9, 2017 at 19:25
  • $\begingroup$ The factorials in the denominator in the second case are: a2! es! (-es + eT)! (-a2 - es + sT)! Thus the contributions to the sum only occur when both a2 and e2 are non-negative. $\endgroup$
    – JEP
    Aug 9, 2017 at 20:59
  • $\begingroup$ The ordering would still need to be reversed because the upper bound for es now depends on a2. $\endgroup$
    – JimB
    Aug 9, 2017 at 21:26
  • $\begingroup$ The upper bound for es does not depend on a2. The difference between the 3 sums now is always zero when they are evaluated for fixed eT and sT. Only in the one case does Mathematica find a symbolic expression for the sum. $\endgroup$
    – JEP
    Aug 9, 2017 at 23:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.