How to expand sum?



Try declaring sum to be additive; for example (in this case, simpsum isn't needed--other cases it may be)

(%i3) declare(sum,additive)$

 (%i4) sum(x[i]*y[i]-a*x[i]^2-b*x[i],i,1,n);
 (%o4) (sum(x[i]*y[i],i,1,n))-a*(sum(x[i]^2,i,1,n))-b*sum(x[i],i,1,n)

--Barton

________________________________________


I would like to automatically expand sum expression:

sum(a*x[i]+b,i,1,n);

so it would look like:

ex:a*sum(x[i],i,1,n)+n*b

I know that for such case it is enough to use simpsum, but for expression like this

sum(x[i]*y[i]-a*x[i]^2-b*x[i],i,1,n), simpsum;

it doesnt work:

How do I achieve that for more complicated expressions?

Thanks and regards
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima