'Sympy: how to compare indexed summations with unknown upper bounds

I'm trying to compare the summations "b" and "c" in the code below. The result should be True, but I keep getting False.

Here's my code:

from sympy import *


j, i, n = symbols(' j i n', integer=True)
x = IndexedBase("x")

a = summation((x[j]),(j, 1, i))
b = summation((a), (i, 1, n))
c = summation((n+1-i)*x[i],(i, i, n))

simplify(b-c)== 0

output: False

The image below is the problem statement from my textbook.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source