Summation with begin or end index as an expression doesn't work.

Issue #46 resolved
MohamedE created an issue

Indeed, when executing Sum[k,{k,1,n+1}], the result was Sum(k,{k,1,n+1}).

A good reference:

http://www.wolframalpha.com/input/?i=sum[i]+with+i+from+a+to+b

Comments (18)

  1. MohamedE reporter

    In addition, I tried Sum[k,{k,0,n-1}], I obtained n(-1 + n) /2, which is not ergonomically nice to look at. Don't you agree?

  2. MohamedE reporter
    • changed status to open

    This expression works just fine: Sum[(i^2 + i)/2, {i,1,n}].

    However, this one Sum[i(i + 1)/2, {i,1,n}], doesn't work at all.

  3. MohamedE reporter
    • changed status to open

    This formula won't work:

    Sum[Sum[placeholder, {j,i,n-1}], {i,1,n-1}]

    But it works for this one:

    Sum[Sum[c, {j,1,n}], {i,1,n}]

  4. Axel Kramer repo owner

    I uploaded a new version.

    Please try this notation:

    Sum[placeholder, {j,i,n-1}, {i,1,n-1}]
    
  5. MohamedE reporter

    Indeed, it's working better, even with the recursive notation Sum[Sum[]].

    However, there's a specific case that doesn't work (with '*' symbol):

    Sum[Sum[c*(i-j+1), {j,i+1,n}], {i,1,n}]

  6. MohamedE reporter

    Did you test it with division (just out of curiosty)?

    Sum[Sum[c/(i-j+1), {j,i+1,n}], {i,1,n}]

    It seems like it doesn't work.

  7. Log in to comment