5
$\begingroup$

Bug introduced in V10.0.2 or earlier and persists through V11.3

(Simplified version - courtesy Lukas Lang - reported [CASE:4208776])

I try to compute

Sum[2^Max[0, 2 h - b - c - 2] x^b y^c z^(2 h), {h, \[Infinity]}, {b, h}, {c, h}]

and get

(-y z^2 - x y z^2 + x^4 y z^2 + 4 y z^4 + 6 x y z^4 + 3 x^2 y z^4 + x^3 y z^4
 - 4 x^4 y z^4 - 2 x^5 y z^4 + 2 y^2 z^4 + 3 x y^2 z^4 + 2 x^2 y^2 z^4 + x^3 y^2 z^4
 - 2 x^4 y^2 z^4 - x^5 y^2 z^4 - 8 x y z^6 - 8 x^2 y z^6 - 4 x^3 y z^6 - x^4 y z^6
 + 8 x^5 y z^6 - 8 y^2 z^6 - 16 x y^2 z^6 - 14 x^2 y^2 z^6 - 10 x^3 y^2 z^6 + 6 x^4 y^2 z^6
 + 8 x^5 y^2 z^6 + 2 x^6 y^2 z^6 - 2 x y^3 z^6 - 3 x^2 y^3 z^6 - 2 x^3 y^3 z^6
 + 2 x^5 y^3 z^6 + 4 x^4 y z^8 + 16 x y^2 z^8 + 24 x^2 y^2 z^8 + 20 x^3 y^2 z^8
 + 10 x^4 y^2 z^8 - 16 x^5 y^2 z^8 - 8 x^6 y^2 z^8 + 8 x y^3 z^8 + 16 x^2 y^3 z^8
 + 14 x^3 y^3 z^8 + 4 x^4 y^3 z^8 - 8 x^5 y^3 z^8 - 4 x^6 y^3 z^8 - 8 x^4 y^2 z^10
 - 16 x^2 y^3 z^10 - 24 x^3 y^3 z^10 - 16 x^4 y^3 z^10 + 16 x^6 y^3 z^10)
 /(x (-1 + 4 z^2) (-1 + 2 x z^2) (-1 + 2 y z^2) (-1 + x y z^2))

This cannot be correct since the input is symmetric in x and y while the output is not.

At the same time

Sum[2^Max[0, 2 h - b - c - 2] x^b y^c z^(2 h), {h, 2, \[Infinity]}, {b, h}, {c, h}]

seems to sum up correctly.

Is there some known bug or I am doing something wrong?

$\endgroup$
6
  • 1
    $\begingroup$ You don't even need the infinite sum: Sum[2^Max[0, 2 h - b - c - 2] x^b y^c z^(2 h), {b, h}, {c, h}]/.h->1 is already broken $\endgroup$
    – Lukas Lang
    Jan 2, 2019 at 19:11
  • $\begingroup$ @LukasLang Oh my. Thanks a lot. I think you should make it an answer. I would then add the bug tag $\endgroup$ Jan 2, 2019 at 19:16
  • $\begingroup$ If you haven't already, consider reporting this to WRI (you can add the case number to the question if you have one) $\endgroup$
    – Lukas Lang
    Jan 2, 2019 at 21:43
  • $\begingroup$ @LukasLang I am going to report. You checked on both these versions? Mine is 11.0.1.0 $\endgroup$ Jan 2, 2019 at 22:21
  • 1
    $\begingroup$ I've reproduced this on 10.0.2, 11.2 and 11.3 $\endgroup$
    – Lukas Lang
    Jan 2, 2019 at 22:22

1 Answer 1

3
$\begingroup$

There is definitely something broken here. Consider only the inner two sums:

s = Sum[2^Max[0, 2 h - b - c - 2] x^b y^c z^(2 h), {b, h}, {c, h}];

Inserting h->1 and simplifying:

s /. h -> 1 // FullSimplify
(* ((-1 - x + x^4) y z^2)/x *)

which is clearly wrong. We get the correct result by specifying h==1 before evaluating the sum:

 Sum[2^Max[0, 2 h - b - c - 2] x^b y^c z^(2 h), {b, h}, {c, h}, Assumptions -> h == 1]
(* x y z^2 *)
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.