I'm trying to do the double sum of the following function:
from sympy import Sum, sin, pi
from sympy.abc import i, j
f = i**2*sin(i*(j+1)*pi/4)
where the inner summation sums from i = 1 to i = j and the outer summation sums from j = 1 to j = 5
that way separately
sum1 = Sum(f, (i, 1, j))
sum2 = Sum(sum1, (j, 1, 5)).doit()
or on the same line
doublesum = Sum(f, (i, 1, j), (j, 1, 5)).doit()
but these things give to me:
Sum(i**2*sin(pi*i*(j + 1)/4), (i, 1, j), (j, 1, 5))
instead of giving to me a numeric object as it should be.
What's wrong?