Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Cliff Yapp <starseeker@us...>  20030424 01:50:18

Update of /cvsroot/maxima/htdocs/docs/macref/share In directory sc8prcvs1:/tmp/cvsserv18165 Added Files: eigen.usg ellipt.usg fft.html fft.usg fileop.usg gam.dem gam.usg nusum.usg ode2.usg plot2.usg trgsmp.html trgsmp.usg vect.dem vect.usg Log Message: macref share files  NEW FILE: eigen.usg  This is the file EIGEN USAGE DSK:SHARE; . The EIGEN package is described in this file. The source code is in the file EIGEN > DSK:SHARE; and the fastload file is EIGEN FASL DSK;SHARE; . (You can load this one using MACSYMA's LOADFILE command, i.e. LOADFILE(EIGEN,FASL,DSK,SHARE); . If you access the FASL file via the functions EIGENVALUES or EIGENVECTORS, the FASL file will autoload.) The DEMO file is EIGEN DEMO DSK:SHARE; . You can BATCH or DEMO this file, i.e. BATCH(EIGEN,DEMO,DSK,SHARE); or DEMO(EIGEN,DEMO,DSK,SHARE); . Note that in the DEMO mode you should hit the space key at each step... The new EIGEN package is written by Yekta G"ursel (YEKTA@...) and is faster and more memory efficient than the old EIGEN package. It also is able to handle multiple eigenvalues and the eigenvectors corresponding to those eigenvalues. It will work with any square matrix ( not necessarily symmetric or hermitian ) and will tell whether the matrix is diagonalizable. The calculated eigenvectors and the unit eigenvectors of the matrix are the RIGHT eigenvectors and the RIGHT unit eigenvectors respectively. ( You should be aware of the fact that this program uses the MACSYMA functions SOLVE and ALGSYS and if SOLVE can not find the roots of the characteristic polynomial of the matrix or if it generates a rather messy solution the EIGEN package may not produce any useful results. More info on this will be given in the description of the commands... This package is DESIGNED to try to get the EXACT solutions to the eigenvalue and eigenvector problems. If the matrices you have contain FLOATING point numbers, it may not be able to solve your problem. You should use the IMSL eigenvalue and eigenvector package for numerical matrices with floating point numbers. These excellent routines will find the APPROXIMATE solutions for numerical matrices with floating point numbers. See MACSYMA Manual Version 10, Volume 2, Page V2478.) Description of the functions : CONJUGATE(X) returns the complex conjugate of its argument. ( Note that %I's in the expressions should be explicit, since there is no complex variable declaration in MACSYMA at the present time. This is true for all the functions in this package...) INNERPRODUCT(X,Y) takes two LISTS of equal length as its arguments and returns their inner ( scalar ) product defined by (Complex Conjugate of X).Y ( The "dot" operation is the same as the usual one defined for vectors. ) . UNITVECTOR(X) takes a LIST as its argument and returns a unit list. ( i.e. a list with unit magnitude. ) COLUMNVECTOR(X) takes a LIST as its argument and returns a column vector the components of which are the elements of the list. The first element is the first component,...etc...( This is useful if you want to use parts of the outputs of the functions in this package in matrix calculations. ..) GRAMSCHMIDT(X) takes a LIST of lists the sublists of which are of equal length and not necessarily orthogonal ( with respect to the innerproduct defined above ) as its argument and returns a similar list each sublist of which is orthogonal to all others. ( Returned results may contain integers that are factored. This is due to the fact that the MACSYMA function FACTOR is used to simplify each substage of the GramSchmidt algorithm. This prevents the expressions from getting very messy and helps to reduce the sizes of the numbers that are produced along the way. ) EIGENVALUES(MAT) takes a MATRIX as its argument and returns a list of lists the first sublist of which is the list of eigenvalues of the matrix and the other sublist of which is the list of the multiplicities of the eigenvalues in the corresponding order. { The MACSYMA function SOLVE is used here to find the roots of the characteristic polynomial of the matrix. Sometimes SOLVE may not be able to find the roots of the polynomial;in that case nothing in this package except CONJUGATE, INNERPRODUCT, UNITVECTOR, COLUMNVECTOR and GRAMSCHMIDT will work unless you know the eigenvalues. In some cases SOLVE may generate very messy eigenvalues. You may want to simplify the answers yourself before you go on. There are provisions for this and they will be explained below. ( This usually happens when SOLVE returns a notsoobviously real expression for an eigenvalue which is supposed to be real...)} EIGENVECTORS(MAT) takes a MATRIX as its argument and returns a list of lists the first sublist of which is the output of the EIGENVALUES command and the other sublists of which are the eigenvectors of the matrix corresponding to those eigenvalues respectively. The flags that affect this function are : NONDIAGONALIZABLE[FALSE] will be set to TRUE or FALSE depending on whether the matrix is nondiagonalizable or diagonalizable after an EIGENVECTORS command is executed. HERMITIANMATRIX[FALSE] If set to TRUE will cause the degenerate eigenvectors of the hermitian matrix to be orthogonalized using the GramSchmidt algorithm. KNOWNEIGVALS[FALSE] If set to TRUE the EIGEN package will assume the eigenvalues of the matrix are known to the user and stored under the global name LISTEIGVALS. LISTEIGVALS should be set to a list similar to the output of the EIGENVALUES command. ( The MACSYMA function ALGSYS is used here to solve for the eigenvectors. Sometimes if the eigenvalues are messy, ALGSYS may not be able to produce a solution. In that case you are advised to try to simplify the eigenvalues by first finding them using EIGENVALUES command and then using whatever marvelous tricks you might have to reduce them to something simpler. You can then use the KNOWNEIGVALS flag to proceed further. ) UNITEIGENVECTORS(MAT) takes a MATRIX as its argument and returns a list of lists the first sublist of which is the output of the EIGENVALUES command and the other sublists of which are the unit eigenvectors of the matrix corresponding to those eigenvalues respectively. The flags mentioned in the description of the EIGENVECTORS command have the same effects in this one as well. In addition there is one more flag which may be useful : KNOWNEIGVECTS[FALSE] If set to TRUE the EIGEN package will assume that the eigenvectors of the matrix are known to the user and are stored under the global name LISTEIGVECTS. LISTEIGVECTS should be set to a list similar to the output of the EIGENVECTORS command. ( If KNOWNEIGVECTS is set to TRUE and the list of eigenvectors is given the setting of the flag NONDIAGONALIZABLE may not be correct. If that is the case please set it to the correct value. The author assumes that the user knows what he is doing and will not try to diagonalize a matrix the eigenvectors of which do not span the vector space of the appropriate dimension...) SIMILARITYTRANSFORM(MAT) takes a MATRIX as its argument and returns a list which is the output of the UNITEIGENVECTORS command. In addition if the flag NONDIAGONALIZABLE is FALSE two global matrices LEFTMATRIX and RIGHTMATRIX will be generated. These matrices have the property that LEFTMATRIX.MAT.RIGHTMATRIX is a diagonal matrix with the eigenvalues of MAT on the diagonal. If NONDIAGONALIZABLE is TRUE these two matrices will not be generated. If the flag HERMITIANMATRIX is TRUE then LEFTMATRIX is the complex conjugate of the transpose of RIGHTMATRIX. Otherwise LEFTMATRIX is the inverse of RIGHTMATRIX. RIGHTMATRIX is the matrix the columns of which are the unit eigenvectors of MAT. The other flags have the same effects since SIMILARITYTRANSFORM calls the other functions in the package in order to be able to form RIGHTMATRIX... Finally, for some of you who may think that the names of the functions are too long, I also made shorter names...( In the following list " := " means "is equivalent to" ...). Note that using these may make your code pretty unreadable, you'll save 50% in typing though. CONJ(X):= CONJUGATE(X) INPROD(X,Y):= INNERPRODUCT(X,Y) UVECT(X):= UNITVECTOR(X) COVECT(X):= COLUMNVECTOR(X) GSCHMIT(X):= GRAMSCHMIDT(X) EIVALS(MAT):= EIGENVALUES(MAT) EIVECTS(MAT):= EIGENVECTORS(MAT) UEIVECTS(MAT):= UNITEIGENVECTORS(MAT) SIMTRAN(MAT):= SIMILARITYTRANSFORM(MAT) Well, I guess this is the end... Have fun with the EIGEN package. I hope it will give you useful results. If you run into a bug please let me know... ( I do not think there is any, but nevertheless... )  NEW FILE: ellipt.usg  Numerical routines for Elliptic Functions and Complete Elliptic Integrals (Notation of Abramowitz and Stegun, Chs 16 & 17) Do: LOAD(ELLIPT); At present all arguments MUST be floating point. You'll get nonsense otherwise. Be warned. Jacobian elliptic functions AM(U,M) amplitude with modulus M AM1(U,M1) ampiltude with complementary modulus M1 AM(U,M):=AM1(U,1M); so use AM1 if M ~ 1 SN(U,M):=SIN(AM(U,M)); CN(U,M):=COS(AM(U,M)); DN(U,M):=SQRT(1M*SN(U,M)^2); These functions come defined like this. Others CD, NS etc. may be similarly defined. Complete Elliptic Integrals ELLIPTK(M) Complete elliptic integral of first kind ELLIPTK1(M1) Same but with complementary modulus. ELLIPTK(M):=ELLIPTK1(1M); so use if M ~ 1 ELLIPTE(M) Complete elliptic integral of second kind ELLIPTE1(M1) Same but with complementary modulus. ELLIPTE(M):=ELLIPTE1(1M); so use if M ~ 1  NEW FILE: fft.html  <!DOCTYPE HTML PUBLIC "//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>404 Not Found</TITLE> </HEAD><BODY> <H1>Not Found</H1> The requested URL /crew/mike/maxima/html/macref/share/fft.dmo was not found on this server.<P> <HR> <ADDRESS>Apache/1.3.27 Server at starship.python.net Port 80</ADDRESS> </BODY></HTML>  NEW FILE: fft.usg  FAST FOURIER TRANSFORMS To load the routines do LOADFILE(FFT,FASL,DSK,SHARE); The basic funtions are: FFT > fast fourier transform IFT > inverse fast fourier transform These functions perform a (complex) fast fourier transform on either 1 or 2 dimensional FLOATINGPOINT arrays, obtained by: ARRAY(<ary>,FLOAT,<dim1>); or ARRAY(<ary>,FLOAT,<dim1>,<dim2>); For 1D arrays <dim1> must equal 2^n1, and for 2D arrays <dim1>=<dim2>=2^n1 (i.e. the array is square). (Recall that MACSYMA arrays are indexed from a 0 origin so that there will be 2^n and (2^n)^2 arrays elements in the above two cases.) Calling sequence is: FFT(<realarray>,<imagarray>); or IFT(<realarray>,<imagarray>); The real and imaginary arrays must of course be the same size. The transforms are done in place so that <realarray> and <imag array> will contain the real and imaginary parts of the transform. (If you want to keep the transformed and untransfromed arrays separate copy the arrays before calling FFT or IFT using the FILLARRAY function  see SHARE;ARRAY USAGE.) The definitions of the Fast Fourier Transform and its inverse are given here. Here A is the array to be transformed and AT is its transform. Both A and AT are complex arrays, although as noted above FFT and IFT can only deal with separate real arrays for the real and imaginary parts of A and AT. N (or N^2) is the number of elements in A in the 1D (or 2D) case. (In fact these definitions are not of the FFTs but of the discrete Fourier transforms. The FFT and IFT functions merely provided efficient algorithms for the implementation of these definitions.) 1D case: N  1 ====  1 \ 2 %I %PI I K N AT = > A %E K / I ==== I = 0 N  1 ====  1  1 \  2 %I %PI I K N A = N > AT %E I / K ==== K = 0 2D case: N  1 N  1 ==== ====  1 \ \ 2 %I %PI (I K + J L) N AT = > > A %E K, L / / I, J ==== ==== I = 0 J = 0 N  1 N  1 ==== ====  1  2 \ \  2 %I %PI (I K + J L) N A = N > > AT %E I, J / / K, L ==== ==== K = 0 L = 0 Other functions included in this file are: POLARTORECT(<magnitudearray>,<phasearray>); converts from magnitude/phase form into real/imaginary form putting the real part in the magnitude array and the imaginary part into the phase array. (<real>=<magnitude>*COS(<phase>) and <imaginary>=<magnitude>*SIN(<phase>).) RECTTOPOLAR(<realarray>,<imagarray>); undoes POLARTORECT. The phase is given in the range from %PI to %PI. Like FFT and IFT these function accept 1 or 2 dimensional arrays. However, the array dimensions need not be a power of 2, nor need the 2D arrays be square. (The above 4 functions return a list of their arguments) EXAMPLE  do LOADFILE(FFT,FASL,DSK,SHARE); DEMO(FFT,DEMO,DSK,SHARE); DISCLAIMER  I didn't write these routines, but copied them from AI:LIBDOC;FFT BWOOD1. However you can report bugs to me. CFFK@...  NEW FILE: fileop.usg  Share;Fileop  some file primitives for Macsyma users. Macsyma now provides some useful simple file primitives which were formerly only available in other system programs. To print the contents of a file on your terminal, say Printfile(file,name,dsk,me); To list your directory, say Listfiles(dsk,me). If you use a shared directory such as Users or Plasma, only your filesthe ones with your login name as first file namewill be shown. The length and date of creation of each file is also shown. The function Filelength returns the length of the file argument in blocks. In order to list just the names of your files without the length and date information, use Qlistfiles (Quick LIST Files) with the same arguments as Listfiles. The function Renamefile(oldname,newname) renames a file from oldname to newname.  (kmp, 6/7/79) Details. The Printfile command takes the same argument syntax as Loadfile; the other two take the syntax of Writefile. Listfiles indicates whether each file is stored on secondary disk and whether it has been backed up to tape (an exclamation point appears if it has not). The Filelength command returns the length in blocks: there are five characters in a word and 1024 words in a disk block. Files may not be renamed across directories or devices. Both oldname and newname must be on the same directory. Renaming a file to a filename that already exists gives an error. You must explicitly Delfile the existing file first if that's what you want. Both oldname and newname must be listtype filespecs. example: Renamefile([myold,file,dsk,foo],[mynew,file]);  (kmp, 6/7/79)  NEW FILE: gam.dem  /* This file is a demonstration of some of the simpler features of GAMALG. Details of GAMALG may be found in the file SHARE;GAM USAGE */ /* First load the program */ /* NOTE: This demo will load nearly all the subsiduary files of GAMALG. Together these take up nearly all the available core space. For a good demonstration, this file should therefore be loaded into a fresh Macsyma */ /* loadfile (gamalg,>,share); */ load("gamalg.lsp"); /* First, some elementary traces */ tr(p,q); /* This was trace (p(slash).q(slash})). The D(p,q) in the answer represents the dot product of p and q */ tr(p,q,r,s); tr(p1,p2,p3,p4,p5,p6); /* Now declare some indices to be contracted */ cind (mu,nu,al,be); tr (p,mu,q,mu); tr(mu,nu,al,be,al,nu,mu,be); /* The n in these results is the dimensionality of spacetime */ /* Later, we will set n to 4 and demonstrate gamma[5] etc, but since this step is irreversible, we postpone it until later */ tr(p,mu,q,nu,p,al,q,nu,al,mu); tr(p,mu,q,nu); /* The mu and nu here could not be contracted, so were treated just like slashed vectors */ /*Some convenient shortenings are Zn(p,m)=p(slash)+m and zd(p,m)=1/(p(slash)+m) */ tr(zd(p,m),zd(q,m)); tr(zn(p,m),mu,zn(q,m),mu); tr(zd(p),zd(q)); /* Note that the mass was assumed zero when not given */ /* In all the above examples, only single vectors were used. One can also for example do */ tr(pq,kq); /* Note that in the result, the dot products were expanded out (and alphabetized) for simplification. The expansion can be inhibited by setting the flag DEF:FALSE */ def:false; tr(pq,kq); /* The dot products generated may be expanded by doing */ dfix(%); /* The combinations of vectors may include scalars, which must be declared */ scals(s1,s2); /* Reset def now */ def:true; tr(pq*s1,r*s2); /* An untraced product of gamma matrices is represented by g(a1,a2,a3,...) . These can be simplified using crunch: */ g(mu,p,mu,q); crunch(%); try:g(mu,nu,p,q,nu,p,mu); crunch(%); /* Cof controls some simplification of these results */ cof:true; crunch(try); /* To expand G's use GFIX: */ g(p+k/2,qs1*p,r); gfix(%); /* Now to contract some indices */ tr(p,mu,nu,q); con(%^2); d(mu,nu)*g(mu,p,q,nu); con(%); /* Now go into four dimensions (n=4) */ nset(4); /* In four dimensions, gamma[5] (called g5) is available */ tr(p1,p2,p3,p4,g5); tr(mu,g5,p1,mu,p2,p3,p4,p5,p6); tr(g5,g5); tr(lhp,p1,p2,p3,p4); /* Epsilon symbols may also be contracted */ eps(mu,p1,nu,p2)*eps(nu,p3,mu,p4); con(%); /* In four dimensions, there are many new identities involving gamma matrices. For example, two traces (represented here by GT(...)) may be combined by */ gt(mu,p)*gt(mu,nu,p,q); cotr(%); /* In 4d, COMPDEF assigns components to vectors etc :*/ compdef(pa=[ea,0,0,0],pb=[eb,pbv,0,0],mu=0,nu=0); tr(pa,pb,mu,nu); /*The component assignments are implemented by */ noncov(%); uncompdef(mu,nu); /* GAMALG can also square amplitudes. In obvious notation: */ ntr:true; /*This flag will not immediately perform traces of amplitudes squared by sq etc. */ sq(uv(p,m),g(q1,q2)+2*g(q3,q4),uv(pp,mp)); /*The traces may be done by doing */ cgt(%); /*Indices are treated in many ways by sq, dependingon various flag settings. One way is */ sq(uv(p),g(mu,pp),uv(q)); /*note zero masses were assumed here for the spinors */ /*For Feynman gauage polarization sums, set */ nop:true; sq(uv(p),g(mu,pp),uv(q)); M /* That is the end of this demonstration. GAMALG can do many other things not represnted in the demo. Most of them appear in the manual. I hope you have been sufficiently interested to try playing (and perhaps even doing something useful) with GAMALG now. Any comments should be adressed to swolf and trex. */  NEW FILE: gam.usg  Gamma Matrix Algebra Program (GAMALG). ====================================== written by Anthony E Terrano (TREX) and Stephen Wolfram (SWOLF) mostly on [Feb 25, Mar 3], 1979 revised July 10, 1979. Capabilities:  1. Takes traces of products of Dirac gamma matrices in n dimensions. In 4 dimensions, it also takes traces of products involving gamma[5] (G5). The results may have free indices. 2. Squares sums of amplitudes, involving polarized or unpolarized spinors. 3. Contracts free indices. 4. Simplifies products of gamma matrices in n dimensions. For all manipulations, GAMALG uses the conventions of Bjorken and Drell and takes Tr(1)=4 (generalization of the spinor dimensionality is unnecessary). Further information, especially on the algorithms used by GAMALG, may be found in 'MACSYMA Tools for Feynman Diagram Calculations', by Stephen Wolfram, in Proceeding of the 1979 Users' Conf. and Caltech preprint CALT68720 (June 1979). These references give some discussion of other programs available for high energy physics calculations (including Feynman parametrization etc.). Summary of Functions [sections under which functions discussed given in brackets] (Note: in all functions taking a string of arguments (e.g. TR), list brackets ([,]) may be included or omitted as desired.) BTR(list) takes the trace of the gamma matrices represented by its argument in a way that is more efficient than TR for long traces invloving many sums of momenta [1]. CIND(mu1,...,muk) adds mu1 through muk to the list of contracted indices [1]. CGT(exp) converts G's to TR's and does them [3]. COMPDEF(vec1=list1,vec2=list2,ind1=val1,ind2=val2,vec3=...) defines lists as the components of vectors and values for indices, for use by NONCOV CON(exp) contracts all free indices in exp (including epsilon symbols) [3]. CONJ(amp) returns the conjugate of the amplitude amp [2]. COTR(exp) reduces (in n=4) products of traces with contracted indices to single traces [3]. CRUNCH(exp) simplifies untraced products of gamma matrices in exp [3]. DFIX(exp) expands all dot products in exp [3]. EPSFIX(exp) expands all epsilon symbols in exp [3]. FLAGS() displays the values of flags and information lists. GFIX(exp) expands sums of vectors appearing in untraced products of gamma matrices in exp [3]. GLUE3(l1,l2,l3) gives the tensor corresponding to the threegluon vertex represented by its arguments [3]. KINDEF(dotp1=rep1, dotp2=rep2, ...) defines kinematics substitutions dotp1=rep1,... [3]. NONCOV(exp) substitues the noncovariant components specified by COMPDEF for vectors and indices in dot products in exp [3] NSET(dim) sets the dimensionality of spacetime to dim [1]. SCALS(x1,..,xk) adds x1 through xk to the list of scalars [1]. SQ(spn1,amp,spn2) squares the amplitude amp sandwiched between the spinors spn1 and spn2 [2]. SQAM(spn1,amp1,spn2,amp2) sums over spins the amplitude squared amp1*conj(amp2) sandwiched between the spinors spn1 and spn2 [2]. TR(a1,a2,...) takes the trace of gamma matrices represented by its argument [1]. UNCIND(mu1,...,muk) removes mu1 through muk from the list of contracted indices [1]. UNCOMPDEF(vec1,ind1,vec2,vec3,...) removes the components defined for its arguments [3]. UNKINDEF(dotp1,...,dotpk) removes simplifications defined for dot products dotp1 through dotpk [3]. UNSCALS(x1,...,xk) removes x1 through xk from the list of scalars [2]. Pseudofunctions  D(p,q) dot product of p and q D(p,mu) mu component of the vector p D(mu,nu) mu, nu component of metric tensor EPS(p,q,r,s) totally antisymmetric product of p,q,r and s G(a1,...,ak) product of gamma matrices represented by a1,...,ak (list brackets around sets of arguments optional) UV(p,m) a fermion spinor with momentum p and mass m UVS(p,m,s) a polarized fermion spinor with spin s ZN(p,m) the numerator of a massive fermion propagator (p(slash)+m) ZD(p,m) or ZA(p,m) the full propagator for a massive fermion ((p(slash)+m)/(d(p,p)m*m)). [If ZERM:TRUE then m=0 will be assumed, and ZD(p) or ZA(p) may be used.] ZDEN(p,m) the denominator of a massive propagator (d(p,p)m^2) suitable for VIPER generated when VIRED:TRUE. Flags (Default values in brackets)  BORED[FALSE] if TRUE generates interest (TR0 entries and exits). COF[FALSE] if TRUE alphabetizes CRUNCH outputs by anticommutation. DEF[TRUE] if FALSE will prevent the expansion of dot products as they are generated DOF[TRUE] if FALSE will prevent alphabetization of dot products as they are generated DSIM[TRUE] if FALSE prevents dot product simplifications defined by KINDEF from being applied. EPSOF[TRUE] if FALSE will prevent alphabetization of epsilon symbols (antisymmetric products) as they are generated. EPSEF[TRUE] if FALSE will prevent expansion of epsilon symbols as they are generated. KAHAF[FALSE] if TRUE will cause the Kahane algorithm to be used on traces with many contracted indices in n=4. MTRICK[TRUE] if TRUE invokes a more efficient algorithm for treating traces with large numbers of massive spinor propagators in 4 dimensions. NOP[FALSE] if TRUE causes SQ to generate no primed indices (does Feynman gauge polarization sums). NTR[FALSE] if TRUE causes SQ to generate G's rather than TR's PLATU[FALSE] if TRUE uses the inefficient methods of templates for large traces VIRED[FALSE] if TRUE generates VIPERcompatible output. ZERM[FALSE] if TRUE assumes all particle masses to be zero. BORELEN determines the amount of interest generated when BORED:TRUE METSIG is the signature of the metric used by NONCOV (default [+,,,]) Information lists (initially empty)  COMPS is the list of components defined by COMPDEF IND is the list of contracted indices (which will be uncontracted if unpaired) KINS is the list of kinematic substitutions defined by KINDEF NPIND is the list of indices automatically summed over by SQ (or SQAM) SCALARS is the list of scalars 0. Loading GAMALG  To load GAMALG into a MACSYMA, do LOADFILE (GAMALG,>,SHARE); Some examples of the use of GAMALG may be executed by doing BATCH (GAM,DEMO,SHARE); . 1. Doing Traces  TR(a1,a2,....,ak) is the basic trace function in GAMALG. The ai can be: 1. Slashed Lorentz vectors. For example, p(slash)=gamma.p is represented by p, and p(slash)+k(slash)/2 by p+k/2. If a combination of vectors, such as x*p+q (where x is a scalar) is required then x must be declared as a scalar using SCALS (see below). 2. Uncontracted gamma matrices, represented by their indices. These are treated just as slashed vectors. 3. Contracted pairs of gamma matrices, also represented by their indices. These indices are specified by doing CIND(mu1,mu2,...muj); where the mui are the indices to be contracted. 4. Gamma[5], denoted by G5 (only for n=4). 5. LHP or RHP, the left and righthanded projection operators (also only for n=4). (LHP=(1G5)/2, RHP=(1+G5)/2) 6. The numerator of a massive spinor propagator, denoted by ZN(p,m). This will be expanded as p(slash)+m. 7. The complete fermion propagator, including denominator, denoted by ZD(p,m). This will be expanded as (p(slash)+m)/(d(p,p)m*m). If all particles required are massless, ZERM may be set to true, and the m in ZN and ZD omitted. Note that any list brackets ([,]) in the argument list of TR will be ignored. Any lists to be used in the argument of TR may of course be given names and manipulated outside of TR (e.g REVERSEd, APPENDed to, etc.). The output from TR is in the form of products of D(p,q) (representing the dot product of the vectors p and q), D(p,mu) (representing the mu comp onent of the vector p, where mu is an unpaired index), D(mu,nu) (representing the metric tensor), EPS(p,q,r,s) (representing the totally antisymmetric product of p,q,r and s), and scalars. Note that n is the dimensionality of spacetime. NSET(4); declares that all traces are to be done in 4 dimensions (n=4) (see below). All D(p,q) and EPS(p,q,r,s) are generated with their arguments in alphabetical order, to aid simplification of expressions. (This may be prevented by setting the flags DOF:FALSE and EPSOF:FALSE, respectively.) Also, unless DEF:FALSE and EPSEF:FALSE, all dot products and epsilon symbols of combinations of vectors will be expanded out as they are generated (e.g. D(p+k/2,q) > D(p,q)+D(k,q)/2 ). BTR(a1,a2,...,ak) takes the trace of the gamma matrices represented by its argument in a way that is more efficient than TR if many of the ai involve sums of vectors. (Essentially BTR computes the trace without expanding dot products, and only after simplifying the answer does it expand the dot products.) CIND(mu1,mu2,....muj) declares the indices mu1 through muj (which may be any atoms) to be contracted indices. They will be contracted by TR, CRUNCH and CON. The list of contracted indices is IND. Even if an index has been declared to be contracted by CIND, it cannot of course be contracted unless it appears twice. If a contracted index appears more than twice, an error will be printed. UNCIND(mu1,mu2,....muj) removes the contraction property from the indices mu1 through muj. NSET(dim) declares that all the operations should be performed in spacetime of dimension dim. (Note that dim must be close to 4  GAMALG cannot deal with gamma matrices in 3 or 5 dimensions.) If NSET is not performed, the dimensionality will be taken as n. NSET(4) will slightly restructure GAMALG so as to be more efficient at doing traces in 4 dimensions, and to treat gamma[5] correctly. It can only be repealed by reloading GAMALG. If n=4, then the Kahane algorithm may be invoked by setting KAHAF:TRUE. This will only be more efficient than the algorithm usually used by GAMALG for traces with very large numbers of contracted indices. SCALS(x1,..,xk) declares x1 through xk to be scalars (rather than vectors). SCALARS is the list of declared scalars. A variable need only be declared a scalar if it will appear in dot products, where it might be mistaken for a vector. UNSCALS(x1,...,xk) removes x1 through xk from the list of scalars. 2. Squaring Amplitudes  SQ(uv(pi,mi),wt1*g(a1,a2,a3,..,ak)+wt2*g(b1,b2,...,bj)+...,uv(pf,mf)) squares the amplitude {ubar(pi,mi)*a1*a2*...*ak*u(pf,mf)}*wt1 + {ubar(pi,mi)*b1*b2*...*bj*u(pf,mf)}*wt2 + ...... , where wt1, wt2, ... are the scalar weights of the various pieces of the amplitude (e.g. denominators of propagators etc.). The ai, bi, ... can be slashed vectors, indices, numerators of propagators (ZN(q,m)) as for TR If the m are omitted from UV,then they will be assumed to be zero. Note that setting the flag ZERM:TRUE will take all masses in uv, zn and zd as zero, and improve the efficiency of the program. Any of the ai, bi, ... which were declared as contracted indices by CIND, but which appear only once (i.e. uncontracted) in the amplitude (e.g. from external photons) will be replaced by the concatenation of their name with 'prime' in the conjugate of the amplitude, unless they appear in the list NPIND, in which case the indices in the conjugate amplitude will be the same as those in the amplitude, and will be contracted with them (for an external photon this corresponds to a Feynman gauge polarization sum). By setting the flag NOP:TRUE no primes will be generated, and all indices will be contracted. In squaring amplitudes, SQ takes UV(p,m)*conjugate(UV(p,m)) = ZN(p,m) = p(slash)+m. If UV(p,m) represents an antifermion spinor, then the second argument to UV should be minus the mass of the antifermion, instead of simply the mass as for a fermion. With some conventions, extra overall minus signs must be associated with antifermion propagators. For polarized fermions, the spinors UV(p,m) are replaced by UVS(p,m,s), where s is the spin vector of the fermion. The spin projection operator used is (1+G5*s(slash))/2. If the flag NTR:TRUE then SQ will generate G's (untraced products of gamma matrices) instead of TR's. The G's may be evaluated as TR's by using CGT, or may be manipulated using CRUNCH or COTR. When indices are to be contracted between different traces (as from a Feynman gauge photon propagator between two fermion lines), it is much more efficient to COTR G's and then use CGT than to perform the traces and then apply CON. SQAM(uv(pi,mi),wt1*g(a1,...,ak),uv(pf,mf),wt2*g(b1,b2,...,bj) sums over spins the product of amplitudes: {ubar(pi,mi)*a1*...*ak*u(pf,mf)}* conjugate{ubar(pi,mi)*b1*...*bj*u(pf,mf)} *wt1*wt2. 3. Contracting Indices etc.  CON(exp) contracts all pairs of indices in exp which have been declared by CIND. All contractions are performed in n dimensions so that D(mu,mu)=n. In GAMALG, the metric tensor with indices mu and nu is represented by D(mu,nu) while the mu component of the fourvector p is represented by D(p,mu) or D(mu,p). The dot product of two vectors p and q is represnted by D(p,q). CON also performs contractions involving epsilon symbols (totally antisymmetric products of four vectors in n=4) represented by eps(a1,a2,a3,a4). CON may be used on expressions containing untraced gamma matrix strings G(p1,...,pk). If SQRED:TRUE then these will be output from CON in a form suitable for input to SQ or SQAM. COTR(exp) takes products of G's in exp, assumes them to be traces, and then combines them into a single trace by contracting indices between them, if this is possible. COTR will only work in n=4. It returns GT's rather than G's, representing undone traces. These can be done using CGT. DFIX(exp) expands out all dot products in exp. For example, it replaces D(p+k/2,q) by D(p,q)+D(k,q)/2, D(mu,p+q) by D(mu,p)+D(mu,q), and D(x*p+q,k) by x*D(k,p)+D(k,q), where x is a scalar declared with SCALS. In all cases GAMALG alphabetizes the arguments to any D(a,b), mimicing the commutat ivity of the dot product. This alphabetization will be prevented if DOF:FALSE. Dot products will be expanded out automatically (rendering DFIX unnecessary) unless DEF:FALSE. Setting DEF:FALSE may well speed up some calculations, and prevent explosion of the number of terms in intermediate expressions. In evaluating traces, this will be done automatically if BTR, rather than TR, is used. The simplification of dot products is controlled by the flag DSIM[TRUE]. Unless DSIM:FALSE, the substitutions defined by KINDEFs will be applied to all dot products as they are generated. EPSFIX(exp) expands out all epsilon symbols in exp. Any epsilon symbol with two equal arguments will automatically be set to zero. Unless EPSOF:FALSE, the arguments to all epsilon symbols will be alphabetized (with suitable signs inserted for the signature of the permutation required) as they are generated. When EPSEF:TRUE, epsilon symbols will be expanded as they are generated. GLUE3([p1,mu1],[p2,mu2],[p3,mu3]) returns a tensor corresponding to the momentum space part of a threeboson vertex in YangMills theories. All momenta are taken to be ingoing. The complete amplitude for the vertex is g*f[a,b,c] times the tensor returned, where the order of the group indices is the same as that of the mui. The sign convention is such that a fermionfermionboson vertex is i*g*T[a,[i,j]]*gamma[mu]. 4. Simplifying Products of Gamma Matrices (G's)  CRUNCH(exp) simplifies all untraced products of slashed vectors and gamma matrices (represented by G's) in exp. It performs any contractions etc. possible in the product, and returns an expression in terms of D(p,q)... and G(a1,...,aj)... where the latter represnts a product of slashed vectors and gamma matrices. If the flag COF is set to TRUE (then CRUNCH anticommutes gamma matrices until all the arguments of the G(a1,...,aj) that it returns are in alphabet ical order. If COF is FALSE, then the arguments of the G(a1,...,aj) will be in an order that should give the shortest result if no cancellations occurred. In n=4, the Kahane algorithm will be used. List brackets in the arguments of any G's will be ignored. CGT(exp) will replace any G in exp with TR and evaluate the resulting traces. GFIX(exp) expands sums of vectors appearing in G's in exp. 5. Kinematic Substitutions  KINDEF(dotp1=rep1,...,dotpj=repj) sets up substitutions for the dot products dotp1,..dotpj (e.g. D(p,q)=s, d(p1,p1)=m^2, ...). These will be performed when the dot products are genrated unless DSIM:FALSE. The list of substitutions is contained in KINS. New substitutions for a particular dot product will overwrite old ones. UNKINDEF(dotp1,..,dotpj) removes the substituions for the dot products dotp1,...dotpj. COMPDEF, UNCOMPDEF and NONCOV perform noncovariant kinematics: descriptions not yet written  6. Technical Information  GAMALG sets the MACSYMA flags DSKGC:TRUE, PARTSWITCH:TRUE, LISTARITH:FALSE. It will not work if the last two flags are altered. The following atoms must not be bound: LHP, RHP, G5. D, G, TR must not be used at all (if they are, FREEOF will be got wrong.) Several of the functions above use alphabetiz ation. The 'alphabetized' order may be changed by giving aliases. The arrays CONTAB and CONTAB4 must not be altered  they contain tables used by TR and CRUNCH. Scalars declared by SCALS have the 'constant' property. GAMALG autoloads the disk files SHARE;GAM5 >, GAMKAH >, GAMMTR >, GAMCON > and GAMSQ >. A Request  GAMALG was originally written very quickly (in a few days) for a specific calculation. Since then it has been revised considerably. While we have tried to test it completely, it may still have bugs. If you discover any bugs, please tell us about them by doing (outside MACSYMA) :MAIL SWOLF,TREX (message) controlC. In addition, we would be very grateful for any suggestions about aditional features, simpler input formats, and so on. We hope that you find our program useful.  NEW FILE: nusum.usg  The small set of functions from loadfile(nusum,?>,dsk,share) is, I believe, a decision procedure for indefinite (i.e. FINITE) hypergeometric summation. Restrictions: 1) Both the summand and the answer must be expressible as products of nth pwrs, factorials, binomials, and rational fcns. Examples: nusum(n*n!,n,0,n); ==> (n+1)!  1 nusum(n^4*4^n/binomial(2*n,n),n,0,n); ==> <moby mess> unsum(%,n); ==> n^4*4^n/binomial(2*n,n) etc. (UNSUM was formerly called DELTA, and is just the first backward difference w.r.t. its 2nd arg, i.e. the inverse of sum.) Enjoy, rwg RWG@... 04/21/77 12:06:54 The fcns NUSUM and UNSUM in SHARE;NUSUM > now know a little about sums and differences of finite products, e.g. unsum(prod(i^2,i,1,n),n) ==> (n1)*(n+1)*prod(i^2, i,1,n1) and nusum(%,n,1,n) ==> prod(i^2,i,1,n)  1 .  NEW FILE: ode2.usg  MACSYMA's ordinary differential equation (ODE) solver ODE2 may be used for symbolically solving elementary ODEs of first and second order. One calls the ODE2 routine as follows: (C1) X^2*'DIFF(Y,X) + 3*X*Y = SIN(X)/X; 2 dY SIN(X) (D1) X  + 3 X Y =  dX X (C2) ODE2(%,Y,X); %C  COS(X) (D2) Y =  3 X We see from this example how ODE2 is used. Namely, it takes three arguments: an ODE of first or second order (only the left hand side need be given if the right hand side is 0), the dependent variable, and the independent variable. When successful, it returns either an explicit or implicit solution for the dependent variable. %C is used to represent the constant in the case of first order equations, and %K1 and %K2 the constants for second order equations. If ODE2 cannot obtain a solution for whatever reason, it returns FALSE, after perhaps printing out an error message. The methods implemented for first order equations in the order in which they are tested are: linear, separable, exact  perhaps requiring an integrating factor, homogeneous, Bernoulli's equation, and a generalized homogeneous method. For second order: constant coefficient, exact, linear homogeneous with nonconstant coefficients which can be transformed to constant coefficient, the Euler or equidimensional equation, the method of variation of parameters, and equations which are free of either the independent or of the dependent variable so that they can be reduced to two first order linear equations to be solved sequentially. In the course of solving ODEs, several variables are set purely for informational purposes: METHOD denotes the method of solution used e.g. LINEAR, INTFACTOR denotes any integrating factor used, ODEINDEX denotes the index for Bernoulli's method or for the generalized homogeneous method, and YP denotes the particular solution for the variation of parameters technique. In order to solve initial value problems (IVPs) and boundary value problems (BVPs), the routine IC1 is available for first order equations, and IC2 and BC2 for second order IVPs and BVPs, respectively. They are used as in the following examples: (C3) IC1(D2,X=%PI,Y=0); COS(X) + 1 (D3) Y =   3 X (C4) 'DIFF(Y,X,2) + Y*'DIFF(Y,X)^3 = 0; 2 d Y dY 3 (D4)  + Y () = 0 2 dX dX (C5) ODE2(%,Y,X); 3 Y  6 %K1 Y  6 X (D7)  = %K2 3 (C8) RATSIMP(IC2(D7,X=0,Y=0,'DIFF(Y,X)=2)); 3 2 Y  3 Y + 6 X (D9)   = 0 3 (C10) BC2(D7,X=0,Y=1,X=1,Y=3); 3 Y  10 Y  6 X (D11)  =  3 3 In order to see more clearly which methods have been implemented, a demonstration file is available. To run it, you may do DEMO(ODE2,DEMO,DSK,SHARE); .  NEW FILE: plot2.usg  This is the documentation for PLOT2 (SHARE;PLOT2 USAGE). This is a long file. If this is your first experience with PLOT2 read SHARE;PLOT2 PRIMER with contains examples and brief explanations of the most common PLOT2 capabilities. These examples are run for you by typing DEMO(PLOT2,DEMO,DSK,SHARE); (type spaces after the plots). Please look at SHARE;PLOT2 RECENT as well for updates as to the current state of affairs. (Last revision of this file: August 1981.) Description of PLOT2 0) Introduction This is a description of the functions contained in the following 7 files: APLOT2 > DSK CFFK TEKPLT > DSK CFFK PLOT3D > DSK CFFK WORLD > DSK CFFK PRINT > DSK CFFK [...2391 lines suppressed...] YAXIS:ALL, GRAPH2([], [])), plot Y axis BLOCK([YMAX, YMIN, XAXIS], do same for X axis YMAX:1, YMIN:1, WINDOW:COPYLIST(OWINDOW), WINDOW[3]:0, WINDOW[4]:200, XAXIS:ALL, GRAPH2([], [], LAST))); 19) Acknowledgements PLOT2 was primarily written by me (Charles Karney) during 197576 while I was a graduate student in the Plasma Physics Group of the Department of Electrical Engineering and Computer Sciences at MIT. Several other members of the Plasma Physics Group contributed assistance and ideas. In particular John Kulp was responsible for overseeing the computational side of the group's activities and installed the system of graphics terminals that allowed MACSYMA to become a useful tool for online graphics. This work was supported by the Department of Energy.  NEW FILE: trgsmp.html  <!DOCTYPE HTML PUBLIC "//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>404 Not Found</TITLE> </HEAD><BODY> <H1>Not Found</H1> The requested URL /crew/mike/maxima/html/macref/share/trgsmp.dem was not found on this server.<P> <HR> <ADDRESS>Apache/1.3.27 Server at starship.python.net Port 80</ADDRESS> </BODY></HTML>  NEW FILE: trgsmp.usg  File TRGSMP > contains a simplifier which employs the identities sin(x)^2 + cos(x)^2 = 1 and cosh(x)^2  sinh(x)^2 = 1 in a manner different from any of the builtin trigonometric simplifiers. Usage is of the form TRIGSIMP(expression). Code added 7/5/80 by ELL to convert other trig and hyper trig functions to sin and cos. The result will still be in terms of sin,cos,sinh and cosh. Further reduction can sometimes be effected by using TRIGREDUCE on the value returned by TRIGSIMP. Send questions and comments to David R. Stoutemyer, Electrical Engineering Department, University of Hawaii, Honolulu, Hawaii 96822 (login name: STOUTE).  NEW FILE: vect.dem  /* DEMO FILE. */ /* until translated and compiled, use .MC file in DOE MACSYMA */ IF GET('VECT,'VERSION)=FALSE THEN LOAD("VECT.mc")$ /* First, we establish p, q, f, and g as vector entities:*/ DECLARE([P, Q, F, G], NONSCALAR) $ /* To attempt to prove the following vector identity:*/ (P~Q).(F~G) + (Q~F).(P~G) + (F~P).(Q~G) = 0; /* Evidently default simplifications are not drastic enough, so let us try: */ VECTORSIMP(%), EXPANDALL; /* Now, to determine the expansion of: */ EXAMPLE: LAPLACIAN(%PI*(S+H)) = DIV(3*S*P); VECTORSIMP(EXAMPLE), EXPANDALL:TRUE; /* Now, suppose we wish to find the specific representation of this equation in parabolic coordinates. On MC, LOAD("SHARE;VECT ORTH"); gives access to numerous orthogonal curvilinear coordinate definitions. On UNIX and VMS systems, load('vect_orth);. One of these is for parabolic coordinates: */ PARABOLIC: [[(U^2V^2)/2, U*V], U, V]; /*First, we use the function scalefactors to derive a set of global scale factors, then we use the function express to express its argument in the corresponding coordinate system:*/ SCALEFACTORS(PARABOLIC) $ EXAMPLE:EXPRESS(EXAMPLE); /*Suppose that s is dependent upon both u and v, h is dependent upon only u, and p is dependent only upon v. To expand the above derivatives, taking advantage of these simplifications:*/ DEPENDS([S,H],U, [S,P],V) $ EXAMPLE,DIFF,FACTOR; /* Now, suppose that we are given the following gradient, in parabolic coordinates:*/ EXAMPLE: [(2*U*V**3+3*U**3*V)/(V**2+U**2), (2*U**2*V**2+U**4)/(U**2+V**2)]; /*To determine the corresponding scalar potential, relative to the potential at point [0,0]:*/ POTENTIAL(EXAMPLE); /*There is an analagous function named VECTORPOTENTIAL that computes the vector potential associated with a given curl vector.*/  NEW FILE: vect.usg  NOTE: The current version of VECT is the one due to Stoutemyer from the summer of 1977. It will be replaced soon by a package which handles vectors and dyadics (as soon as I clean up a few remaining details and write a new version of this usage file). Michael C. Wirth (MCW), 12/18/78 BATCH file VECT > DSK SHARE contains a vector analysis package, DEMO file VECT DEMO DSK SHARE contains a corresponding demonstration, and BATCH file VECT ORTH DSK SHARE contains definitions of various orthogonal curvilinear coordinate systems. Send questions or comments to David R. Stoutemyer, Electrical Engineering Department, University of Hawaii, Honolulu, Hawaii 96822, (login name: STOUTE). The vector analysis package can combine and simplify symbolic expressions including dot products and cross products, together with the gradient, divergence, curl, and Laplacian operators. The distribution of these operators over sums or products is under user control, as are various other expansions, including expansion into components in any specific orthogonal coordinate systems. There is also a capability for deriving the scalar or vector potential of a field. To establish indeterminate1, indeterminate2, ... as vector entities, type DECLARE([indeterminate1, indeterminate2, ...], NONSCALAR) $ Vectors can also be represented as lists of components. "." is the dotproduct operator, "~" is the crossproduct operator, GRAD is the gradient operator, DIV is the divergence operator, CURL is the curl or rotation operator, and LAPLACIAN is DIV GRAD. Most noncontroversial simplifications are automatic. For additional simplification, there is a function which can be used in the form VECTORSIMP(vectorexpression) This function employs additional noncontroversial simplifications, together with various optional expansions according to the settings of the following global flags: EXPANDALL, EXPANDDOT, EXPANDDOTPLUS, EXPANDCROSS, EXPANDCROSSPLUS, EXPANDCROSSCROSS, EXPANDGRAD, EXPANDGRADPLUS, EXPANDGRADPROD, EXPANDDIV, EXPANDDIVPLUS, EXPANDDIVPROD, EXPANDCURL, EXPANDCURLPLUS, EXPANDCURLCURL, EXPANDLAPLACIAN, EXPANDLAPLACIANPLUS, EXPANDLAPLACIANPROD. The PLUS suffix refers to employing additivity or distributivity. The PROD suffix refers to the expansion for an operand that is any kind of product. EXPANDCROSSCROSS refers to replacing p~(q~r) with (p.r)*q(p.q)*r, and EXPANDCURLCURL refers to replacing CURL CURL p with GRAD DIV p + DIV GRAD p. EXPANDCROSS=TRUE has the same effect as EXPANDCROSSPLUS=EXPANDCROSSCROSS=TRUE, etc. Two other flags, EXPANDPLUS and EXPANDPROD, have the same effect as setting all similarly suffixed flags true. When TRUE, another flag named EXPANDLAPLACIANTODIVGRAD, replaces the LAPLACIAN operator with the composition DIV GRAD. All of these flags are initially FALSE. For convenience, all of these flags have been declared EVFLAG. For orthogonal curvilinear coordinates, the global variables COORDINATES, DIMENSION, SF, and SFPROD are set by the function invocation SCALEFACTORS(coordinatetransform) $ Here coordinatetransform evaluates to the form [[expression1, expression2, ...], indeterminate1, indeterminat2, ...], where indeterminate1, indeterminate2, etc. are the curvilinear coordinate variables and where a set of rectangular Cartesian components is given in terms of the curvilinear coordinates by [expression1, expression2, ...]. COORDINATES is set to the vector [indeterminate1, indeterminate2, ...], and DIMENSION is set to the length of this vector. SF[1], SF[2], ..., SF[DIMENSION] are set to the coordinate scale factors, and SFPROD is set to the product of these scale factors. Initially, COORDINATES is [X, Y, Z], DIMENSION is 3, and SF[1]=SF[2]=SF[3]=SFPROD=1, corresponding to 3dimensional rectangular Cartesian coordinates. To expand an expression into physical components in the current coordinate system, there is a function with usage of the form EXPRESS(expression). The result uses the noun form of any derivatives arising from expansion of the vector differential operators. To force evaluation of these derivatives, the builtin EV function can be used together with the DIFF evflag, after using the builtin DEPENDS function to establish any new implicit dependencies. The scalar potential of a given gradient vector, in the current coordinate system, is returned as the result of POTENTIAL(givengradient). The calculation makes use of the global variable POTENTIALZEROLOC, which must be NONLIST or of the form [indeterminatej=expressionj, indeterminatek=expressionk, ...], the former being equivalent to the nonlist expression for all righthand sides in the latter. The indicated righthand sides are used as the lower limit of integration. The success of the integrations may depend upon their values and order. POTENTIALZEROLOC is initially set to 0. The vector potential of a given curl vector, in the current coordinate system, is returned as the result of VECTORPOTENTIAL(givencurl). POTENTIALZEROLOC has a similar role as for POTENTIAL, but the order of the lefthand sides of the equations must be a cyclic permutation of the coordinate variables. EXPRESS, POTENTIAL, and VECTORPOTENTIAL can have a second argument like the argument of SCALEFACTORS, causeing an corresponding invocation of SCALEFACTORS before the other computations. Warning: The VECT package DECLAREs "." to be a commutative operator. 
Sign up for the SourceForge newsletter:
No, thanks