Sumcontract Does Not Do This



maxima-bounces at math.utexas.edu wrote on 04/30/2008 01:11:11 PM:

> If I enter
> 
> expr1: sum(a[i]*x^i,i,1,inf)+sum(c[i]*x^i,i,1,inf);
> 
> then sumcontract will pull everything inside one sum.
> 
> If I enter 
> 
> expr2: A*sum(a[i]*x^i,i,1,inf)+B*sum(c[i]*x^i,i,1,inf);
> 
> then sumcontract has no effect.

Try using intosum:

(%i25) A*sum(a[i]*x^i,i,1,inf)+B*sum(c[i]*x^i,i,1,inf)$
(%i26) map('intosum,%)$
(%i27) sumcontract(%);
(%o27) sum(c[i]*x^i*B+a[i]*x^i*A,i,1,inf)


Barton