beginner question




On Tue, 18 May 2010, Andrej Vodopivec wrote:

< On Tue, May 18, 2010 at 7:10 AM, Amadeus W.M. <amadeus84 at verizon.net> wrote:
< > How do I make maxima convert something like
< >
< > sum( x(k) + alpha*k,k,1,n )
< >
< > to
< >
< > sum(x(k)) + alpha*k*(k+1)/2;
< >
< > i.e. I want it to split the sum and simplify each term.
< 
< (%i1) load(simplify_sum)$
< (%i2) sum(x(k)+alpha*k,k,1,n)$
< (%i3) simplify_sum(split_sum(%));
< (%o3) (alpha*(n^2+n))/2+sum(x(k),k,1,n)
 
Or, you can set the simpsum flag:

(%i4) sum( x(k) + alpha*k,k,1,n ),simpsum=true;

(%o4) (alpha*n^2+alpha*n)/2+'sum(x(k),k,1,n)

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.