## File: sumcon.usg

package info (click to toggle)
maxima 5.6-17
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051` ``````The SUMCONTRACT package comes with four functions which are called from MACSYMA. These are SUMCONTRACT, INTOSUM, BASHINDICES, and NICEINDICES. each of their operations will be described, and a pointer to a batch file is given which gives an example from Differential Equations showing the use of the functions in a possible application. SUMCONTRACT(expression) will combine all sums of an addition that have upper and lower bounds that differ by constants. The result will be an expression containing one summation for each set of such summations added to all appropriate extra terms that had to be extracted to form this sum. MACSYMA used to merge two sums with THE EXACT SAME upper AND lower bounds, and create a tedious index for the summation. SUMCONTRACT will combine all compatible sums and use one of the indices from one of the sums if it can, and then tries to form a reasonable index if it cannot use any supplied. INTOSUM(expression) will take all things that a summation is multiplied by, and put them inside the summation. If the index is used in the outside expression, then the function tries to find a reasonable index, the same as it does for SUMCONTRACT. This is essentially the reverse idea of the OUTATIVE property of summations, but note that it does not remove this property, it only bypasses it. BASHINDICES(expression) will take the expression and give each index of a summation and product a unique index. This is here to allow CHANGEVAR to be selective in which summations it is playing with. The form of the unique index is J. If gets to big for your liking, it can be changed by changing GENSUMNUM (eg GENSUMNUM:0\$ will reset it). NICEINDICES(expression) will take the expression and change all the indices of sums and products to something easily understandable. It makes each index it can "I" , unless "I" is in the internal expression, in which case it sequentially tries J,K,L,M,N,I0,I1,I2,I3,I4,... until it finds a legal index. EXAMPLE: There is a file (dcp;sum demo) which can be invoked from MACSYMA by typing DEMO(SUMCON,DEMO,DSK,DCP); Be warned this is a long BATCH job, but it should give a good idea of what is going on. COMMENTS: Please send any bug and/or requests to DCP@MC ``````