Question: Split several sums in an expression with one rule

Dear all:

I wisth to replace in an expression that contains several sums:

sum(a[i],i=1..n+1) and sum(w[i],i=1..n+1)

and replace them with a single command into:

a[n+1]+sum([i],i=1..n) and w[n+1]+sum(w[n],1..n)

everywhere in the expression

Thank you

Claudio

Please Wait...