File: sumcon.usg

package info (click to toggle)
maxima 5.6-17
  • links: PTS
  • area: main
  • in suites: woody
  • size: 30,572 kB
  • ctags: 47,715
  • sloc: ansic: 154,079; lisp: 147,553; asm: 45,843; tcl: 16,744; sh: 11,057; makefile: 7,198; perl: 1,842; sed: 334; fortran: 24; awk: 5
file content (51 lines) | stat: -rw-r--r-- 2,250 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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<number>. If <number> 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