This may happen on the first request due to CSS mimetype issues. Try clearing your browser cache and refreshing.

Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

CloseUpdate of /cvsroot/maxima/htdocs/docs/original In directory sc8-pr-cvs1:/tmp/cvs-serv20699 Added Files: maxima_1.html maxima_10.html maxima_11.html maxima_12.html maxima_13.html maxima_14.html maxima_15.html maxima_16.html maxima_17.html maxima_18.html maxima_19.html maxima_2.html maxima_20.html maxima_21.html maxima_22.html maxima_23.html maxima_24.html maxima_25.html maxima_26.html maxima_27.html maxima_28.html maxima_29.html maxima_3.html maxima_30.html maxima_31.html maxima_32.html maxima_33.html maxima_34.html maxima_35.html maxima_36.html maxima_37.html maxima_38.html maxima_39.html maxima_4.html maxima_40.html maxima_41.html maxima_42.html maxima_5.html maxima_6.html maxima_7.html maxima_8.html maxima_9.html maxima_toc.html maximareforig.pdf Log Message: Original Maxima reference manual --- NEW FILE: maxima_1.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Introduction to MAXIMA</TITLE> <link href="maxima_2.html" rel=Next> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the first, previous, <A HREF="maxima_2.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC1" HREF="maxima_toc.html#TOC1">Introduction to MAXIMA</A></H1> <P> Start MAXIMA with the command "maxima". MAXIMA will display version information and a prompt. End each MAXIMA command with a semicolon. End the session with the command "quit();". Here's a sample session: </P> <PRE> sonia$ maxima GCL (GNU Common Lisp) Version(2.3) Tue Mar 21 14:15:15 CST 2000 Licensed under GNU Library General Public License Contains Enhancements by W. Schelter Maxima 5.4 Tue Mar 21 14:14:45 CST 2000 (enhancements by W. Schelter) Licensed under the GNU Public License (see file COPYING) (C1) factor(10!); 8 4 2 (D1) 2 3 5 7 (C2) expand((x+y)^6); 6 5 2 4 3 3 4 2 5 6 (D2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x (C3) factor(x^6-1); 2 2 (D3) (x - 1) (x + 1) (x - x + 1) (x + x + 1) (C4) quit(); sonia$ </PRE> <P> MAXIMA can search the info pages. Use the <KBD>describe</KBD> command to show all the commands and variables containing a string, and optionally their documentation: </P> <PRE> (C1) describe(factor); 0: DONTFACTOR :(maxima.info)Definitions for Matrices and .. 1: EXPANDWRT_FACTORED :Definitions for Simplification. 2: FACTOR :Definitions for Polynomials. 3: FACTORFLAG :Definitions for Polynomials. 4: FACTORIAL :Definitions for Number Theory. 5: FACTOROUT :Definitions for Polynomials. 6: FACTORSUM :Definitions for Polynomials. 7: GCFACTOR :Definitions for Polynomials. 8: GFACTOR :Definitions for Polynomials. 9: GFACTORSUM :Definitions for Polynomials. 10: MINFACTORIAL :Definitions for Number Theory. 11: NUMFACTOR :Definitions for Special Functions. 12: SAVEFACTORS :Definitions for Polynomials. 13: SCALEFACTORS :Definitions for Miscellaneous Options. 14: SOLVEFACTORS :Definitions for Equations. Enter n, all, none, or multiple choices eg 1 3 : 2 8; Info from file /d/linux/local/lib/maxima-5.4/info/maxima.info: - Function: FACTOR (EXP) factors the expression exp, containing any number of variables or functions, into factors irreducible over the integers. FACTOR(exp, p) factors exp over the field of integers with an element adjoined whose minimum polynomial is p. FACTORFLAG[FALSE] if FALSE suppresses the factoring of integer factors of rational expressions. DONTFACTOR may be set to a list of variables with respect to which factoring is not to occur. (It is initially empty). Factoring also will not take place with respect to any variables which are less important (using the variable ordering assumed for CRE form) than those on the DONTFACTOR list. SAVEFACTORS[FALSE] if TRUE causes the factors of an expression which is a product of factors to be saved by certain functions in order to speed up later factorizations of expressions containing some of the same factors. BERLEFACT[TRUE] if FALSE then the Kronecker factoring algorithm will be used otherwise the Berlekamp algorithm, which is the default, will be used. INTFACLIM[1000] is the largest divisor which will be tried when factoring a bignum integer. If set to FALSE (this is the case when the user calls FACTOR explicitly), or if the integer is a fixnum (i.e. fits in one machine word), complete factorization of the integer will be attempted. The user's setting of INTFACLIM is used for internal calls to FACTOR. Thus, INTFACLIM may be reset to prevent MACSYMA from taking an inordinately long time factoring large integers. NEWFAC[FALSE] may be set to true to use the new factoring routines. Do EXAMPLE(FACTOR); for examples. - Function: GFACTOR (EXP) factors the polynomial exp over the Gaussian integers (i. e. with SQRT(-1) = %I adjoined). This is like FACTOR(exp,A**2+1) where A is %I. (C1) GFACTOR(X**4-1); (D1) (X - 1) (X + 1) (X + %I) (X - %I) (D1) FALSE </PRE> <P> To use a result in later calculations, you can assign it to a variable or refer to it by its automatically supplied label. In addition, <KBD>%</KBD> refers to the most recent calculated result: </P> <PRE> (C2) u:expand((x+y)^6); 6 5 2 4 3 3 4 2 5 6 (D2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x (C3) diff(u,x); 5 4 2 3 3 2 4 5 (D3) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x (C4) factor(d3); 5 (D4) 6 (y + x) </PRE> <P> MAXIMA knows about complex numbers and numerical constants: </P> <PRE> (C6) cos(%pi); (D6) - 1 (C7) %e^(%i*%pi); (D7) - 1 </PRE> <P> MAXIMA can do differential and integral calculus: </P> <PRE> (C8) u:expand((x+y)^6); 6 5 2 4 3 3 4 2 5 6 (D8) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x (C9) diff(%,x); 5 4 2 3 3 2 4 5 (D9) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x (C10) integrate(1/(1+x^3),x); 2 x - 1 2 ATAN(-------) LOG(x - x + 1) SQRT(3) LOG(x + 1) (D10) - --------------- + ------------- + ---------- 6 SQRT(3) 3 </PRE> <P> MAXIMA can solve linear systems and cubic equations: </P> <PRE> (C11) linsolve( [ 3*x + 4*y = 7, 2*x + a*y = 13], [x,y]); 7 a - 52 25 (D11) [x = --------, y = -------] 3 a - 8 3 a - 8 (C12) solve( x^3 - 3*x^2 + 5*x = 15, x); (D12) [x = - SQRT(5) %I, x = SQRT(5) %I, x = 3] </PRE> <P> MAXIMA can solve nonlinear sets of equations. Note that if you don't want a result printed, you can finish your command with <KBD>$</KBD> instead of <KBD>;</KBD>. </P> <PRE> (C13) eq1: x^2 + 3*x*y + y^2 = 0$ (C14) eq2: 3*x + y = 1$ (C15) solve([eq1, eq2]); 3 SQRT(5) + 7 SQRT(5) + 3 (D15) [[y = - -------------, x = -----------], 2 2 3 SQRT(5) - 7 SQRT(5) - 3 [y = -------------, x = - -----------]] 2 2 </PRE> <P> Under the X window system, MAXIMA can generate plots of one or more functions: </P> <PRE> (C13) plot2d(sin(x)/x,[x,-20,20]); (YMIN -3.0 YMAX 3.0 0.29999999999999999) (D13) 0 (C14) plot2d([atan(x), erf(x), tanh(x)], [x,-5,5]); (YMIN -3.0 YMAX 3.0 0.29999999999999999) (YMIN -3.0 YMAX 3.0 0.29999999999999999) (YMIN -3.0 YMAX 3.0 0.29999999999999999) (D14) 0 (C15) plot3d(sin(sqrt(x^2+y^2))/sqrt(x^2+y^2),[x,-12,12],[y,-12,12]); (D15) 0 </PRE> <P> Moving the cursor to the top left corner of the plot window will pop up a menu that will, among other things, let you generate a PostScript file of the plot. (By default, the file is placed in your home directory.) You can rotate a 3D plot. </P> <P><HR><P> <p>Go to the first, previous, <A HREF="maxima_2.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_10.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Contexts</TITLE> <link href="maxima_11.html" rel=Next> <link href="maxima_9.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_9.html">previous</A>, <A HREF="maxima_11.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC36" HREF="maxima_toc.html#TOC36">Contexts</A></H1> <H2><A NAME="SEC37" HREF="maxima_toc.html#TOC37">Definitions for Contexts</A></H2> <P> <DL> <DT><U>Function:</U> <B>ACTIVATE</B> <I>(cont1, cont2, ...)</I> <DD><A NAME="IDX303"></A> causes the specified contexts conti to be activated. The facts in these contexts are used in making deductions and retrieving information. The facts in these contexts are not listed when FACTS(); is done. The variable ACTIVECONTEXTS is the list of contexts which are active by way of the ACTIVATE function. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ACTIVECONTEXTS</B> <DD><A NAME="IDX304"></A> default: [] is a list of the contexts which are active by way of the ACTIVATE function, as opposed to being active because they are subcontexts of the current context. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASSUME</B> <I>(pred1, pred2, ...)</I> <DD><A NAME="IDX305"></A> First checks the specified predicates for redundancy and consistency with the current data base. If the predicates are consistent and non-redundant, they are added to the data base; if inconsistent or redundant, no action is taken. ASSUME returns a list whose entries are the predicates added to the data base and the atoms REDUNDANT or INCONSISTENT where applicable. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ASSUMESCALAR</B> <DD><A NAME="IDX306"></A> default: [TRUE] - helps govern whether expressions <CODE>exp</CODE> for which </P> <PRE> NONSCALARP(exp) is FALSE </PRE> <P> are assumed to behave like scalars for certain transformations as follows: Let <CODE>exp</CODE> represent any non-list/non-matrix, and <CODE>[1,2,3]</CODE> any list or matrix. <PRE> exp.[1,2,3]; ==> [exp,2*exp,3*exp] </PRE> <P> if ASSUMESCALAR is TRUE or SCALARP(exp) is TRUE or CONSTANTP(exp) is TRUE. If ASSUMESCALAR is TRUE, such expressions will behave like scalars only for the commutative operators, but not for ".". If ASSUMESCALAR is FALSE, such expressions will behave like non-scalars. If ASSUMESCALAR is ALL, such expressions will behave like scalars for all the operators listed above. </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>ASSUME_POS</B> <DD><A NAME="IDX307"></A> default:[FALSE] - When using INTEGRATE, etc. one often introduces parameters which are real and positive or one's calculations can often be constructed so that this is true. There is a switch ASSUME_POS (default FALSE) such that if set to TRUE, MACSYMA will assume one's parameters are positive. The intention here is to cut down on the number of questions MACSYMA needs to ask. Obviously, ASSUME information or any contextual information present will take precedence. The user can control what is considered to be a parameter for this purpose. Parameters by default are those which satisfy SYMBOLP(x) OR SUBVARP(x). The user can change this by setting the option ASSUME_POS_PRED [default FALSE] to the name of a predicate function of one argument. E.g. if you want only symbols to be parameters, you can do ASSUME_POS:TRUE$ ASSUME_POS_PRED:'SYMBOLP$ SIGN(A); -> POS, SIGN(A[1]); -> PNZ. </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>ASSUME_POS_PRED</B> <DD><A NAME="IDX308"></A> default:[FALSE] - may be set to one argument to control what will be considered a parameter for the "assumptions" that INTEGRATE will make... see ASSUME and ASSUME_POS . </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>CONTEXT</B> <DD><A NAME="IDX309"></A> default: INITIAL. Whenever a user assumes a new fact, it is placed in the context named as the current value of the variable CONTEXT. Similarly, FORGET references the current value of CONTEXT. To change contexts, simply bind CONTEXT to the desired context. If the specified context does not exist it will be created by an invisible call to NEWCONTEXT. The context specified by the value of CONTEXT is automatically activated. (Do DESCRIBE(CONTEXTS); for a general description of the CONTEXT mechanism.) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>CONTEXTS</B> <DD><A NAME="IDX310"></A> default: [INITIAL,GLOBAL] is a list of the contexts which currently exist, including the currently active context. The context mechanism makes it possible for a user to bind together and name a selected portion of his data base, called a context. Once this is done, the user can have MACSYMA assume or forget large numbers of facts merely by activating or deactivating their context. Any symbolic atom can be a context, and the facts contained in that context will be retained in storage until the user destroys them individually by using FORGET or destroys them as a whole by using KILL to destroy the context to which they belong. Contexts exist in a formal hierarchy, with the root always being the context GLOBAL, which contains information about MACSYMA that some functions need. When in a given context, all the facts in that context are "active" (meaning that they are used in deductions and retrievals) as are all the facts in any context which is an inferior of that context. When a fresh MACSYMA is started up, the user is in a context called INITIAL, which has GLOBAL as a subcontext. The functions which deal with contexts are: FACTS, NEWCONTEXT, SUPCONTEXT, KILLCONTEXT, ACTIVATE, DEACTIVATE, ASSUME, and FORGET. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEACTIVATE</B> <I>(cont1, cont2, ...)</I> <DD><A NAME="IDX311"></A> causes the specified contexts conti to be deactivated. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FACTS</B> <I>(item)</I> <DD><A NAME="IDX312"></A> If 'item' is the name of a context then FACTS returns a list of the facts in the specified context. If no argument is given, it lists the current context. If 'item' is not the name of a context then it returns a list of the facts known about 'item' in the current context. Facts that are active, but in a different context, are not listed. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>FEATURES</B> <DD><A NAME="IDX313"></A> - MACSYMA has built-in properties which are handled by the data base. These are called FEATURES. One can do DECLARE(N,INTEGER), etc. One can also DECLARE one's own FEATURES by e.g. DECLARE( INCREASING, FEATURE); which will then allow one to say DECLARE(F, INCREASING);. One can then check if F is INCREASING by using the predicate FEATUREP via FEATUREP(F, INCREASING). There is an infolist FEATURES which is a list of known FEATURES. At present known FEATURES are: INTEGER, NONINTEGER, EVEN, ODD, RATIONAL, IRRATIONAL, REAL, IMAGINARY, COMPLEX, ANALYTIC, INCREASING, DECREASING, ODDFUN, EVENFUN, POSFUN, COMMUTATIVE, LASSOCIATIVE, RASSOCIATIVE, SYMMETRIC, and ANTISYMMETRIC. [Note: system "features" may be checked with STATUS(FEATURE, ...); See DESCRIBE(STATUS); or DESCRIBE(FEATURE); for details.] </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FORGET</B> <I>(pred1, pred2, ...)</I> <DD><A NAME="IDX314"></A> removes relations established by ASSUME. The predicates may be expressions equivalent to (but not necessarily identical to) those previously ASSUMEd. FORGET(list) is also a legal form. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>KILLCONTEXT</B> <I>(context1,context2,...,contextn)</I> <DD><A NAME="IDX315"></A> kills the specified contexts. If one of them is the current context, the new current context will become the first available subcontext of the current context which has not been killed. If the first available unkilled context is GLOBAL then INITIAL is used instead. If the INITIAL context is killed, a new INITIAL is created, which is empty of facts. KILLCONTEXT doesn't allow the user to kill a context which is currently active, either because it is a subcontext of the current context, or by use of the function ACTIVATE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NEWCONTEXT</B> <I>(name)</I> <DD><A NAME="IDX316"></A> creates a new (empty) context, called name, which has GLOBAL as its only subcontext. The new context created will become the currently active context. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUPCONTEXT</B> <I>(name,context)</I> <DD><A NAME="IDX317"></A> will create a new context (called name) whose subcontext is context. If context is not specified, the current context will be assumed. If it is specified, context must exist. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_9.html">previous</A>, <A HREF="maxima_11.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_11.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Polynomials</TITLE> <link href="maxima_12.html" rel=Next> <link href="maxima_10.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_10.html">previous</A>, <A HREF="maxima_12.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC38" HREF="maxima_toc.html#TOC38">Polynomials</A></H1> [...1096 lines suppressed...] RATDISREP but if not then RATDISREP would return exp unchanged while TOTALDISREP would "totally disrep" it. This is useful for ratdisrepping expressions e.g., equations, lists, matrices, etc. which have some subexpressions in CRE form. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNTELLRAT</B> <I>(x)</I> <DD><A NAME="IDX380"></A> takes kernels and removes TELLRAT properties. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_10.html">previous</A>, <A HREF="maxima_12.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_12.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Constants</TITLE> <link href="maxima_13.html" rel=Next> <link href="maxima_11.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_11.html">previous</A>, <A HREF="maxima_13.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC41" HREF="maxima_toc.html#TOC41">Constants</A></H1> <H2><A NAME="SEC42" HREF="maxima_toc.html#TOC42">Definitions for Constants</A></H2> <P> <DL> <DT><U>Variable:</U> <B>E</B> <DD><A NAME="IDX381"></A> - The base of natural logarithms, e, is represented in MACSYMA as %E. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FALSE</B> <DD><A NAME="IDX382"></A> - the Boolean constant, false. (NIL in LISP) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MINF</B> <DD><A NAME="IDX383"></A> - real minus infinity. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>PI</B> <DD><A NAME="IDX384"></A> - "pi" is represented in MACSYMA as %PI. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TRUE</B> <DD><A NAME="IDX385"></A> - the Boolean constant, true. (T in LISP) </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_11.html">previous</A>, <A HREF="maxima_13.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_13.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Logarithms</TITLE> <link href="maxima_14.html" rel=Next> <link href="maxima_12.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_12.html">previous</A>, <A HREF="maxima_14.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC43" HREF="maxima_toc.html#TOC43">Logarithms</A></H1> <H2><A NAME="SEC44" HREF="maxima_toc.html#TOC44">Definitions for Logarithms</A></H2> <P> <DL> <DT><U>Function:</U> <B>LOG</B> <I>(X)</I> <DD><A NAME="IDX386"></A> the natural logarithm. </P> <P> LOGEXPAND[TRUE] - causes LOG(A^B) to become B*LOG(A). If it is set to ALL, LOG(A*B) will also simplify to LOG(A)+LOG(B). If it is set to SUPER, then LOG(A/B) will also simplify to LOG(A)-LOG(B) for rational numbers a/b, a#1. (LOG(1/B), for B integer, always simplifies.) If it is set to FALSE, all of these simplifications will be turned off. </P> <P> LOGSIMP[TRUE] - if FALSE then no simplification of %E to a power containing LOG's is done. </P> <P> LOGNUMER[FALSE] - if TRUE then negative floating point arguments to LOG will always be converted to their absolute value before the log is taken. If NUMER is also TRUE, then negative integer arguments to LOG will also be converted to their absolute value. </P> <P> LOGNEGINT[FALSE] - if TRUE implements the rule LOG(-n) -> LOG(n)+%i*%pi for n a positive integer. </P> <P> %E_TO_NUMLOG[FALSE] - when TRUE, "r" some rational number, and "x" some expression, %E^(r*LOG(x)) will be simplified into x^r . It should be noted that the RADCAN command also does this transformation, and more complicated transformations of this ilk as well. The LOGCONTRACT command "contracts" expressions containing LOG. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGABS</B> <DD><A NAME="IDX387"></A> default: [FALSE] - when doing indefinite integration where logs are generated, e.g. INTEGRATE(1/X,X), the answer is given in terms of LOG(ABS(...)) if LOGABS is TRUE, but in terms of LOG(...) if LOGABS is FALSE. For definite integration, the LOGABS:TRUE setting is used, because here "evaluation" of the indefinite integral at the endpoints is often needed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGARC</B> <DD><A NAME="IDX388"></A> default: [FALSE] - if TRUE will cause the inverse circular and hyperbolic functions to be converted into logarithmic form. LOGARC(exp) will cause this conversion for a particular expression without setting the switch or having to re-evaluate the expression with EV. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGCONCOEFFP</B> <DD><A NAME="IDX389"></A> default:[FALSE] - controls which coefficients are contracted when using LOGCONTRACT. It may be set to the name of a predicate function of one argument. E.g. if you like to generate SQRTs, you can do LOGCONCOEFFP:'LOGCONFUN$ LOGCONFUN(M):=FEATUREP(M,INTEGER) OR RATNUMP(M)$ . Then LOGCONTRACT(1/2*LOG(X)); will give LOG(SQRT(X)). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LOGCONTRACT</B> <I>(exp)</I> <DD><A NAME="IDX390"></A> recursively scans an exp, transforming subexpressions of the form a1*LOG(b1) + a2*LOG(b2) + c into LOG(RATSIMP(b1^a1 * b2^a2)) + c <PRE> (C1) 2*(A*LOG(X) + 2*A*LOG(Y))$ (C2) LOGCONTRACT(%); 2 4 (D3) A LOG(X Y ) </PRE> <P> If you do DECLARE(N,INTEGER); then LOGCONTRACT(2*A*N*LOG(X)); gives A*LOG(X^(2*N)). The coefficients that "contract" in this manner are those such as the 2 and the N here which satisfy FEATUREP(coeff,INTEGER). The user can control which coefficients are contracted by setting the option LOGCONCOEFFP[FALSE] to the name of a predicate function of one argument. E.g. if you like to generate SQRTs, you can do LOGCONCOEFFP:'LOGCONFUN$ LOGCONFUN(M):=FEATUREP(M,INTEGER) OR RATNUMP(M)$ . Then LOGCONTRACT(1/2*LOG(X)); will give LOG(SQRT(X)). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGEXPAND</B> <DD><A NAME="IDX391"></A> default: [TRUE] - causes LOG(A^B) to become B*LOG(A). If it is set to ALL, LOG(A*B) will also simplify to LOG(A)+LOG(B). If it is set to SUPER, then LOG(A/B) will also simplify to LOG(A)-LOG(B) for rational numbers a/b, a#1. (LOG(1/B), for B integer, always simplifies.) If it is set to FALSE, all of these simplifications will be turned off. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGNEGINT</B> <DD><A NAME="IDX392"></A> default: [FALSE] - if TRUE implements the rule LOG(-n) -> LOG(n)+%i*%pi for n a positive integer. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGNUMER</B> <DD><A NAME="IDX393"></A> default: [FALSE] - if TRUE then negative floating point arguments to LOG will always be converted to their absolute value before the log is taken. If NUMER is also TRUE, then negative integer arguments to LOG will also be converted to their absolute value. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LOGSIMP</B> <DD><A NAME="IDX394"></A> default: [TRUE] - if FALSE then no simplification of %E to a power containing LOG's is done. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PLOG</B> <I>(X)</I> <DD><A NAME="IDX395"></A> the principal branch of the complex-valued natural logarithm with -%PI < CARG(X) <= +%PI . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POLARFORM</B> <I>(exp)</I> <DD><A NAME="IDX396"></A> returns R*%E^(%I*THETA) where R and THETA are purely real. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_12.html">previous</A>, <A HREF="maxima_14.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_14.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Trigonometric</TITLE> <link href="maxima_15.html" rel=Next> <link href="maxima_13.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_13.html">previous</A>, <A HREF="maxima_15.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC45" HREF="maxima_toc.html#TOC45">Trigonometric</A></H1> <H2><A NAME="SEC46" HREF="maxima_toc.html#TOC46">Introduction to Trigonometric</A></H2> <P> - MACSYMA has many Trig functions defined. Not all Trig identities are programmed, but it is possible for the user to add many of them using the pattern matching capabilities of the system. The Trig functions defined in MACSYMA are: ACOS, ACOSH, ACOT, ACOTH, ACSC, ACSCH, ASEC, ASECH, ASIN, ASINH, ATAN, ATANH, COS, COSH, COT, COTH, CSC, CSCH, SEC, SECH, SIN, SINH, TAN, and TANH. There are a number of commands especially for handling Trig functions, see TRIGEXPAND, TRIGREDUCE, and the switch TRIGSIGN. Two SHARE packages extend the simplification rules built into MACSYMA, NTRIG and ATRIG1. Do DESCRIBE(cmd) for details. </P> <H2><A NAME="SEC47" HREF="maxima_toc.html#TOC47">Definitions for Trigonometric</A></H2> <P> <DL> <DT><U>Function:</U> <B>ACOS</B> <DD><A NAME="IDX397"></A> - Arc Cosine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ACOSH</B> <DD><A NAME="IDX398"></A> - Hyperbolic Arc Cosine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ACOT</B> <DD><A NAME="IDX399"></A> - Arc Cotangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ACOTH</B> <DD><A NAME="IDX400"></A> - Hyperbolic Arc Cotangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ACSC</B> <DD><A NAME="IDX401"></A> - Arc Cosecant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ACSCH</B> <DD><A NAME="IDX402"></A> - Hyperbolic Arc Cosecant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASEC</B> <DD><A NAME="IDX403"></A> - Arc Secant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASECH</B> <DD><A NAME="IDX404"></A> - Hyperbolic Arc Secant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASIN</B> <DD><A NAME="IDX405"></A> - Arc Sine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASINH</B> <DD><A NAME="IDX406"></A> - Hyperbolic Arc Sine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ATAN</B> <DD><A NAME="IDX407"></A> - Arc Tangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ATAN2</B> <I>(Y,X)</I> <DD><A NAME="IDX408"></A> yields the value of ATAN(Y/X) in the interval -%PI to %PI. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ATANH</B> <DD><A NAME="IDX409"></A> - Hyperbolic Arc Tangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ATRIG1</B> <DD><A NAME="IDX410"></A> - SHARE1;ATRIG1 FASL contains several additional simplification rules for inverse trig functions. Together with rules already known to Macsyma, the following angles are fully implemented: 0, %PI/6, %PI/4, %PI/3, and %PI/2. Corresponding angles in the other three quadrants are also available. Do LOAD(ATRIG1); to use them. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COS</B> <DD><A NAME="IDX411"></A> - Cosine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COSH</B> <DD><A NAME="IDX412"></A> - Hyperbolic Cosine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COT</B> <DD><A NAME="IDX413"></A> - Cotangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COTH</B> <DD><A NAME="IDX414"></A> - Hyperbolic Cotangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CSC</B> <DD><A NAME="IDX415"></A> - Cosecant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CSCH</B> <DD><A NAME="IDX416"></A> - Hyperbolic Cosecant </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>HALFANGLES</B> <DD><A NAME="IDX417"></A> default: [FALSE] - if TRUE causes half-angles to be simplified away. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SEC</B> <DD><A NAME="IDX418"></A> - Secant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SECH</B> <DD><A NAME="IDX419"></A> - Hyperbolic Secant </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SIN</B> <DD><A NAME="IDX420"></A> - Sine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SINH</B> <DD><A NAME="IDX421"></A> - Hyperbolic Sine </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TAN</B> <DD><A NAME="IDX422"></A> - Tangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TANH</B> <DD><A NAME="IDX423"></A> - Hyperbolic Tangent </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRIGEXPAND</B> <I>(exp)</I> <DD><A NAME="IDX424"></A> expands trigonometric and hyperbolic functions of sums of angles and of multiple angles occurring in exp. For best results, exp should be expanded. To enhance user control of simplification, this function expands only one level at a time, expanding sums of angles or multiple angles. To obtain full expansion into sines and cosines immediately, set the switch TRIGEXPAND:TRUE. TRIGEXPAND default: [FALSE] - if TRUE causes expansion of all expressions containing SINs and COSs occurring subsequently. HALFANGLES[FALSE] - if TRUE causes half-angles to be simplified away. TRIGEXPANDPLUS[TRUE] - controls the "sum" rule for TRIGEXPAND, expansion of sums (e.g. SIN(X+Y)) will take place only if TRIGEXPANDPLUS is TRUE. TRIGEXPANDTIMES[TRUE] - controls the "product" rule for TRIGEXPAND, expansion of products (e.g. SIN(2*X)) will take place only if TRIGEXPANDTIMES is TRUE. <PRE> (C1) X+SIN(3*X)/SIN(X),TRIGEXPAND=TRUE,EXPAND; 2 2 (D1) - SIN (X) + 3 COS (X) + X (C2) TRIGEXPAND(SIN(10*X+Y)); (D2) COS(10 X) SIN(Y) + SIN(10 X) COS(Y) </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>TRIGEXPANDPLUS</B> <DD><A NAME="IDX425"></A> default: [TRUE] - controls the "sum" rule for TRIGEXPAND. Thus, when the TRIGEXPAND command is used or the TRIGEXPAND switch set to TRUE, expansion of sums (e.g. SIN(X+Y)) will take place only if TRIGEXPANDPLUS is TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TRIGEXPANDTIMES</B> <DD><A NAME="IDX426"></A> default: [TRUE] - controls the "product" rule for TRIGEXPAND. Thus, when the TRIGEXPAND command is used or the TRIGEXPAND switch set to TRUE, expansion of products (e.g. SIN(2*X)) will take place only if TRIGEXPANDTIMES is TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TRIGINVERSES</B> <DD><A NAME="IDX427"></A> default: [ALL] - controls the simplification of the composition of trig and hyperbolic functions with their inverse functions: If ALL, both e.g. ATAN(TAN(X)) and TAN(ATAN(X)) simplify to X. If TRUE, the arcfunction(function(x)) simplification is turned off. If FALSE, both the arcfun(fun(x)) and fun(arcfun(x)) simplifications are turned off. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRIGREDUCE</B> <I>(exp, var)</I> <DD><A NAME="IDX428"></A> combines products and powers of trigonometric and hyperbolic SINs and COSs of var into those of multiples of var. It also tries to eliminate these functions when they occur in denominators. If var is omitted then all variables in exp are used. Also see the POISSIMP function (6.6). <PRE> (C4) TRIGREDUCE(-SIN(X)^2+3*COS(X)^2+X); (D4) 2 COS(2 X) + X + 1 The trigonometric simplification routines will use declared information in some simple cases. Declarations about variables are used as follows, e.g. (C5) DECLARE(J, INTEGER, E, EVEN, O, ODD)$ (C6) SIN(X + (E + 1/2)*%PI)$ (D6) COS(X) (C7) SIN(X + (O + 1/2) %PI); (D7) - COS(X) </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>TRIGSIGN</B> <DD><A NAME="IDX429"></A> default: [TRUE] - if TRUE permits simplification of negative arguments to trigonometric functions. E.g., SIN(-X) will become -SIN(X) only if TRIGSIGN is TRUE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRIGSIMP</B> <I>(expr)</I> <DD><A NAME="IDX430"></A> employs the identities sin(x)^2 + cos(x)^2 = 1 and cosh(x)^2 - sinh(x)^2 = 1 to simplify expressions containing tan, sec, etc. to sin, cos, sinh, cosh so that further simplification may be obtained by using TRIGREDUCE on the result. Some examples may be seen by doing DEMO("trgsmp.dem"); . See also the TRIGSUM function. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRIGRAT</B> <I>(trigexp)</I> <DD><A NAME="IDX431"></A> gives a canonical simplifyed quasilinear form of a trigonometrical expression; trigexp is a rational fraction of several sin, cos or tan, the arguments of them are linear forms in some variables (or kernels) and %pi/n (n integer) with integer coefficients. The result is a simplifyed fraction with numerator and denominator linear in sin and cos. Thus TRIGRAT linearize always when it is possible.(written by D. Lazard). </P> <PRE> (c1) trigrat(sin(3*a)/sin(a+%pi/3)); (d1) sqrt(3) sin(2 a) + cos(2 a) - 1 </PRE> <P> Here is another example (for which the function was intended); see [Davenport, Siret, Tournier, Calcul Formel, Masson (or in english, Addison-Wesley), section 1.5.5, Morley theorem). Timings are on VAX 780. </P> <PRE> (c4) c:%pi/3-a-b; %pi (d4) - b - a + --- 3 (c5) bc:sin(a)*sin(3*c)/sin(a+b); sin(a) sin(3 b + 3 a) (d5) --------------------- sin(b + a) (c6) ba:bc,c=a,a=c$ (c7) ac2:ba^2+bc^2-2*bc*ba*cos(b); 2 2 sin (a) sin (3 b + 3 a) (d7) ----------------------- 2 sin (b + a) %pi 2 sin(a) sin(3 a) cos(b) sin(b + a - ---) sin(3 b + 3 a) 3 - -------------------------------------------------------- %pi sin(a - ---) sin(b + a) 3 2 2 %pi sin (3 a) sin (b + a - ---) 3 + --------------------------- 2 %pi sin (a - ---) 3 (c9) trigrat(ac2); Totaltime= 65866 msec. GCtime= 7716 msec. (d9) - (sqrt(3) sin(4 b + 4 a) - cos(4 b + 4 a) - 2 sqrt(3) sin(4 b + 2 a) + 2 cos(4 b + 2 a) - 2 sqrt(3) sin(2 b + 4 a) + 2 cos(2 b + 4 a) + 4 sqrt(3) sin(2 b + 2 a) - 8 cos(2 b + 2 a) - 4 cos(2 b - 2 a) + sqrt(3) sin(4 b) - cos(4 b) - 2 sqrt(3) sin(2 b) + 10 cos(2 b) + sqrt(3) sin(4 a) - cos(4 a) - 2 sqrt(3) sin(2 a) + 10 cos(2 a) - 9)/4 </PRE> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_13.html">previous</A>, <A HREF="maxima_15.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_15.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Special Functions</TITLE> <link href="maxima_16.html" rel=Next> <link href="maxima_14.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_14.html">previous</A>, <A HREF="maxima_16.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC48" HREF="maxima_toc.html#TOC48">Special Functions</A></H1> <H2><A NAME="SEC49" HREF="maxima_toc.html#TOC49">Introduction to Special Functions</A></H2> <P> <DL> <DT><U>%J:</U> <B></B> <DD><A NAME="IDX432"></A> [index](expr) - Bessel Funct 1st Kind (in SPECINT) </P> </DL> <P> <DL> <DT><U>%K:</U> <B>[index](expr)</B> <DD><A NAME="IDX433"></A> Bessel Funct 2nd Kind (in SPECINT) </P> <P> Constant, in ODE2 </P> </DL> <H2><A NAME="SEC50" HREF="maxima_toc.html#TOC50">GAMALG</A></H2> <P> - A Dirac gamma matrix algebra program which takes traces of and does manipulations on gamma matrices in n dimensions. It may be loaded into MACSYMA by LOADFILE("gam"); A preliminary manual is contained in the file SHARE;GAM USAGE and may be printed using PRINTFILE(GAM,USAGE,SHARE); </P> <H2><A NAME="SEC51" HREF="maxima_toc.html#TOC51">SPECINT</A></H2> <P> - The Hypergeometric Special Functions Package HYPGEO is still under development. At the moment it will find the Laplace Transform or rather, the integral from 0 to INF of some special functions or combinations of them. The factor, EXP(-P*var) must be explicitly stated. The syntax is as follows: SPECINT(EXP(-P*var)*expr,var); where var is the variable of integration and expr may be any expression containing special functions (at your own risk). Special function notation follows: <PRE> %J[index](expr) Bessel Funct 1st Kind %K[index](expr) " " 2nd Kind %IBES[ ]( ) Modified Bessel Funct 1st Kind %HE[ ]( ) Hermite Poly %P[ ]( ) Legendre Funct %Q[ ]( ) Legendre of second kind HSTRUVE[ ]( ) Struve H Function LSTRUVE[ ]( ) " L Function %F[ ]([],[],expr) Hypergeometric Function GAMMA() GAMMAGREEK() GAMMAINCOMPLETE() SLOMMEL %M[]() Whittaker Funct 1st Kind %W[]() " " 2nd " </PRE> <P> For a better feeling for what it can do, do DEMO(HYPGEO,DEMO,SHARE1); . </P> <H2><A NAME="SEC52" HREF="maxima_toc.html#TOC52">Definitions for Special Functions</A></H2> <P> <DL> <DT><U>Function:</U> <B>AIRY</B> <I>(X)</I> <DD><A NAME="IDX434"></A> returns the Airy function Ai of real argument X. The file SHARE1;AIRY FASL contains routines to evaluate the Airy functions Ai(X), Bi(X), and their derivatives dAi(X), dBi(X). Ai and Bi satisfy the AIRY eqn diff(y(x),x,2)-x*y(x)=0. Read SHARE1;AIRY USAGE for details. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASYMP</B> <DD><A NAME="IDX435"></A> - A preliminary version of a program to find the asymptotic behavior of Feynman diagrams has been installed on the SHARE1; directory. For further information, see the file SHARE1;ASYMP USAGE. (For Asymptotic Analysis functions, see ASYMPA.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASYMPA</B> <DD><A NAME="IDX436"></A> - Asymptotic Analysis - The file SHARE1;ASYMPA > contains simplification functions for asymptotic analysis, including the big-O and little-o functions that are widely used in complexity analysis and numerical analysis. Do BATCH("asympa.mc"); . (For asymptotic behavior of Feynman diagrams, see ASYMP.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BESSEL</B> <I>(Z,A)</I> <DD><A NAME="IDX437"></A> returns the Bessel function J for complex Z and real A > 0.0 . Also an array BESSELARRAY is set up such that BESSELARRAY[I] = J[I+A- ENTIER(A)](Z). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BESSEL_J</B> <I>[v](z)</I> <DD><A NAME="IDX438"></A> The Bessel function of the first kind of order v and argument z. It is defined by </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BESSEL_Y</B> <I>[v](z)</I> <DD><A NAME="IDX439"></A> The Bessel function of the second kind of order v and argument z. It is defined by </P> <P> when v is not an integer. When v is an integer n, the limit as v approaches n is taken. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BESSEL_I</B> <I>[v](z)</I> <DD><A NAME="IDX440"></A> The modified Bessel function of the first kind of order v and argument z. It is defined by </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BESSEL_K</B> <I>[v](z)</I> <DD><A NAME="IDX441"></A> The modified Bessel function of the second kind of order v and argument z. It is defined by when v is not an integer. If v is an integer n, then the limit as v approaches n is taken. </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>BESSELEXPAND</B> <DD><A NAME="IDX442"></A> default: FALSE Controls expansion of the Bessel functions when the order half of an odd integer. In this case, the Bessel functions can be expanded in terms of other elementary functions. When BESSELEXPAND is true, the Bessel function is expanded. </P> <PRE> (C1) bessel_j[3/2](z); (D1) BESSEL_J (z) 3/2 (C2) besselexpand:true; (D2) TRUE (C3) bessel_j[3/2](z); COS(z) SIN(z) SQRT(2) SQRT(z) (------ - ------) z 2 z (D3) - --------------------------------- SQRT(%PI) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>BETA</B> <I>(X, Y)</I> <DD><A NAME="IDX443"></A> same as GAMMA(X)*GAMMA(Y)/GAMMA(X+Y). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GAMMA</B> <I>(X)</I> <DD><A NAME="IDX444"></A> the gamma function. GAMMA(I)=(I-1)! for I a positive integer. For the Euler-Mascheroni constant, see %GAMMA. See also the MAKEGAMMA function. The variable GAMMALIM[1000000] (which see) controls simplification of the gamma function. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>GAMMALIM</B> <DD><A NAME="IDX445"></A> default: [1000000] controls simplification of the gamma function for integral and rational number arguments. If the absolute value of the argument is not greater than GAMMALIM, then simplification will occur. Note that the FACTLIM switch controls simplification of the result of GAMMA of an integer argument as well. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INTOPOIS</B> <I>(A)</I> <DD><A NAME="IDX446"></A> converts A into a Poisson encoding. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAKEFACT</B> <I>(exp)</I> <DD><A NAME="IDX447"></A> transforms occurrences of binomial,gamma, and beta functions in exp to factorials. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAKEGAMMA</B> <I>(exp)</I> <DD><A NAME="IDX448"></A> transforms occurrences of binomial,factorial, and beta functions in exp to gamma functions. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NUMFACTOR</B> <I>(exp)</I> <DD><A NAME="IDX449"></A> gives the numerical factor multiplying the expression exp which should be a single term. If the gcd of all the terms in a sum is desired the CONTENT function may be used. <PRE> (C1) GAMMA(7/2); (D1) 15 SQRT(%PI) ------------ 8 (C2) NUMFACTOR(%); 15 (D2) -- 8 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>OUTOFPOIS</B> <I>(A)</I> <DD><A NAME="IDX450"></A> converts A from Poisson encoding to general representation. If A is not in Poisson form, it will make the conversion, i.e. it will look like the result of OUTOFPOIS(INTOPOIS(A)). This function is thus a canonical simplifier for sums of powers of SIN's and COS's of a particular type. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISDIFF</B> <I>(A, B)</I> <DD><A NAME="IDX451"></A> differentiates A with respect to B. B must occur only in the trig arguments or only in the coefficients. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISEXPT</B> <I>(A, B)</I> <DD><A NAME="IDX452"></A> B a positive integer) is functionally identical to INTOPOIS(A**B). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISINT</B> <I>(A, B)</I> <DD><A NAME="IDX453"></A> integrates in a similarly restricted sense (to POISDIFF). Non-periodic terms in B are dropped if B is in the trig arguments. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>POISLIM</B> <DD><A NAME="IDX454"></A> default: [5] - determines the domain of the coefficients in the arguments of the trig functions. The initial value of 5 corresponds to the interval [-2^(5-1)+1,2^(5-1)], or [-15,16], but it can be set to [-2^(n-1)+1, 2^(n-1)]. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISMAP</B> <I>(series, sinfn, cosfn)</I> <DD><A NAME="IDX455"></A> will map the functions sinfn on the sine terms and cosfn on the cosine terms of the poisson series given. sinfn and cosfn are functions of two arguments which are a coefficient and a trigonometric part of a term in series respectively. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISPLUS</B> <I>(A, B)</I> <DD><A NAME="IDX456"></A> is functionally identical to INTOPOIS(A+B). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISSIMP</B> <I>(A)</I> <DD><A NAME="IDX457"></A> converts A into a Poisson series for A in general representation. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>POISSON</B> <DD><A NAME="IDX458"></A> - The Symbol /P/ follows the line label of Poisson series expressions. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISSUBST</B> <I>(A, B, C)</I> <DD><A NAME="IDX459"></A> substitutes A for B in C. C is a Poisson series. (1) Where B is a variable U, V, W, X, Y, or Z then A must be an expression linear in those variables (e.g. 6*U+4*V). (2) Where B is other than those variables, then A must also be free of those variables, and furthermore, free of sines or cosines. POISSUBST(A, B, C, D, N) is a special type of substitution which operates on A and B as in type (1) above, but where D is a Poisson series, expands COS(D) and SIN(D) to order N so as to provide the result of substituting A+D for B in C. The idea is that D is an expansion in terms of a small parameter. For example, POISSUBST(U,V,COS(V),E,3) results in COS(U)*(1-E^2/2) - SIN(U)*(E-E^3/6). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISTIMES</B> <I>(A, B)</I> <DD><A NAME="IDX460"></A> is functionally identical to INTOPOIS(A*B). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POISTRIM</B> <I>()</I> <DD><A NAME="IDX461"></A> is a reserved function name which (if the user has defined it) gets applied during Poisson multiplication. It is a predicate function of 6 arguments which are the coefficients of the U, V,..., Z in a term. Terms for which POISTRIM is TRUE (for the coefficients of that term) are eliminated during multiplication. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PRINTPOIS</B> <I>(A)</I> <DD><A NAME="IDX462"></A> prints a Poisson series in a readable format. In common with OUTOFPOIS, it will convert A into a Poisson encoding first, if necessary. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PSI</B> <I>(X)</I> <DD><A NAME="IDX463"></A> derivative of LOG(GAMMA(X)). At this time, MACSYMA does not have numerical evaluation capabilities for PSI. For information on the PSI[N](X) notation, see POLYGAMMA. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_14.html">previous</A>, <A HREF="maxima_16.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_16.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Orthogonal Polynomials</TITLE> <link href="maxima_17.html" rel=Next> <link href="maxima_15.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_15.html">previous</A>, <A HREF="maxima_17.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC53" HREF="maxima_toc.html#TOC53">Orthogonal Polynomials</A></H1> <H2><A NAME="SEC54" HREF="maxima_toc.html#TOC54">Introduction to Orthogonal Polynomials</A></H2> <P> The specfun package, located in the share directory, contains Maxima code for the evaluation of all orthogonal polynomials listed in Chapter 22 of Abramowitz and Stegun. These include Chebyshev, Laguerre, Hermite, Jacobi, Legendre, and ultraspherical (Gegenbauer) polynomials. Additionally, specfun contains code for spherical Bessel, spherical Hankel, and spherical harmonic functions. </P> <P> The following table lists each function in specfun, its Maxima name, restrictions on its arguments ( m and n must be integers), and a reference to the algorithm specfun uses to evaluate it. With few exceptions, specfun follows the conventions of Abramowitz and Stegun. Before you use specfun, check that specfun's conventions match your expectations. </P> <P> A&S refers to Abramowitz and Stegun, <EM>Handbook of Mathematical Functions</EM> (10th printing, December 1972), G&R to Gradshteyn and Ryzhik, <EM>Table of Integrals, Series, and Products</EM> (1980 corrected and enlarged edition), and Merzbacher to <EM>Quantum Mechanics</EM> (2ed, 1970). </P> <TABLE> <TR><EM>Function</EM> <TD> <EM>Maxima Name</EM> <TD> <EM>Restrictions</EM> <TD> <EM>Reference(s)</EM> <BR> <TR> Chebyshev T <TD> chebyshev_t(n, x) <TD> n > -1 <TD> A&S 22.5.31 <BR> <TR>Chebyshev U <TD> chebyshev_u(n, x) <TD> n > -1 <TD> A&S 22.5.32 <BR> <TR>generalized Laguerre <TD> gen_laguerre(n,a,x) <TD> n > -1 <TD> A&S page 789 <BR> <TR>Laguerre <TD> laguerre(n,x) <TD> n > -1 <TD> A&S 22.5.67 <BR> <TR>Hermite <TD> hermite(n,x) <TD> n > -1 <TD> A&S 22.4.40, 22.5.41 <BR> <TR>Jacobi <TD> jacobi_p(n,a,b,x) <TD> n > -1, a, b > -1 <TD> A&S page 789 <BR> <TR>associated Legendre P <TD> assoc_legendre_p(n,m,x) <TD> n > -1 <TD> A&S 22.5.37, 8.6.6, 8.2.5 <BR> <TR>associated Legendre Q <TD> assoc_legendre_q(n,m,x) <TD> n > -1, m > -1 <TD> G & R 8.706 <BR> <TR>Legendre P <TD> legendre_p(n,m,x) <TD> n > -1 <TD> A&S 22.5.35 <BR> <TR>Legendre Q <TD> legendre_q(n,m,x) <TD> n > -1 <TD> A&S 8.6.19 <BR> <TR>spherical Hankel 1st <TD> spherical_hankel1(n, x) <TD> n > -1 <TD> A&S 10.1.36 <BR> <TR>spherical Hankel 2nd <TD> spherical_hankel2(n, x) <TD> n > -1 <TD> A&S 10.1.17 <BR> <TR>spherical Bessel J <TD> spherical_bessel_j(n,x) <TD> n > -1 <TD> A&S 10.1.8, 10.1.15 <BR> <TR>spherical Bessel Y <TD> spherical_bessel_y(n,x) <TD> n > -1 <TD> A&S 10.1.9, 10.1.15 <BR> <TR>spherical harmonic <TD> spherical_harmonic(n,m,x,y) <TD> n > -1, |m| <= n <TD> Merzbacher 9.64 <BR> <TR>ultraspherical (Gegenbauer) <TD> ultraspherical(n,a,x) <TD> n > -1 <TD> A&S 22.5.27 </TABLE> The specfun package is primarily intended for symbolic computation. It is hoped that it gives accurate floating point results as well; however, no claims are made that the algorithms are well suited for numerical evaluation. Some effort, however, has been made to provide good numerical performance. When all arguments, except for the order, are floats (but not bfloats), many functions in specfun call a float modedeclared version of the Jacobi function. This greatly speeds floating point evaluation of the orthogonal polynomials. specfun handles most domain errors by returning an unevaluated function. No attempt has been made to define simplification rules (based on recursion relations) for unevaluated functions. Users should be aware that it is possible for an expression involving sums of unevaluated special functions to vanish, yet Maxima is unable to reduce it to zero. Be careful. To access functions in specfun, you must first load specfun.o. Alternatively, you may append autoload statements to your init.lsp file (located in your working directory). To autoload the hermite function, for example, append <PRE> (defprop |$hermite| #"specfun.o" autoload) (add2lnc '|$hermite| $props) </PRE> to your init.lsp file. An example use of specfun is <PRE> (c1) load("specfun.o")$ (c2) [hermite(0,x),hermite(1,x),hermite(2,x)]; (d2) [1,2*x,-2*(1-2*x^2)] (c3) diff(hermite(n,x),x); (d3) 2*n*hermite(n-1,x) </PRE> When using the compiled version of specfun, be especially careful to use the correct number of function arguments; calling them with too few arguments may generate a fatal error messages. For example <PRE> (c1) load("specfun")$ /* chebyshev_t requires two arguments. */ (c2) chebyshev_t(8); Error: Caught fatal error [memory may be damaged] Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by MMAPCAR. Broken at SIMPLIFY. Type :H for Help. </PRE> Maxima code translated into Lisp handles such errors more gracefully. If specfun.LISP is installed on your machine, the same computation results in a clear error message. For example <PRE> (c1) load("specfun.LISP")$ (c2) chebyshev_t(8); Error: Expected 2 args but received 1 args Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by MACSYMA-TOP-LEVEL. Broken at |$CHEBYSHEV_T|. Type :H for Help. </PRE> Generally, compiled code runs faster than translated code; however, translated code may be better for program development. For some functions, when the order is symbolic but has been declared to be an integer, specfun will return a series representation. (The series representation is not used by specfun for any computations.) You may use this feature to find symbolic values for special values orthogonal polynomials. An example: <PRE> (c1) load("specfun")$ (c2) legendre_p(n,1); (d2) legendre_p(n, 1) /* Declare n to be an integer; now legendre_p(n,1) evaluates to 1. */ (c3) declare(n,integer)$ (c4) legendre_p(n,1); (d4) 1 (c5) ultraspherical(n,3/2,1); (d4) (n+1)*gamma (n+3) / (2*gamma (n+2)) </PRE> Although the preceding example doesn't show it, two terms of the sum are added outside the summation. Removing these two terms avoids errors associated with 0^0 terms in a sum that should evaluate to 1, but evaluate to 0 in a Maxima summation. Because the sum index runs from 1 to n - 1, the lower sum index will exceed the upper sum index when n = 0; setting sumhack to true provides a fix. For example: <PRE> (c1) load("specfun.o")$ (c2) declare(n,integer)$ (c3) e : legendre_p(n,x)$ (c4) ev(e,sum,n=0); Lower bound to SUM: 1 is greater than the upper bound: - 1 -- an error. Quitting. To debug this try DEBUGMODE(TRUE);) (c5) ev(e,sum,n=0),sumhack : true; (d5) 1 </PRE> Most functions in specfun have a gradef property; derivatives with respect to the order or other function parameters aren't unevaluated. The specfun package and its documentation were written by Barton Willis of the University of Nebraska at Kearney. It is released under the terms of the General Public License (GPL). Send bug reports and comments on this package to willisb@... In your report, please include Maxima and specfun version information. The specfun version may be found using get: <PRE> (c2) get('specfun,'version); (d2) 110 @end example <H2><A NAME="SEC55" HREF="maxima_toc.html#TOC55">Definitions for Orthogonal Polynomials</A></H2> <P> <DL> <DT><U>Function:</U> <B>ASSOC_LEGENDRE_P</B> <I>(n, m, x)</I> <DD><A NAME="IDX464"></A>[specfun package] return the associated Legendre function of the first kind for integers n > -1 and m > -1. When | m | > n and n >= 0, we have assoc_legendre_p (n, m, x) = 0. Reference: A&S 22.5.37 page 779, A&S 8.6.6 (second equation) page 334, and A&S 8.2.5 page 333. To access this function, load("specfun"). See <A HREF="maxima_16.html#ASSOC_LEGENDRE_Q">ASSOC_LEGENDRE_Q</A>, <A HREF="maxima_16.html#LEGENDRE_P">LEGENDRE_P</A>, and <A HREF="maxima_16.html#LEGENDRE_Q">LEGENDRE_Q</A>. </DL> </P> <a name="ASSOC_LEGENDRE_Q"></a><P> <DL> <DT><U>Function:</U> <B>ASSOC_LEGENDRE_Q</B> <I>(n, m, x)</I> <DD><A NAME="IDX465"></A> </P> <P> [specfun package] return the associated Legendre function of the second kind for integers n > -1 and m > -1. </P> <P> Reference: Gradshteyn and Ryzhik 8.706 page 1000. </P> <P> To access this function, load("specfun"). </P> <P> See also ASSOC_LEGENDRE_P, LEGENDRE_P, and LEGENDRE_Q. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>CHEBYSHEV_T</B> <I>(n, x)</I> <DD><A NAME="IDX466"></A> </P> <P> [specfun package] return the Chebyshev function of the first kind for integers n > -1. </P> <P> Reference: A&S 22.5.31 page 778 and A&S 6.1.22 page 256. </P> <P> To access this function, load("specfun"). </P> <P> See also CHEBYSHEV_U. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CHEBYSHEV_U</B> <I>(n, x)</I> <DD><A NAME="IDX467"></A> </P> <P> [specfun package] return the Chebyshev function of the second kind for integers n > -1. </P> <P> Reference: A&S, 22.8.3 page 783 and A&S 6.1.22 page 256. </P> <P> To access this function, load("specfun"). </P> <P> See also CHEBYSHEV_T. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GEN_LAGUERRE</B> <I>(n, a, x)</I> <DD><A NAME="IDX468"></A> </P> <P> [specfun package] return the generalized Laguerre polynomial for integers n > -1. </P> <P> To access this function, load("specfun"). </P> <P> Reference: table on page 789 in A&S. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>HERMITE</B> <I>(n,x)</I> <DD><A NAME="IDX469"></A> </P> <P> [specfun package] return the Hermite polynomial for integers n > -1. </P> <P> To access this function, load("specfun"). </P> <P> Reference: A&S 22.5.40 and 22.5.41, page 779. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>JACOBI_P</B> <I>(n, a, b, x)</I> <DD><A NAME="IDX470"></A> </P> <P> [specfun package] return the Jacobi polynomial for integers n > -1 and a and b symbolic or a > -1 and b > -1. (The Jacobi polynomials are actually defined for all a and b ; however, the Jacobi polynomial weight (1-x)^a(1+x)^b isn't integrable for a <= -1 or b <= -1. ) </P> <P> When a, b, and x are floats (but not bfloats) specfun calls a special modedeclared version of jacobi_p. For numerical values, the modedeclared version is much faster than the other version. Many functions in specfun are computed as a special case of the Jacobi polynomials; they also enjoy the speed boost from the modedeclared version of jacobi. </P> <P> If n has been declared to be an integer, jacobi_p (n, a, b, x) returns a summation representation for the Jacobi function. Because Maxima simplifies 0^0 to 0 in a sum, two terms of the sum are added outside the summation. </P> <P> To access this function, load("specfun"). </P> <P> Reference: table on page 789 in A&S. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LAGUERRE</B> <I>(n, x)</I> <DD><A NAME="IDX471"></A> </P> <P> [specfun package] return the Laguerre polynomial for integers n > -1. </P> <P> Reference: A&S 22.5.16, page 778 and A&S page 789. </P> <P> To access this function, load("specfun"). </P> <P> See also GEN_LAGUERRE. </P> </DL> <a name="LEGENDRE_P"></a><P> <DL> <DT><U>Function:</U> <B>LEGENDRE_P</B> <I>(n, x)</I> <DD><A NAME="IDX472"></A> </P> <P> [specfun package] return the Legendre polynomial of the first kind for integers n > -1. </P> <P> Reference: A&S 22.5.35 page 779. </P> <P> To access this function, load("specfun"). </P> <P> See <A HREF="maxima_16.html#LEGENDRE_Q">LEGENDRE_Q</A>. </P> </DL> <a name="LEGENDRE_Q"></a><P> <DL> <DT><U>Function:</U> <B>LEGENDRE_Q</B> <I>(n, x)</I> <DD><A NAME="IDX473"></A> </P> <P> [specfun package] return the Legendre polynomial of the first kind for integers n > -1. </P> <P> Reference: A&S 8.6.19 page 334. </P> <P> To access this function, load("specfun"). </P> <P> See also LEGENDRE_P. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SPHERICAL_BESSEL_J</B> <I>(n, x)</I> <DD><A NAME="IDX474"></A> </P> <P> [specfun package] return the spherical Bessel function of the first kind for integers n > -1. </P> <P> Reference: A&S 10.1.8 page 437 and A&S 10.1.15 page 439. </P> <P> To access this function, load("specfun"). </P> <P> See also SPHERICAL_HANKEL1, SPHERICAL_HANKEL2, and SPHERICAL_BESSEL_Y. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SPHERICAL_BESSEL_Y</B> <I>(n, x)</I> <DD><A NAME="IDX475"></A> </P> <P> [specfun package] return the spherical Bessel function of the second kind for integers n > -1. </P> <P> Reference: A&S 10.1.9 page 437 and 10.1.15 page 439. </P> <P> To access this function, load("specfun"). </P> <P> See also SPHERICAL_HANKEL1, SPHERICAL_HANKEL2, and SPHERICAL_BESSEL_Y. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SPHERICAL_HANKEL1</B> <I>(n,x)</I> <DD><A NAME="IDX476"></A> </P> <P> [specfun package] return the spherical hankel function of the first kind for integers n > -1. </P> <P> Reference: A&S 10.1.36 page 439. </P> <P> To access this function, load("specfun"). </P> <P> See also SPHERICAL_HANKEL2, SPHERICAL_BESSEL_J, and SPHERICAL_BESSEL_Y. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SPHERICAL_HANKEL2</B> <I>(n,x)</I> <DD><A NAME="IDX477"></A> </P> <P> [specfun package] return the spherical hankel function of the second kind for integers n > -1. </P> <P> Reference: A&S 10.1.17 page 439. </P> <P> To access this function, load("specfun"). </P> <P> See also SPHERICAL_HANKEL1, SPHERICAL_BESSEL_J, and SPHERICAL_BESSEL_Y. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SPHERICAL_HARMONIC</B> <I>(n, m, x, y)</I> <DD><A NAME="IDX478"></A> </P> <P> [specfun package] return the spherical harmonic function for integers n > -1 and | m | <= n . </P> <P> Reference: Merzbacher 9.64. </P> <P> To access this function, load("specfun"). </P> <P> See also ASSOC_LEGENDRE_P </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ULTRASPHERICAL</B> <I>(n,a,x)</I> <DD><A NAME="IDX479"></A> </P> <P> [specfun package] return the ultraspherical polynomials for integers n > -1. The ultraspherical polynomials are also known as Gegenbauer polynomials. </P> <P> Reference: A&S 22.5.27 </P> <P> To access this function, load("specfun"). </P> <P> See also JACOBI_P. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_15.html">previous</A>, <A HREF="maxima_17.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_17.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Elliptic Functions</TITLE> <link href="maxima_18.html" rel=Next> <link href="maxima_16.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_16.html">previous</A>, <A HREF="maxima_18.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC56" HREF="maxima_toc.html#TOC56">Elliptic Functions</A></H1> <H2><A NAME="SEC57" HREF="maxima_toc.html#TOC57">Introduction to Elliptic Functions and Integrals</A></H2> <P> Maxima includes support for Jacobian elliptic functions and for complete and incomplete elliptic integrals. This includes symbolic manipulation of these functions and numerical evaluation as well. Definitions of these functions and many of their properties can by found in Abramowitz and Stegun, Chapter 16--17. As much as possible, we use the definitions and relationships given there. </P> <P> In particular, all elliptic functions and integrals use the parameter m instead of the modulus k or the modular angle \alpha. This is one area where we differ from Abramowitz and Stegun who use the modular angle for the elliptic functions. The following relationships are true: </P> <P> The elliptic functions and integrals are primarily intended to support symbolic computation. Therefore, most of derivatives of the functions and integrals are known. However, if floating-point values are given, a floating-point result is returned. </P> <P> Support for most of the other properties of elliptic functions and integrals other than derivatives has not yet been written. </P> <P> Some examples of elliptic functions: <PRE> (C1) jacobi_sn(u,m); (D1) JACOBI_SN(u, m) (C2) jacobi_sn(u,1); (D2) TANH(u) (C3) jacobi_sn(u,0); (D3) SIN(u) (C4) diff(jacobi_sn(u,m),u); (D4) JACOBI_CN(u, m) JACOBI_DN(u, m) (C5) diff(jacobi_sn(u,m),m); (D5) JACOBI_CN(u, m) JACOBI_DN(u, m) ELLIPTIC_E(ASIN(JACOBI_SN(u, m)), m) (u - ------------------------------------)/(2 m) 1 - m 2 JACOBI_CN (u, m) JACOBI_SN(u, m) + -------------------------------- 2 (1 - m) </PRE> <P> Some examples of elliptic integrals: <PRE> (C1) elliptic_f(phi,m); (D1) ELLIPTIC_F(PHI, m) (C2) elliptic_f(phi,0); (D2) PHI (C3) elliptic_f(phi,1); PHI %PI (D3) LOG(TAN(--- + ---)) 2 4 (C4) elliptic_e(phi,1); (D4) SIN(PHI) (C5) elliptic_e(phi,0); (D5) PHI (C6) elliptic_kc(1/2); 1 (D6) ELLIPTIC_KC(-) 2 (C7) makegamma(%); 2 1 GAMMA (-) 4 (D7) ----------- 4 SQRT(%PI) (C8) diff(elliptic_f(phi,m),phi); 1 (D8) --------------------- 2 SQRT(1 - m SIN (PHI)) (C9) diff(elliptic_f(phi,m),m); ELLIPTIC_E(PHI, m) - (1 - m) ELLIPTIC_F(PHI, m) (D9) (----------------------------------------------- m COS(PHI) SIN(PHI) - ---------------------)/(2 (1 - m)) 2 SQRT(1 - m SIN (PHI)) </PRE> <P> Support for elliptic functions and integrals was written by Raymond Toy. It is placed under the terms of the General Public License (GPL) that governs the distribution of Maxima. </P> <H2><A NAME="SEC58" HREF="maxima_toc.html#TOC58">Definitions for Elliptic Functions</A></H2> <P> <DL> <DT><U>Function:</U> <B>JACOBI_SN</B> <I>(u, m)</I> <DD><A NAME="IDX480"></A> The Jacobian elliptic function sn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_CN</B> <I>(u, m)</I> <DD><A NAME="IDX481"></A> The Jacobian elliptic function cn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_DN</B> <I>(u, m)</I> <DD><A NAME="IDX482"></A> The Jacobian elliptic function dn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_NS</B> <I>(u, m)</I> <DD><A NAME="IDX483"></A> The Jacobian elliptic function ns(u,m) = 1/sn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_SC</B> <I>(u, m)</I> <DD><A NAME="IDX484"></A> The Jacobian elliptic function sc(u,m) = sn(u,m)/cn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_SD</B> <I>(u, m)</I> <DD><A NAME="IDX485"></A> The Jacobian elliptic function sd(u,m) = sn(u,m)/dn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_NC</B> <I>(u, m)</I> <DD><A NAME="IDX486"></A> The Jacobian elliptic function nc(u,m) = 1/cn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_CS</B> <I>(u, m)</I> <DD><A NAME="IDX487"></A> The Jacobian elliptic function cs(u,m) = cn(u,m)/sn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_CD</B> <I>(u, m)</I> <DD><A NAME="IDX488"></A> The Jacobian elliptic function cd(u,m) = cn(u,m)/dn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_ND</B> <I>(u, m)</I> <DD><A NAME="IDX489"></A> The Jacobian elliptic function nc(u,m) = 1/cn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_DS</B> <I>(u, m)</I> <DD><A NAME="IDX490"></A> The Jacobian elliptic function ds(u,m) = dn(u,m)/sn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>JACOBI_DC</B> <I>(u, m)</I> <DD><A NAME="IDX491"></A> The Jacobian elliptic function dc(u,m) = dn(u,m)/cn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_SN</B> <I>(u, m)</I> <DD><A NAME="IDX492"></A> The inverse of the Jacobian elliptic function sn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_CN</B> <I>(u, m)</I> <DD><A NAME="IDX493"></A> The inverse of the Jacobian elliptic function cn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_DN</B> <I>(u, m)</I> <DD><A NAME="IDX494"></A> The inverse of the Jacobian elliptic function dn(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_NS</B> <I>(u, m)</I> <DD><A NAME="IDX495"></A> The inverse of the Jacobian elliptic function ns(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_SC</B> <I>(u, m)</I> <DD><A NAME="IDX496"></A> The inverse of the Jacobian elliptic function sc(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_SD</B> <I>(u, m)</I> <DD><A NAME="IDX497"></A> The inverse of the Jacobian elliptic function sd(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_NC</B> <I>(u, m)</I> <DD><A NAME="IDX498"></A> The inverse of the Jacobian elliptic function nc(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_CS</B> <I>(u, m)</I> <DD><A NAME="IDX499"></A> The inverse of the Jacobian elliptic function cs(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_CD</B> <I>(u, m)</I> <DD><A NAME="IDX500"></A> The inverse of the Jacobian elliptic function cd(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_ND</B> <I>(u, m)</I> <DD><A NAME="IDX501"></A> The inverse of the Jacobian elliptic function nc(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_DS</B> <I>(u, m)</I> <DD><A NAME="IDX502"></A> The inverse of the Jacobian elliptic function ds(u,m). </DL> </P> <P> <DL> <DT><U>Function:</U> <B>INVERSE_JACOBI_DC</B> <I>(u, m)</I> <DD><A NAME="IDX503"></A> The inverse of the Jacobian elliptic function dc(u,m). </DL> </P> <H2><A NAME="SEC59" HREF="maxima_toc.html#TOC59">Definitions for Elliptic Integrals</A></H2> <a name="ELLIPTIC_F"></a><P> <DL> <DT><U>Function:</U> <B>ELLIPTIC_F</B> <I>(phi, m)</I> <DD><A NAME="IDX504"></A> The incomplete elliptic integral of the first kind, defined as </P> <P> See also <A HREF="maxima_17.html#ELLIPTIC_E">ELLIPTIC_E</A>, <A HREF="maxima_17.html#ELLIPTIC_KC">ELLIPTIC_KC</A> </DL> </P> <a name="ELLIPTIC_E"></a><P> <DL> <DT><U>Function:</U> <B>ELLIPTIC_E</B> <I>(phi, m)</I> <DD><A NAME="IDX505"></A> The incomplete elliptic integral of the second kind, defined as See also <A HREF="maxima_17.html#ELLIPTIC_E">ELLIPTIC_E</A>, <A HREF="maxima_17.html#ELLIPTIC_EC">ELLIPTIC_EC</A> </DL> </P> <a name="ELLIPTIC_EU"></a><P> <DL> <DT><U>Function:</U> <B>ELLIPTIC_EU</B> <I>(u, m)</I> <DD><A NAME="IDX506"></A> The incomplete elliptic integral of the second kind, defined as </P> <P> This is related to ELLIPTIC_E by See also <A HREF="maxima_17.html#ELLIPTIC_E">ELLIPTIC_E</A>. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>ELLIPTIC_PI</B> <I>(n, phi, m)</I> <DD><A NAME="IDX507"></A> The incomplete elliptic integral of the third kind, defined as </P> <P> Only the derivative with respect to phi is known by MAXIMA. </DL> </P> <a name="ELLIPTIC_KC"></a><P> <DL> <DT><U>Function:</U> <B>ELLIPTIC_KC</B> <I>(m)</I> <DD><A NAME="IDX508"></A> The complete elliptic integral of the first kind, defined as </P> <P> For certain values of m, the value of the integral is known in terms of Gamma functions. Use MAKEGAMMA to evaluate them. </DL> </P> <a name="ELLIPTIC_EC"></a><P> <DL> <DT><U>Function:</U> <B>ELLIPTIC_EC</B> <I>(m)</I> <DD><A NAME="IDX509"></A> The complete elliptic integral of the second kind, defined as </P> <P> For certain values of m, the value of the integral is known in terms of Gamma functions. Use MAKEGAMMA to evaluate them. </DL> </P> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_16.html">previous</A>, <A HREF="maxima_18.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_18.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Limits</TITLE> <link href="maxima_19.html" rel=Next> <link href="maxima_17.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_17.html">previous</A>, <A HREF="maxima_19.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC60" HREF="maxima_toc.html#TOC60">Limits</A></H1> <H2><A NAME="SEC61" HREF="maxima_toc.html#TOC61">Definitions for Limits</A></H2> <P> <DL> <DT><U>Variable:</U> <B>LHOSPITALLIM</B> <DD><A NAME="IDX510"></A> default: [4] - the maximum number of times L'Hospital's rule is used in LIMIT. This prevents infinite looping in cases like LIMIT(COT(X)/CSC(X),X,0). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LIMIT</B> <I>(exp, var, val, dir)</I> <DD><A NAME="IDX511"></A> finds the limit of exp as the real variable var approaches the value val from the direction dir. Dir may have the value PLUS for a limit from above, MINUS for a limit from below, or may be omitted (implying a two-sided limit is to be computed). For the method see Wang, P., "Evaluation of Definite Integrals by Symbolic Manipulation" - Ph.D. Thesis - MAC TR-92 October 1971. LIMIT uses the following special symbols: INF (positive infinity) and MINF (negative infinity). On output it may also use UND (undefined), IND (indefinite but bounded) and INFINITY (complex infinity). LHOSPITALLIM[4] is the maximum number of times L'Hospital's rule is used in LIMIT. This prevents infinite looping in cases like LIMIT(COT(X)/CSC(X),X,0). TLIMSWITCH[FALSE] when true will cause the limit package to use Taylor series when possible. LIMSUBST[FALSE] prevents LIMIT from attempting substitutions on unknown forms. This is to avoid bugs like LIMIT(F(N)/F(N+1),N,INF); giving 1. Setting LIMSUBST to TRUE will allow such substitutions. Since LIMIT is often called upon to simplify constant expressions, for example, INF-1, LIMIT may be used in such cases with only one argument, e.g. LIMIT(INF-1); Do EXAMPLE(LIMIT); for examples. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TLIMIT</B> <I>(exp,var,val,dir)</I> <DD><A NAME="IDX512"></A> is just the function LIMIT with TLIMSWITCH set to TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TLIMSWITCH</B> <DD><A NAME="IDX513"></A> default: [FALSE] - if true will cause the limit package to use Taylor series when possible. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_17.html">previous</A>, <A HREF="maxima_19.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_19.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Differentiation</TITLE> <link href="maxima_20.html" rel=Next> <link href="maxima_18.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_18.html">previous</A>, <A HREF="maxima_20.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC62" HREF="maxima_toc.html#TOC62">Differentiation</A></H1> <H2><A NAME="SEC63" HREF="maxima_toc.html#TOC63">Definitions for Differentiation</A></H2> <P> <DL> <DT><U>Function:</U> <B>ANTID</B> <I>(G,X,U(X))</I> <DD><A NAME="IDX514"></A> A routine for evaluating integrals of expressions involving an arbitrary unspecified function and its derivatives. It may be used by LOAD(ANTID); , after which, the function ANTIDIFF may be used. E.g. ANTIDIFF(G,X,U(X)); where G is the expression involving U(X) (U(X) arbitrary) and its derivatives, whose integral with respect to X is desired. The functions NONZEROANDFREEOF and LINEAR are also defined, as well as ANTID. ANTID is the same as ANTIDIFF except that it returns a list of two parts, the first part is the integrated part of the expression and the second part of the list is the non-integrable remainder. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ANTIDIFF</B> <I>-</I> <DD><A NAME="IDX515"></A> See ANTID. </P> </DL> <P> <DL> <DT><U>property:</U> <B>ATOMGRAD</B> <DD><A NAME="IDX516"></A> - the atomic gradient property of an expression. May be set by GRADEF. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ATVALUE</B> <I>(form, list, value)</I> <DD><A NAME="IDX517"></A> enables the user to assign the boundary value value to form at the points specified by list. <PRE> (C1) ATVALUE(F(X,Y),[X=0,Y=1],A**2)$ The form must be a function, f(v1,v2,...), or a derivative, </PRE> <P> DIFF(f(v1,v2,...),vi,ni,vj,nj,...) in which the functional arguments explicitly appear (ni is the order of differentiation with respect vi). The list of equations determine the "boundary" at which the value is given; list may be a list of equations, as above, or a single equation, vi = expr. The symbols @1, @2,... will be used to represent the functional variables v1,v2,... when atvalues are displayed. PRINTPROPS([f1, f2,...], ATVALUE) will display the atvalues of the functions f1,f2,... as specified in previously given uses of the ATVALUE function. If the list contains just one element then the element can be given without being in a list. If a first argument of ALL is given then atvalues for all functions which have them will be displayed. Do EXAMPLE(ATVALUE); for an example. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CARTAN</B> <I>-</I> <DD><A NAME="IDX518"></A> The exterior calculus of differential forms is a basic tool of differential geometry developed by Elie Cartan and has important applications in the theory of partial differential equations. The present implementation is due to F.B. Estabrook and H.D. Wahlquist. The program is self-explanatory and can be accessed by doing batch("cartan"); which will give a description with examples. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEL</B> <I>(v)</I> <DD><A NAME="IDX519"></A> This is the differential of the variable v. This commonly occurs when DIFF is called without the dependent variable being given. Then the differential of the expression is computed. For example: <PRE> (C1) diff(x); (D1) DEL(x) (C2) diff(x^2); (D2) 2 x DEL(x) (C3) diff(sin(x^2)); 2 (D3) 2 x COS(x ) DEL(x) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>DELTA</B> <I>(t)</I> <DD><A NAME="IDX520"></A> This is the Dirac Delta function. Currently only LAPLACE knows about the DELTA function: <PRE> (C1) LAPLACE(DELTA(T-A)*SIN(B*T),T,S); Is A positive, negative or zero? POS; - A S (D1) SIN(A B) %E </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>DEPENDENCIES</B> <DD><A NAME="IDX521"></A> default: [] - the list of atoms which have functional dependencies (set up by the DEPENDS or GRADEF functions). The command DEPENDENCIES has been replaced by the DEPENDS command. Do DESCRIBE(DEPENDS); </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEPENDS</B> <I>(funlist1,varlist1,funlist2,varlist2,...)</I> <DD><A NAME="IDX522"></A> declares functional dependencies for variables to be used by DIFF. </P> <PRE> DEPENDS([F,G],[X,Y],[R,S],[U,V,W],U,T) </PRE> <P> informs DIFF that F and G depend on X and Y, that R and S depend on U,V, and W, and that U depends on T. The arguments to DEPENDS are evaluated. The variables in each funlist are declared to depend on all the variables in the next varlist. A funlist can contain the name of an atomic variable or array. In the latter case, it is assumed that all the elements of the array depend on all the variables in the succeeding varlist. Initially, DIFF(F,X) is 0; executing DEPENDS(F,X) causes future differentiations of F with respect to X to give dF/dX or Y (if DERIVABBREV:TRUE). <PRE> (C1) DEPENDS([F,G],[X,Y],[R,S],[U,V,W],U,T); (D1) [F(X, Y), G(X, Y), R(U, V, W), S(U, V, W), U(T)] (C2) DEPENDENCIES; (D2) [F(X, Y), G(X, Y), R(U, V, W), S(U, V, W), U(T)] (C3) DIFF(R.S,U); dR dS (D3) -- . S + R . -- dU dU </PRE> <P> Since MACSYMA knows the chain rule for symbolic derivatives, it takes advantage of the given dependencies as follows: <PRE> (C4) DIFF(R.S,T); dR dU dS dU (D4) (-- --) . S + R . (-- --) dU dT dU dT If we set (C5) DERIVABBREV:TRUE; (D5) TRUE then re-executing the command C4, we obtain (C6) "C4; (D6) (R U ) . S + R . (S U ) U T U T </PRE> <P> To eliminate a previously declared dependency, the REMOVE command can be used. For example, to say that R no longer depends on U as declared in C1, the user can type <PRE> REMOVE(R,DEPENDENCY) </PRE> <P> This will eliminate all dependencies that may have been declared for R. <PRE> (C7) REMOVE(R,DEPENDENCY); (D7) DONE (C8) "C4; (D8) R . (S U ) U T </PRE> <P> CAVEAT: DIFF is the only MACSYMA command which uses DEPENDENCIES information. The arguments to INTEGRATE, LAPLACE, etc. must be given their dependencies explicitly in the command, e.g., INTEGRATE(F(X),X). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DERIVABBREV</B> <DD><A NAME="IDX523"></A> default: [FALSE] if TRUE will cause derivatives to display as subscripts. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DERIVDEGREE</B> <I>(exp, dv, iv)</I> <DD><A NAME="IDX524"></A> finds the highest degree of the derivative of the dependent variable dv with respect to the independent variable iv occuring in exp. <PRE> (C1) 'DIFF(Y,X,2)+'DIFF(Y,Z,3)*2+'DIFF(Y,X)*X**2$ (C2) DERIVDEGREE(%,Y,X); (D2) 2 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>DERIVLIST</B> <I>(var1,...,vark)</I> <DD><A NAME="IDX525"></A> causes only differentiations with respect to the indicated variables, within the EV command. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DERIVSUBST</B> <DD><A NAME="IDX526"></A> default: [FALSE] - controls non-syntactic substitutions such as <PRE> SUBST(X,'DIFF(Y,T),'DIFF(Y,T,2)); </PRE> <P> If DERIVSUBST is set to true, this gives 'DIFF(X,T). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DIFF</B> <I>(exp, v1, n1, v2, n2, ...)</I> <DD><A NAME="IDX527"></A> DIFF differentiates exp with respect to each vi, ni times. If just the first derivative with respect to one variable is desired then the form DIFF(exp,v) may be used. If the noun form of the function is required (as, for example, when writing a differential equation), 'DIFF should be used and this will display in a two dimensional format. DERIVABBREV[FALSE] if TRUE will cause derivatives to display as subscripts. DIFF(exp) gives the "total differential", that is, the sum of the derivatives of exp with respect to each of its variables times the function DEL of the variable. No further simplification of DEL is offered. <PRE> (C1) DIFF(EXP(F(X)),X,2); 2 F(X) d F(X) d 2 (D1) %E (--- F(X)) + %E (-- (F(X))) 2 dX dX (C2) DERIVABBREV:TRUE$ (C3) 'INTEGRATE(F(X,Y),Y,G(X),H(X)); H(X) / [ (D3) I F(X, Y) dY ] / G(X) (C4) DIFF(%,X); H(X) / [ (D4) I F(X, Y) dY + F(X, H(X)) H(X) - F(X, G(X)) G(X) ] X X X / G(X) </PRE> <P> For the tensor package, the following modifications have been incorporated: 1) the derivatives of any indexed objects in exp will have the variables vi appended as additional arguments. Then all the derivative indices will be sorted. 2) the vi may be integers from 1 up to the value of the variable DIMENSION[default value: 4]. This will cause the differentiation to be carried out wrt the vith member of the list COORDINATES which should be set to a list of the names of the coordinates, e.g., [x,y,z,t]. If COORDINATES is bound to an atomic variable, then that variable subscripted by vi will be used for the variable of differentiation. This permits an array of coordinate names or subscripted names like X[1], X[2],... to be used. If COORDINATES has not been assigned a value, then the variables will be treated as in 1) above. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>DIFF</B> <DD><A NAME="IDX528"></A> [flag] for ev causes all differentiations indicated in exp to be performed. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>DSCALAR</B> <I>(function)</I> <DD><A NAME="IDX529"></A> applies the scalar d'Alembertian to the scalar function. <PRE> (C41) DEPENDENCIES(FIELD(R)); (D41) [FIELD(R)] (C42) DSCALAR(FIELD); (D43) -M %E ((FIELD N - FIELD M + 2 FIELD ) R + 4 FIELD ) R R R R R R R - ----------------------------------------------------- 2 R </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>EXPRESS</B> <I>(expression)</I> <DD><A NAME="IDX530"></A> The result uses the noun form of any derivatives arising from expansion of the vector differential operators. To force evaluation of these derivatives, the built-in EV function can be used together with the DIFF evflag, after using the built-in DEPENDS function to establish any new implicit dependencies. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GENDIFF</B> <DD><A NAME="IDX531"></A> Sometimes DIFF(E,X,N) can be reduced even though N is symbolic. <PRE> batch("gendif")$ </PRE> <P> and you can try, for example, </P> <PRE> DIFF(%E^(A*X),X,Q) </PRE> <P> by using GENDIFF rather than DIFF. Unevaluable items come out quoted. Some items are in terms of "GENFACT", which see. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GRADEF</B> <I>(f(x1, ..., xn), g1, ..., gn)</I> <DD><A NAME="IDX532"></A> defines the derivatives of the function f with respect to its n arguments. That is, df/dxi = gi, etc. If fewer than n gradients, say i, are given, then they refer to the first i arguments of f. The xi are merely dummy variables as in function definition headers and are used to indicate the ith argument of f. All arguments to GRADEF except the first are evaluated so that if g is a defined function then it is invoked and the result is used. Gradients are needed when, for example, a function is not known explicitly but its first derivatives are and it is desired to obtain higher order derivatives. GRADEF may also be used to redefine the derivatives of MACSYMA's predefined functions (e.g. GRADEF(SIN(X),SQRT(1-SIN(X)**2)) ). It is not permissible to use GRADEF on subscripted functions. GRADEFS is a list of the functions which have been given gradients by use of the GRADEF command (i.e. GRADEF(f(x1, ..., xn), g1, ..., gn)). PRINTPROPS([f1,f2,...],GRADEF) may be used to display the gradefs of the functions f1,f2,.. GRADEF(a,v,exp) may be used to state that the derivative of the atomic variable a with respect to v is exp. This automatically does a DEPENDS(a,v). PRINTPROPS([a1,a2,...],ATOMGRAD) may be used to display the atomic gradient properties of a1,a2,... </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>GRADEFS</B> <DD><A NAME="IDX533"></A> default: [] - a list of the functions which have been given gradients by use of the GRADEF command (i.e. GRADEF(f(x1, ..., xn), g1, ..., gn).) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LAPLACE</B> <I>(exp, ovar, lvar)</I> <DD><A NAME="IDX534"></A> takes the Laplace transform of exp with respect to the variable ovar and transform parameter lvar. Exp may only involve the functions EXP, LOG, SIN, COS, SINH, COSH, and ERF. It may also be a linear, constant coefficient differential equation in which case ATVALUE of the dependent variable will be used. These may be supplied either before or after the transform is taken. Since the initial conditions must be specified at zero, if one has boundary conditions imposed elsewhere he can impose these on the general solution and eliminate the constants by solving the general solution for them and substituting their values back. Exp may also involve convolution integrals. Functional relationships must be explicitly represented in order for LAPLACE to work properly. That is, if F depends on X and Y it must be written as F(X,Y) wherever F occurs as in LAPLACE('DIFF(F(X,Y),X),X,S). LAPLACE is not affected by DEPENDENCIES set up with the DEPENDS command. <PRE> (C1) LAPLACE(%E**(2*T+A)*SIN(T)*T,T,S); A 2 %E (S - 2) (D1) --------------- 2 2 ((S - 2) + 1) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>UNDIFF</B> <I>(exp)</I> <DD><A NAME="IDX535"></A> returns an expression equivalent to exp but with all derivatives of indexed objects replaced by the noun form of the DIFF function with arguments which would yield that indexed object if the differentiation were carried out. This is useful when it is desired to replace a differentiated indexed object with some function definition and then carry out the differentiation by saying EV(...,DIFF). </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_18.html">previous</A>, <A HREF="maxima_20.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_2.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Help</TITLE> <link href="maxima_3.html" rel=Next> <link href="maxima_1.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_1.html">previous</A>, <A HREF="maxima_3.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC2" HREF="maxima_toc.html#TOC2">Help</A></H1> <H2><A NAME="SEC3" HREF="maxima_toc.html#TOC3">Introduction to Help</A></H2> <P> The most useful online help command is DESCRIBE which obtains help on all commands containing a particular string. Here by command we mean a built in operator such as INTEGRATE or FACTOR etc. As a typing short cut you may type <CODE>? fact</CODE> in lieu of <CODE>describe("fact")</CODE> <PRE> (C3) ? inte; 0: (maxima.info)Integration. 1: Introduction to Integration. 2: Definitions for Integration. 3: INTERRUPTS. 4: ASKINTEGER :Definitions for Simplification. 5: DISPLAY_FORMAT_INTERNAL :Definitions for Input and Output. 6: INTEGERP :Definitions for Miscellaneous Options. 7: INTEGRATE :Definitions for Integration. 8: INTEGRATION_CONSTANT_COUNTER :Definitions for Integration. 9: INTERPOLATE :Definitions for Numerical. Enter n, all, none, or multiple choices eg 1 3 : 7 8; Info from file /d/linux2/local/share/info/maxima.info: - Function: INTEGRATE (EXP, VAR) integrates exp with respect to var or returns an integral expression (the noun form) if it cannot perform the integration (see note 1 below). Roughly speaking three stages are used: ... </PRE> <P> In the above the user said he wanted items 7 and 8. Note the <CODE>;</CODE> following the two numbers. He might have typed <CODE>all</CODE> to see help on all the items. </P> <H2><A NAME="SEC4" HREF="maxima_toc.html#TOC4">Lisp and Maxima</A></H2> <P> All of Maxima is of course written in lisp. There is a naming convention for functions and variables: All symbols which begin with a "$" sign at lisp level, are read with the "$" sign stripped off at Macsyma level. For example, there are two lisp functions TRANSLATE and $TRANSLATE. If at macsyma level you enter TRANSLATE(FOO); the function which is called is the $translate function. To access the other function you must prefix with a "?". Note you may <I>not</I> put a space after the <CODE>?</CODE> since that would indicate you were looking for help! </P> <PRE> (C1) ?TRANSLATE(FOO); </PRE> <P> Of course, this may well not do what you wanted it to do since it is a completely different function. </P> <P> To enter a lisp command you may use <PRE> (C1) :lisp (foo 1 2) </PRE> <P> or to get a lisp prompt use <CODE>to_lisp();</CODE>, or alternately type <CODE>Ctrl-c</CODE> to enter into a debug break. This will cause a lisp break loop to be entered. You could now evaluate $d2 and view the value of the line label D2, in its internal lisp format. Typing <CODE>:q</CODE> will quit to top level, if you are in a debug break. If you had exited maxima with <CODE>to_lisp();</CODE> then you should type <PRE> MAXIMA>(run) </PRE> <P> at the lisp prompt, to restart the Maxima session. </P> <P> If you intend to write lisp functions to be called at macsyma level you should name them by names beginning with a "$". Note that all symbols typed at lisp level are automatically read in upper case, unless you do something like <CODE>|$odeSolve|</CODE> to force the case to be respected. Maxima interprets symbols as mixed case, if the symbol has already been read before or at the time it was first read there was not an already existing symbol with the same letters but upper case only. Thus if you type <PRE> (C1) Integrate; (D1) INTEGRATE (C2) Integ; (D2) Integ </PRE> <P> The symbol <CODE>Integrate</CODE> already existed in upper case since it is a Maxima primitive, but INTEG, does not already exist, so the Integ is permitted. This may seem a little bizarre, but we wish to keep old maxima code working, which assumes that Maxima primitives may be in upper or lower case. An advantage of this system is that if you type in lower case, you will immediately see which are the maxima keywords and functions. </P> <P> To enter Maxima forms at lisp level, you may use the <CODE>#$</CODE> macro. <PRE> (setq $foo #$[x,y]$) </PRE> <P> This will have the same effect as entering <PRE> (C1)FOO:[X,Y]; </PRE> <P> </P> <P> except that foo will not appear in the VALUES list. In order to view foo in macsyma printed format you may type </P> <PRE> (displa $foo) </PRE> <P> In this documentation when we wish to refer to a macsyma symbol we shall generally omit the $ just as you would when typing at macsyma level. This will cause confusion when we also wish to refer to a lisp symbol. In this case we shall usually try to use lower case for the lisp symbol and upper case for the macsyma symbol. For example LIST for $list and list for the lisp symbol whose printname is "list". </P> <P> Since functions defined using the MAXIMA language are not ordinary lisp functions, you must use mfuncall to call them. For example: </P> <PRE> (D2) FOO(X, Y) := X + Y + 3 </PRE> <P> </P> <P> then at lisp level </P> <PRE> CL-MAXIMA>>(mfuncall '$foo 4 5) 12 </PRE> <P> A number of lisp functions are shadowed in the maxima package. This is because their use within maxima is not compatible with the definition as a system function. For example typep behaves differently common lisp than it did in Maclisp. If you want to refer to the zeta lisp typep while in the maxima package you should use global:typep (or cl:typep for common lisp). Thus </P> <PRE> (macsyma:typep '(1 2)) ==> 'list (lisp:typep '(1 2))==> error (lisp:type-of '(1 2))==> 'cons </PRE> <P> To see which symbols are shadowed look in "src/maxima-package.lisp" or do a describe of the package at lisp level. </P> <H2><A NAME="SEC5" HREF="maxima_toc.html#TOC5">Garbage Collection</A></H2> <P> Symbolic computation tends to create a good deal of garbage, and effective handling of this can be crucial to successful completion of some programs. </P> <P> Under GCL, on UNIX systems where the mprotect system call is available (including SUN OS 4.0 and some variants of BSD) a stratified garbage collection is available. This limits the collection to pages which have been recently written to. See the GCL documentation under ALLOCATE and GBC. At the lisp level doing (setq si::*notify-gbc* t) will help you determine which areas might need more space. </P> <H2><A NAME="SEC6" HREF="maxima_toc.html#TOC6">Documentation</A></H2> <P> The source for the documentation is in <TT>`.texi'</TT> texinfo format. From this format we can produce the info files used by the online commands <CODE>? </CODE> and <CODE>describe</CODE>. Also <CODE>html</CODE> and <CODE>pdf</CODE> files can be produced. </P> <P> Additionally there are examples so that you may do <PRE> example(integrate); (C4) example(integrate); (C5) test(f):=BLOCK([u],u:INTEGRATE(f,x),RATSIMP(f-DIFF(u,x))); (D5) test(f) := BLOCK([u], u : INTEGRATE(f, x), RATSIMP(f - DIFF(u, x))); (C6) test(SIN(x)); (D6) 0 (C7) test(1/(x+1)); (D7) 0 (C8) test(1/(x^2+1)); (D8) 0 (C9) INTEGRATE(SIN(X)^3,X); </PRE> <H2><A NAME="SEC7" HREF="maxima_toc.html#TOC7">Definitions for Help</A></H2> <P> <DL> <DT><U>Function:</U> <B>DEMO</B> <I>(file)</I> <DD><A NAME="IDX1"></A> this is the same as BATCH but pauses after each command line and continues when a space is typed (you may need to type <CODE>;</CODE> followed by a newline, if running under xmaxima). The demo files have suffix <CODE>.dem</CODE> </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DESCRIBE</B> <I>(cmd)</I> <DD><A NAME="IDX2"></A> </P> <P> This command prints documentation on all commands which contain the substring "cmd". Thus <PRE> (C1) describe("integ"); 0: (maxima.info)Integration. 1: Introduction to Integration. 2: Definitions for Integration. 3: ASKINTEGER :Definitions for Simplification. .. Enter n, all, none, or multiple choices eg 1 3 : 2 3; Info from file /d/linux2/local/share/info/maxima.info: Definitions for Integration =========================== - Function: CHANGEVAR (EXP,F(X,Y),Y,X) ... </PRE> <P> see section <A HREF="maxima_2.html#SEC3">Introduction to Help</A> </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EXAMPLE</B> <I>(command)</I> <DD><A NAME="IDX3"></A> will start up a demonstration of how command works on some expressions. After each command line it will pause and wait for a space to be typed, as in the DEMO command. </P> <P> The name of the file containing the examples is given by the variable manual_demo, which defaults to "maxima.demo". </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_1.html">previous</A>, <A HREF="maxima_3.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_20.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Integration</TITLE> <link href="maxima_21.html" rel=Next> <link href="maxima_19.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_19.html">previous</A>, <A HREF="maxima_21.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC64" HREF="maxima_toc.html#TOC64">Integration</A></H1> <H2><A NAME="SEC65" HREF="maxima_toc.html#TOC65">Introduction to Integration</A></H2> <P> MACSYMA has several routines for handling integration. The INTEGRATE command makes use of most of them. There is also the ANTID package, which handles an unspecified function (and its derivatives, of course). For numerical uses, there is the ROMBERG function. There is also an adaptave integrator which uses the Newton-Cotes 8 panel quadrature rule, called QUANC8. Hypergeometric Functions are being worked on, do DESCRIBE(SPECINT); for details. Generally speaking, MACSYMA only handles integrals which are integrable in terms of the "elementary functions" (rational functions, trigonometrics, logs, exponentials, radicals, etc.) and a few extensions (error function, dilogarithm). It does not handle integrals in terms of unknown functions such as g(x) and h(x). </P> <H2><A NAME="SEC66" HREF="maxima_toc.html#TOC66">Definitions for Integration</A></H2> <P> <DL> <DT><U>Function:</U> <B>CHANGEVAR</B> <I>(exp,f(x,y),y,x)</I> <DD><A NAME="IDX536"></A> makes the change of variable given by f(x,y) = 0 in all integrals occurring in exp with integration with respect to x; y is the new variable. <PRE> (C1) 'INTEGRATE(%E**SQRT(A*Y),Y,0,4); 4 / [ SQRT(A) SQRT(Y) (D1) I (%E ) dY ] / 0 (C2) CHANGEVAR(D1,Y-Z^2/A,Z,Y); 2 SQRT(A) / [ Z 2 I Z %E dZ ] / 0 (D4) --------------------- A </PRE> <P> CHANGEVAR may also be used to changes in the indices of a sum or product. However, it must be realized that when a change is made in a sum or product, this change must be a shift, i.e. I=J+ ..., not a higher degree function. E.g. <PRE> (C3) SUM(A[I]*X^(I-2),I,0,INF); INF ==== \ I - 2 (D3) > A X / I ==== I = 0 (C4) CHANGEVAR(%,I-2-N,N,I); INF ==== \ N (D4) > A X / N + 2 ==== N = - 2 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>DBLINT</B> <I>('F,'R,'S,a,b)</I> <DD><A NAME="IDX537"></A> a double-integral routine which was written in top-level macsyma and then translated and compiled to machine code. Use LOAD(DBLINT); to access this package. It uses the Simpson's Rule method in both the x and y directions to calculate /B /S(X) | | | | F(X,Y) DY DX . | | /A /R(X) The function F(X,Y) must be a translated or compiled function of two variables, and R(X) and S(X) must each be a translated or compiled function of one variable, while a and b must be floating point numbers. The routine has two global variables which determine the number of divisions of the x and y intervals: DBLINT_X and DBLINT_Y, both of which are initially 10, and can be changed independently to other integer values (there are 2*DBLINT_X+1 points computed in the x direction, and 2*DBLINT_Y+1 in the y direction). The routine subdivides the X axis and then for each value of X it first computes R(X) and S(X); then the Y axis between R(X) and S(X) is subdivided and the integral along the Y axis is performed using Simpson's Rule; then the integral along the X axis is done using Simpson's Rule with the function values being the Y-integrals. This procedure may be numerically unstable for a great variety of reasons, but is reasonably fast: avoid using it on highly oscillatory functions and functions with singularities (poles or branch points in the region). The Y integrals depend on how far apart R(X) and S(X) are, so if the distance S(X)-R(X) varies rapidly with X, there may be substantial errors arising from truncation with different step-sizes in the various Y integrals. One can increase DBLINT_X and DBLINT_Y in an effort to improve the coverage of the region, at the expense of computation time. The function values are not saved, so if the function is very time-consuming, you will have to wait for re-computation if you change anything (sorry). It is required that the functions F, R, and S be either translated or compiled prior to calling DBLINT. This will result in orders of magnitude speed improvement over interpreted code in many cases! The file SHARE1;DBLINT DEMO can be run in batch or demo mode to illustrate the usage on a sample problem; the file SHARE1;DBLNT DEMO1 is an extension of the DEMO which also makes use of other numerical aids, FLOATDEFUNK and QUANC8. Please send all bug notes and questions to LPH </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEFINT</B> <I>(exp, var, low, high)</I> <DD><A NAME="IDX538"></A> DEFinite INTegration, the same as INTEGRATE(exp,var,low,high). This uses symbolic methods, if you wish to use a numerical method try ROMBERG(exp,var,low,high). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ERF</B> <I>(X)</I> <DD><A NAME="IDX539"></A> the error function, whose derivative is: 2*EXP(-X^2)/SQRT(%PI). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ERFFLAG</B> <DD><A NAME="IDX540"></A> default: [TRUE] if FALSE prevents RISCH from introducing the ERF function in the answer if there were none in the integrand to begin with. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ERRINTSCE</B> <DD><A NAME="IDX541"></A> default: [TRUE] - If a call to the INTSCE routine is not of the form </P> <PRE> EXP(A*X+B)*COS(C*X)^N*SIN(C*X) </PRE> <P> then the regular integration program will be invoked if the switch ERRINTSCE[TRUE] is TRUE. If it is FALSE then INTSCE will err out. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ILT</B> <I>(exp, lvar, ovar)</I> <DD><A NAME="IDX542"></A> takes the inverse Laplace transform of exp with respect to lvar and parameter ovar. exp must be a ratio of polynomials whose denominator has only linear and quadratic factors. By using the functions LAPLACE and ILT together with the SOLVE or LINSOLVE functions the user can solve a single differential or convolution integral equation or a set of them. <PRE> (C1) 'INTEGRATE(SINH(A*X)*F(T-X),X,0,T)+B*F(T)=T**2; T / [ 2 (D1) I (SINH(A X) F(T - X)) dX + B F(T) = T ] / 0 (C2) LAPLACE(%,T,S); A LAPLACE(F(T), T, S) (D2) --------------------- 2 2 S - A 2 + B LAPLACE(F(T), T, S) = -- 3 S (C3) LINSOLVE([%],['LAPLACE(F(T),T,S)]); SOLUTION 2 2 2 S - 2 A (E3) LAPLACE(F(T), T, S) = -------------------- 5 2 3 B S + (A - A B) S (D3) [E3] (C4) ILT(E3,S,T); IS A B (A B - 1) POSITIVE, NEGATIVE, OR ZERO? POS; 2 SQRT(A) SQRT(A B - B) T 2 COSH(------------------------) B (D4) F(T) = - -------------------------------- A 2 A T 2 + ------- + ------------------ A B - 1 3 2 2 A B - 2 A B + A </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>INTEGRATE</B> <I>(exp, var)</I> <DD><A NAME="IDX543"></A> integrates exp with respect to var or returns an integral expression (the noun form) if it cannot perform the integration (see note 1 below). Roughly speaking three stages are used: <UL> <LI> (1) INTEGRATE sees if the integrand is of the form F(G(X))*DIFF(G(X),X) by testing whether the derivative of some subexpression (i.e. G(X) in the above case) divides the integrand. If so it looks up F in a table of integrals and substitutes G(X) for X in the integral of F. This may make use of gradients in taking the derivative. (If an unknown function appears in the integrand it must be eliminated in this stage or else INTEGRATE will return the noun form of the integrand.) <LI> (2) INTEGRATE tries to match the integrand to a form for which a specific method can be used, e.g. trigonometric substitutions. <LI> (3) If the first two stages fail it uses the Risch algorithm. Functional relationships must be explicitly represented in order for INTEGRATE to work properly. INTEGRATE is not affected by DEPENDENCIES set up with the DEPENDS command. INTEGRATE(exp, var, low, high) finds the definite integral of exp with respect to var from low to high or returns the noun form if it cannot perform the integration. The limits should not contain var. Several methods are used, including direct substitution in the indefinite integral and contour integration. Improper integrals may use the names INF for positive infinity and MINF for negative infinity. If an integral "form" is desired for manipulation (for example, an integral which cannot be computed until some numbers are substituted for some parameters), the noun form 'INTEGRATE may be used and this will display with an integral sign. (See Note 1 below.) The function LDEFINT uses LIMIT to evaluate the integral at the lower and upper limits. Sometimes during integration the user may be asked what the sign of an expression is. Suitable responses are POS;, ZERO;, or NEG;. </UL> <PRE> (C1) INTEGRATE(SIN(X)**3,X); 3 COS (X) (D1) ------- - COS(X) 3 (C2) INTEGRATE(X**A/(X+1)**(5/2),X,0,INF); IS A + 1 POSITIVE, NEGATIVE, OR ZERO? POS; IS 2 A - 3 POSITIVE, NEGATIVE, OR ZERO? NEG; 3 (D2) BETA(A + 1, - - A) 2 (C3) GRADEF(Q(X),SIN(X**2)); (D3) Q(X) (C4) DIFF(LOG(Q(R(X))),X); d 2 (-- R(X)) SIN(R (X)) dX (D4) -------------------- Q(R(X)) (C5) INTEGRATE(%,X); (D5) LOG(Q(R(X))) </PRE> <P> (Note 1) The fact that MACSYMA does not perform certain integrals does not always imply that the integral does not exist in closed form. In the example below the integration call returns the noun form but the integral can be found fairly easily. For example, one can compute the roots of <CODE>X^3+X+1 = 0</CODE> to rewrite the integrand in the form <PRE> 1/((X-A)*(X-B)*(X-C)) </PRE> <P> where A, B and C are the roots. MACSYMA will integrate this equivalent form although the integral is quite complicated. <PRE> (C6) INTEGRATE(1/(X^3+X+1),X); / [ 1 (D6) I ---------- dX ] 3 / X + X + 1 </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>INTEGRATION_CONSTANT_COUNTER</B> <DD><A NAME="IDX544"></A> - a counter which is updated each time a constant of integration (called by MACSYMA, e.g., "INTEGRATIONCONSTANT1") is introduced into an expression by indefinite integration of an equation. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INTEGRATE_USE_ROOTSOF</B> <DD><A NAME="IDX545"></A> default: [false] If not false then when the denominator of an rational function cannot be factored, we give the integral in a form which is a sum over the roots of the denominator: </P> <PRE> (C4) integrate(1/(1+x+x^5),x); / 2 [ x - 4 x + 5 I ------------ dx 2 x + 1 ] 3 2 2 5 ATAN(-------) / x - x + 1 LOG(x + x + 1) SQRT(3) (D4) ----------------- - --------------- + --------------- 7 14 7 SQRT(3) </PRE> <P> but now we set the flag to be true and the first part of the integral will undergo further simplification. <PRE> (C5) INTEGRATE_USE_ROOTSOF:true; (D5) TRUE </PRE> <PRE> (C6) integrate(1/(1+x+x^5),x); ==== 2 \ (%R1 - 4 %R1 + 5) LOG(x - %R1) > ------------------------------- / 2 ==== 3 %R1 - 2 %R1 3 2 %R1 in ROOTSOF(x - x + 1) (D6) ---------------------------------------------------------- 7 2 x + 1 2 5 ATAN(-------) LOG(x + x + 1) SQRT(3) - --------------- + --------------- 14 7 SQRT(3) </PRE> <P> Note that it may be that we want to approximate the roots in the complex plane, and then provide the function factored, since we will then be able to group the roots and their complex conjugates, so as to give a better answer. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INTSCE</B> <I>(expr,var)</I> <DD><A NAME="IDX546"></A> INTSCE LISP contains a routine, written by Richard Bogen, for integrating products of sines,cosines and exponentials of the form <PRE> EXP(A*X+B)*COS(C*X)^N*SIN(C*X)^M </PRE> <P> The call is INTSCE(expr,var) expr may be any expression, but if it is not in the above form then the regular integration program will be invoked if the switch ERRINTSCE[TRUE] is TRUE. If it is FALSE then INTSCE will err out. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LDEFINT</B> <I>(exp,var,ll,ul)</I> <DD><A NAME="IDX547"></A> yields the definite integral of exp by using LIMIT to evaluate the indefinite integral of exp with respect to var at the upper limit ul and at the lower limit ll. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POTENTIAL</B> <I>(givengradient)</I> <DD><A NAME="IDX548"></A> The calculation makes use of the global variable <PRE> POTENTIALZEROLOC[0] </PRE> <P> which must be NONLIST or of the form </P> <PRE> [indeterminatej=expressionj, indeterminatek=expressionk, ...] </PRE> <P> the former being equivalent to the nonlist expression for all right-hand sides in the latter. The indicated right-hand 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. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>QQ</B> <DD><A NAME="IDX549"></A> - The file SHARE1;QQ FASL (which may be loaded with LOAD("QQ");) contains a function QUANC8 which can take either 3 or 4 arguments. The 3 arg version computes the integral of the function specified as the first argument over the interval from lo to hi as in QUANC8('function name,lo,hi); . The function name should be quoted. The 4 arg version will compute the integral of the function or expression (first arg) with respect to the variable (second arg) over the interval from lo to hi as in QUANC8(<f(x) or expression in x>,x,lo,hi). The method used is the Newton-Cotes 8th order polynomial quadrature, and the routine is adaptive. It will thus spend time dividing the interval only when necessary to achieve the error conditions specified by the global variables QUANC8_RELERR (default value=1.0e-4) and QUANC8_ABSERR (default value=1.0e-8) which give the relative error test: |integral(function)-computed value|< quanc8_relerr*|integral(function)| and the absolute error test: |integral(function)-computed value|<quanc8_abserr. Do PRINTFILE(QQ,USAGE,SHARE1) for details. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>QUANC8</B> <I>('function name,lo,hi)</I> <DD><A NAME="IDX550"></A> An adaptive integrator, available in SHARE1;QQ FASL. DEMO and USAGE files are provided. The method is to use Newton-Cotes 8-panel quadrature rule, hence the function name QUANC8, available in 3 or 4 arg versions. Absolute and relative error checks are used. To use it do LOAD("QQ"); For more details do DESCRIBE(QQ); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RESIDUE</B> <I>(exp, var, val)</I> <DD><A NAME="IDX551"></A> computes the residue in the complex plane of the expression exp when the variable var assumes the value val. The residue is the coefficient of (var-val)**(-1) in the Laurent series for exp. <PRE> (C1) RESIDUE(S/(S**2+A**2),S,A*%I); 1 (D1) - 2 (C2) RESIDUE(SIN(A*X)/X**4,X,0); 3 A (D2) - -- 6 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>RISCH</B> <I>(exp, var)</I> <DD><A NAME="IDX552"></A> integrates exp with respect to var using the transcendental case of the Risch algorithm. (The algebraic case of the Risch algorithm has not been implemented.) This currently handles the cases of nested exponentials and logarithms which the main part of INTEGRATE can't do. INTEGRATE will automatically apply RISCH if given these cases. ERFFLAG[TRUE] - if FALSE prevents RISCH from introducing the ERF function in the answer if there were none in the integrand to begin with. <PRE> (C1) RISCH(X^2*ERF(X),X); 2 2 - X X 3 2 %E (%E SQRT(%PI) X ERF(X) + X + 1) (D1) ------------------------------------------ 3 SQRT(%PI) (C2) DIFF(%,X),RATSIMP; 2 (D2) X ERF(X) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>ROMBERG</B> <I>(exp,var,ll,ul)</I> <DD><A NAME="IDX553"></A> or ROMBERG(exp,ll,ul) - Romberg Integration. You need not load in any file to use ROMBERG, it is autoloading. There are two ways to use this function. The first is an inefficient way like the definite integral version of INTEGRATE: ROMBERG(<integrand>,<variable of integration>,<lower limit>, <upper limit>); <PRE> Examples: ROMBERG(SIN(Y),Y,1,%PI); TIME= 39 MSEC. 1.5403023 F(X):=1/(X^5+X+1); ROMBERG(F(X),X,1.5,0); TIME= 162 MSEC. - 0.75293843 </PRE> <P> The second is an efficient way that is used as follows: </P> <PRE> ROMBERG(<function name>,<lower limit>,<upper limit>); </PRE> <PRE> Example: F(X):=(MODE_DECLARE([FUNCTION(F),X],FLOAT),1/(X^5+X+1)); TRANSLATE(F); ROMBERG(F,1.5,0); TIME= 13 MSEC. - 0.75293843 </PRE> <P> The first argument must be a TRANSLATEd or compiled function. (If it is compiled it must be declared to return a FLONUM.) If the first argument is not already TRANSLATEd, ROMBERG will not attempt to TRANSLATE it but will give an error. The accuracy of the integration is governed by the global variables ROMBERGTOL (default value 1.E-4) and ROMBERGIT (default value 11). ROMBERG will return a result if the relative difference in successive approximations is less than ROMBERGTOL. It will try halving the stepsize ROMBERGIT times before it gives up. The number of iterations and function evaluations which ROMBERG will do is governed by ROMBERGABS and ROMBERGMIN, do DESCRIBE(ROMBERGABS,ROMBERGMIN); for details. ROMBERG may be called recursively and thus can do double and triple integrals. <PRE> Example: INTEGRATE(INTEGRATE(X*Y/(X+Y),Y,0,X/2),X,1,3); 13/3 (2 LOG(2/3) + 1) %,NUMER; 0.81930233 DEFINE_VARIABLE(X,0.0,FLOAT,"Global variable in function F")$ F(Y):=(MODE_DECLARE(Y,FLOAT), X*Y/(X+Y) )$ G(X):=ROMBERG('F,0,X/2)$ ROMBERG(G,1,3); 0.8193023 </PRE> <P> The advantage with this way is that the function F can be used for other purposes, like plotting. The disadvantage is that you have to think up a name for both the function F and its free variable X. Or, without the global: <PRE> G1(X):=(MODE_DECLARE(X,FLOAT), ROMBERG(X*Y/(X+Y),Y,0,X/2))$ ROMBERG(G1,1,3); 0.8193023 </PRE> <P> The advantage here is shortness. <PRE> Q(A,B):=ROMBERG(ROMBERG(X*Y/(X+Y),Y,0,X/2),X,A,B)$ Q(1,3); 0.8193023 </PRE> <P> It is even shorter this way, and the variables do not need to be declared because they are in the context of ROMBERG. Use of ROMBERG for multiple integrals can have great disadvantages, though. The amount of extra calculation needed because of the geometric information thrown away by expressing multiple integrals this way can be incredible. The user should be sure to understand and use the ROMBERGTOL and ROMBERGIT switches. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ROMBERGABS</B> <DD><A NAME="IDX554"></A> default: [0.0] (0.0B0) Assuming that successive estimates produced by ROMBERG are Y[0], Y[1], Y[2] etc., then ROMBERG will return after N iterations if (roughly speaking) (ABS(Y[N]-Y[N-1]) <= ROMBERGABS OR ABS(Y[N]-Y[N-1])/(IF Y[N]=0.0 THEN 1.0 ELSE Y[N]) <= ROMBERGTOL) is TRUE. (The condition on the number of iterations given by ROMBERGMIN must also be satisfied.) Thus if ROMBERGABS is 0.0 (the default) you just get the relative error test. The usefulness of the additional variable comes when you want to perform an integral, where the dominant contribution comes from a small region. Then you can do the integral over the small dominant region first, using the relative accuracy check, followed by the integral over the rest of the region using the absolute accuracy check. Example: Suppose you want to compute <PRE> Integral(exp(-x),x,0,50) </PRE> <P> (numerically) with a relative accuracy of 1 part in 10000000. Define the function. N is a counter, so we can see how many function evaluations were needed. <PRE> F(X):=(MODE_DECLARE(N,INTEGER,X,FLOAT),N:N+1,EXP(-X))$ TRANSLATE(F)$ /* First of all try doing the whole integral at once */ BLOCK([ROMBERGTOL:1.E-6,ROMBERABS:0.],N:0,ROMBERG(F,0,50)); ==> 1.00000003 N; ==> 257 /* Number of function evaluations*/ </PRE> <P> Now do the integral intelligently, by first doing Integral(exp(-x),x,0,10) and then setting ROMBERGABS to 1.E-6*(this partial integral). <PRE> BLOCK([ROMBERGTOL:1.E-6,ROMBERGABS:0.,SUM:0.], N:0,SUM:ROMBERG(F,0,10),ROMBERGABS:SUM*ROMBERGTOL,ROMBERGTOL:0., SUM+ROMBERG(F,10,50)); ==> 1.00000001 /* Same as before */ N; ==> 130 </PRE> <P> So if F(X) were a function that took a long time to compute, the second method would be about 2 times quicker. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ROMBERGIT</B> <DD><A NAME="IDX555"></A> default: [11] - The accuracy of the ROMBERG integration command is governed by the global variables ROMBERGTOL[1.E-4] and ROMBERGIT[11]. ROMBERG will return a result if the relative difference in successive approximations is less than ROMBERGTOL. It will try halving the stepsize ROMBERGIT times before it gives up. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ROMBERGMIN</B> <DD><A NAME="IDX556"></A> default: [0] - governs the minimum number of function evaluations that ROMBERG will make. ROMBERG will evaluate its first arg. at least 2^(ROMBERGMIN+2)+1 times. This is useful for integrating oscillatory functions, when the normal converge test might sometimes wrongly pass. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ROMBERGTOL</B> <DD><A NAME="IDX557"></A> default: [1.E-4] - The accuracy of the ROMBERG integration command is governed by the global variables ROMBERGTOL[1.E-4] and ROMBERGIT[11]. ROMBERG will return a result if the relative difference in successive approximations is less than ROMBERGTOL. It will try halving the stepsize ROMBERGIT times before it gives up. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TLDEFINT</B> <I>(exp,var,ll,ul)</I> <DD><A NAME="IDX558"></A> is just LDEFINT with TLIMSWITCH set to TRUE. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_19.html">previous</A>, <A HREF="maxima_21.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_21.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Equations</TITLE> <link href="maxima_22.html" rel=Next> <link href="maxima_20.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_20.html">previous</A>, <A HREF="maxima_22.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC67" HREF="maxima_toc.html#TOC67">Equations</A></H1> <H2><A NAME="SEC68" HREF="maxima_toc.html#TOC68">Definitions for Equations</A></H2> <P> <DL> <DT><U>Variable:</U> <B>%RNUM_LIST</B> <DD><A NAME="IDX559"></A> default: [] - When %R variables are introduced in solutions by the ALGSYS command, they are added to %RNUM_LIST in the order they are created. This is convenient for doing substitutions into the solution later on. It's recommended to use this list rather than doing CONCAT('%R,J). </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>ALGEXACT</B> <DD><A NAME="IDX560"></A> default: [FALSE] affects the behavior of ALGSYS as follows: If ALGEXACT is TRUE, ALGSYS always calls SOLVE and then uses REALROOTS on SOLVE's failures. If ALGEXACT is FALSE, SOLVE is called only if the eliminant was not univariate, or if it was a quadratic or biquadratic. Thus ALGEXACT:TRUE doesn't guarantee only exact solutions, just that ALGSYS will first try as hard as it can to give exact solutions, and only yield approximations when all else fails. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>ALGSYS</B> <I>([exp1, exp2, ...], [var1, var2, ...])</I> <DD><A NAME="IDX561"></A> solves the list of simultaneous polynomials or polynomial equations (which can be non-linear) for the list of variables. The symbols %R1, %R2, etc. will be used to represent arbitrary parameters when needed for the solution (the variable %RNUM_LIST holds these). In the process described below, ALGSYS is entered recursively if necessary. The method is as follows: (1) First the equations are FACTORed and split into subsystems. (2) For each subsystem Si, an equation E and a variable var are selected (the var is chosen to have lowest nonzero degree). Then the resultant of E and Ej with respect to var is computed for each of the remaining equations Ej in the subsystem Si. This yields a new subsystem S'i in one fewer variables (var has been eliminated). The process now returns to (1). (3) Eventually, a subsystem consisting of a single equation is obtained. If the equation is multivariate and no approximations in the form of floating point numbers have been introduced, then SOLVE is called to find an exact solution. (The user should realize that SOLVE may not be able to produce a solution or if it does the solution may be a very large expression.) If the equation is univariate and is either linear, quadratic, or bi-quadratic, then again SOLVE is called if no approximations have been introduced. If approximations have been introduced or the equation is not univariate and neither linear, quadratic, or bi-quadratic, then if the switch REALONLY[FALSE] is TRUE, the function REALROOTS is called to find the real-valued solutions. If REALONLY:FALSE then ALLROOTS is called which looks for real and complex-valued solutions. If ALGSYS produces a solution which has fewer significant digits than required, the user can change the value of ALGEPSILON[10^8] to a higher value. If ALGEXACT[FALSE] is set to TRUE, SOLVE will always be called. (4) Finally, the solutions obtained in step (3) are re-inserted into previous levels and the solution process returns to (1). The user should be aware of several caveats: When ALGSYS encounters a multivariate equation which contains floating point approximations (usually due to its failing to find exact solutions at an earlier stage), then it does not attempt to apply exact methods to such equations and instead prints the message: "ALGSYS cannot solve - system too complicated." Interactions with RADCAN can produce large or complicated expressions. In that case, the user may use PICKAPART or REVEAL to analyze the solution. Occasionally, RADCAN may introduce an apparent %I into a solution which is actually real-valued. Do EXAMPLE(ALGSYS); for examples. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ALLROOTS</B> <I>(poly)</I> <DD><A NAME="IDX562"></A> finds all the real and complex roots of the real polynomial poly which must be univariate and may be an equation, e.g. poly=0. For complex polynomials an algorithm by Jenkins and Traub is used (Algorithm 419, Comm. ACM, vol. 15, (1972), p. 97). For real polynomials the algorithm used is due to Jenkins (Algorithm 493, TOMS, vol. 1, (1975), p.178). The flag POLYFACTOR[FALSE] when true causes ALLROOTS to factor the polynomial over the real numbers if the polynomial is real, or over the complex numbers, if the polynomial is complex. ALLROOTS may give inaccurate results in case of multiple roots. (If poly is real and you get inaccurate answers, you may want to try ALLROOTS(%I*poly);) Do EXAMPLE(ALLROOTS); for an example. ALLROOTS rejects non-polynomials. It requires that the numerator after RATting should be a polynomial, and it requires that the denominator be at most a complex number. As a result of this ALLROOTS will always return an equivalent (but factored) expression, if POLYFACTOR is TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>BACKSUBST</B> <DD><A NAME="IDX563"></A> default: [TRUE] if set to FALSE will prevent back substitution after the equations have been triangularized. This may be necessary in very big problems where back substitution would cause the generation of extremely large expressions. (On MC this could cause storage capacity to be exceeded.) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>BREAKUP</B> <DD><A NAME="IDX564"></A> default: [TRUE] if FALSE will cause SOLVE to express the solutions of cubic or quartic equations as single expressions rather than as made up of several common subexpressions which is the default. BREAKUP:TRUE only works when PROGRAMMODE is FALSE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DIMENSION</B> <I>(equation or list of equations)</I> <DD><A NAME="IDX565"></A> The file "share1/dimen.mc" contains functions for automatic dimensional analysis. LOAD(DIMEN); will load it up for you. There is a demonstration available in share1/dimen.dem. Do DEMO("dimen"); to run it. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DISPFLAG</B> <DD><A NAME="IDX566"></A> default: [TRUE] if set to FALSE within a BLOCK will inhibit the display of output generated by the solve functions called from within the BLOCK. Termination of the BLOCK with a dollar sign, $, sets DISPFLAG to FALSE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FUNCSOLVE</B> <I>(eqn,g(t))</I> <DD><A NAME="IDX567"></A> gives [g(t) = ...] or [], depending on whether or not there exists a rational fcn g(t) satisfying eqn, which must be a first order, linear polynomial in (for this case) g(t) and g(t+1). <PRE> (C1) FUNCSOLVE((N+1)*FOO(N)-(N+3)*FOO(N+1)/(N+1) = (N-1)/(N+2),FOO(N)); N (D1) FOO(N) = --------------- (N + 1) (N + 2) </PRE> <P> Warning: this is a very rudimentary implementation--many safety checks and obvious generalizations are missing. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>GLOBALSOLVE</B> <DD><A NAME="IDX568"></A> default: [FALSE] if set to TRUE then variables which are SOLVEd for will be set to the solution of the set of simultaneous equations. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>IEQN</B> <I>(ie,unk,tech,n,guess)</I> <DD><A NAME="IDX569"></A> Integral Equation solving routine. Do LOAD(INTEQN); to access it. CAVEAT: To free some storage, a KILL(LABELS) is included in this file. Therefore, before loading the integral equation package, the user should give names to any expressions he wants to keep. ie is the integral equation; unk is the unknown function; tech is the technique to be tried from those given above (tech = FIRST means: try the first technique which finds a solution; tech = ALL means: try all applicable techniques); n is the maximum number of terms to take for TAYLOR, NEUMANN, FIRSTKINDSERIES, or FREDSERIES (it is also the maximum depth of recursion for the differentiation method); guess is the initial guess for NEUMANN or FIRSTKINDSERIES. Default values for the 2nd thru 5th parameters are: unk: P(X), where P is the first function encountered in an integrand which is unknown to MACSYMA and X is the variable which occurs as an argument to the first occurrence of P found outside of an integral in the case of SECONDKIND equations, or is the only other variable besides the variable of integration in FIRSTKIND equations. If the attempt to search for X fails, the user will be asked to supply the independent variable; tech: FIRST; n: 1; guess: NONE, which will cause NEUMANN and FIRSTKINDSERIES to use F(X) as an initial guess. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>IEQNPRINT</B> <DD><A NAME="IDX570"></A> default: [TRUE] - governs the behavior of the result returned by the IEQN command (which see). If IEQNPRINT is set to FALSE, the lists returned by the IEQN function are of the form [SOLUTION, TECHNIQUE USED, NTERMS, FLAG] where FLAG is absent if the solution is exact. Otherwise, it is the word APPROXIMATE or INCOMPLETE corresponding to an inexact or non-closed form solution, respectively. If a series method was used, NTERMS gives the number of terms taken (which could be less than the n given to IEQN if an error prevented generation of further terms). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LHS</B> <I>(eqn)</I> <DD><A NAME="IDX571"></A> the left side of the equation eqn. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LINSOLVE</B> <I>([exp1, exp2, ...], [var1, var2, ...])</I> <DD><A NAME="IDX572"></A> solves the list of simultaneous linear equations for the list of variables. The expi must each be polynomials in the variables and may be equations. If GLOBALSOLVE[FALSE] is set to TRUE then variables which are SOLVEd for will be set to the solution of the set of simultaneous equations. BACKSUBST[TRUE] if set to FALSE will prevent back substitution after the equations have been triangularized. This may be necessary in very big problems where back substitution would cause the generation of extremely large expressions. (On MC this could cause the storage capacity to be exceeded.) LINSOLVE_PARAMS[TRUE] If TRUE, LINSOLVE also generates the %Ri symbols used to represent arbitrary parameters described in the manual under ALGSYS. If FALSE, LINSOLVE behaves as before, i.e. when it meets up with an under-determined system of equations, it solves for some of the variables in terms of others. <PRE> (C1) X+Z=Y$ (C2) 2*A*X-Y=2*A**2$ (C3) Y-2*Z=2$ (C4) LINSOLVE([D1,D2,D3],[X,Y,Z]),GLOBALSOLVE:TRUE; SOLUTION (E4) X : A + 1 (E5) Y : 2 A (E6) Z : A - 1 (D6) [E4, E5, E6] </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>LINSOLVEWARN</B> <DD><A NAME="IDX573"></A> default: [TRUE] - if FALSE will cause the message "Dependent equations eliminated" to be suppressed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LINSOLVE_PARAMS</B> <DD><A NAME="IDX574"></A> default: [TRUE] - If TRUE, LINSOLVE also generates the %Ri symbols used to represent arbitrary parameters described in the manual under ALGSYS. If FALSE, LINSOLVE behaves as before, i.e. when it meets up with an under-determined system of equations, it solves for some of the variables in terms of others. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MULTIPLICITIES</B> <DD><A NAME="IDX575"></A> default: [NOT_SET_YET] - will be set to a list of the multiplicities of the individual solutions returned by SOLVE or REALROOTS. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NROOTS</B> <I>(poly, low, high)</I> <DD><A NAME="IDX576"></A> finds the number of real roots of the real univariate polynomial poly in the half-open interval (low,high]. The endpoints of the interval may also be MINF,INF respectively for minus infinity and plus infinity. The method of Sturm sequences is used. <PRE> (C1) POLY1:X**10-2*X**4+1/2$ (C2) NROOTS(POLY1,-6,9.1); RAT REPLACED 0.5 BY 1/2 = 0.5 (D2) 4 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>NTHROOT</B> <I>(p,n)</I> <DD><A NAME="IDX577"></A> where p is a polynomial with integer coefficients and n is a positive integer returns q, a polynomial over the integers, such that q^n=p or prints an error message indicating that p is not a perfect nth power. This routine is much faster than FACTOR or even SQFR. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>PROGRAMMODE</B> <DD><A NAME="IDX578"></A> default: [TRUE] - when FALSE will cause SOLVE, REALROOTS, ALLROOTS, and LINSOLVE to print E-labels (intermediate line labels) to label answers. When TRUE, SOLVE, etc. return answers as elements in a list. (Except when BACKSUBST is set to FALSE, in which case PROGRAMMODE:FALSE is also used.) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>REALONLY</B> <DD><A NAME="IDX579"></A> default: [FALSE] - if TRUE causes ALGSYS to return only those solutions which are free of %I. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REALROOTS</B> <I>(poly, bound)</I> <DD><A NAME="IDX580"></A> finds all of the real roots of the real univariate polynomial poly within a tolerance of bound which, if less than 1, causes all integral roots to be found exactly. The parameter bound may be arbitrarily small in order to achieve any desired accuracy. The first argument may also be an equation. REALROOTS sets MULTIPLICITIES, useful in case of multiple roots. REALROOTS(poly) is equivalent to REALROOTS(poly,ROOTSEPSILON). ROOTSEPSILON[1.0E-7] is a real number used to establish the confidence interval for the roots. Do EXAMPLE(REALROOTS); for an example. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RHS</B> <I>(eqn)</I> <DD><A NAME="IDX581"></A> the right side of the equation eqn. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ROOTSCONMODE</B> <DD><A NAME="IDX582"></A> default: [TRUE] - Determines the behavior of the ROOTSCONTRACT command. Do DESCRIBE(ROOTSCONTRACT); for details. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ROOTSCONTRACT</B> <I>(exp)</I> <DD><A NAME="IDX583"></A> converts products of roots into roots of products. For example, <PRE> ROOTSCONTRACT(SQRT(X)*Y^(3/2)) ==> SQRT(X*Y^3) </PRE> <P> When RADEXPAND is TRUE and DOMAIN is REAL (their defaults), ROOTSCONTRACT converts ABS into SQRT, e.g. </P> <PRE> ROOTSCONTRACT(ABS(X)*SQRT(Y)) ==> SQRT(X^2*Y) </PRE> <P> There is an option ROOTSCONMODE (default value TRUE), affecting ROOTSCONTRACT as follows: </P> <PRE> Problem Value of Result of applying ROOTSCONMODE ROOTSCONTRACT X^(1/2)*Y^(3/2) FALSE (X*Y^3)^(1/2) X^(1/2)*Y^(1/4) FALSE X^(1/2)*Y^(1/4) X^(1/2)*Y^(1/4) TRUE (X*Y^(1/2))^(1/2) X^(1/2)*Y^(1/3) TRUE X^(1/2)*Y^(1/3) X^(1/2)*Y^(1/4) ALL (X^2*Y)^(1/4) X^(1/2)*Y^(1/3) ALL (X^3*Y^2)^(1/6) </PRE> <P> The above examples and more may be tried out by typing </P> <PRE> EXAMPLE(ROOTSCONTRACT); </PRE> <P> When ROOTSCONMODE is FALSE, ROOTSCONTRACT contracts only wrt rational number exponents whose denominators are the same. The key to the ROOTSCONMODE:TRUE$ examples is simply that 2 divides into 4 but not into 3. ROOTSCONMODE:ALL$ involves taking the lcm (least common multiple) of the denominators of the exponents. ROOTSCONTRACT uses RATSIMP in a manner similar to LOGCONTRACT (see the manual). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ROOTSEPSILON</B> <DD><A NAME="IDX584"></A> default: [1.0E-7] - a real number used to establish the confidence interval for the roots found by the REALROOTS function. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SOLVE</B> <I>(exp, var)</I> <DD><A NAME="IDX585"></A> solves the algebraic equation exp for the variable var and returns a list of solution equations in var. If exp is not an equation, it is assumed to be an expression to be set equal to zero. Var may be a function (e.g. F(X)), or other non-atomic expression except a sum or product. It may be omitted if exp contains only one variable. Exp may be a rational expression, and may contain trigonometric functions, exponentials, etc. The following method is used: Let E be the expression and X be the variable. If E is linear in X then it is trivially solved for X. Otherwise if E is of the form A*X**N+B then the result is (-B/A)**(1/N) times the Nth roots of unity. If E is not linear in X then the gcd of the exponents of X in E (say N) is divided into the exponents and the multiplicity of the roots is multiplied by N. Then SOLVE is called again on the result. If E factors then SOLVE is called on each of the factors. Finally SOLVE will use the quadratic, cubic, or quartic formulas where necessary. In the case where E is a polynomial in some function of the variable to be solved for, say F(X), then it is first solved for F(X) (call the result C), then the equation F(X)=C can be solved for X provided the inverse of the function F is known. BREAKUP[TRUE] if FALSE will cause SOLVE to express the solutions of cubic or quartic equations as single expressions rather than as made up of several common subexpressions which is the default. MULTIPLICITIES[NOT_SET_YET] - will be set to a list of the multiplicities of the individual solutions returned by SOLVE, REALROOTS, or ALLROOTS. Try APROPOS(SOLVE) for the switches which affect SOLVE. DESCRIBE may then by used on the individual switch names if their purpose is not clear. SOLVE([eq1, ..., eqn], [v1, ..., vn]) solves a system of simultaneous (linear or non-linear) polynomial equations by calling LINSOLVE or ALGSYS and returns a list of the solution lists in the variables. In the case of LINSOLVE this list would contain a single list of solutions. It takes two lists as arguments. The first list (eqi, i=1,...,n) represents the equations to be solved; the second list is a list of the unknowns to be determined. If the total number of variables in the equations is equal to the number of equations, the second argument-list may be omitted. For linear systems if the given equations are not compatible, the message INCONSISTENT will be displayed (see the SOLVE_INCONSISTENT_ERROR switch); if no unique solution exists, then SINGULAR will be displayed. For examples, do EXAMPLE(SOLVE); </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVEDECOMPOSES</B> <DD><A NAME="IDX586"></A> default: [TRUE] - if TRUE, will induce SOLVE to use POLYDECOMP (see POLYDECOMP) in attempting to solve polynomials. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVEEXPLICIT</B> <DD><A NAME="IDX587"></A> default: [FALSE] - if TRUE, inhibits SOLVE from returning implicit solutions i.e. of the form F(x)=0. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVEFACTORS</B> <DD><A NAME="IDX588"></A> default: [TRUE] - if FALSE then SOLVE will not try to factor the expression. The FALSE setting may be desired in some cases where factoring is not necessary. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVENULLWARN</B> <DD><A NAME="IDX589"></A> default: [TRUE] - if TRUE the user will be warned if he calls SOLVE with either a null equation list or a null variable list. For example, SOLVE([],[]); would print two warning messages and return []. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVERADCAN</B> <DD><A NAME="IDX590"></A> default: [FALSE] - if TRUE then SOLVE will use RADCAN which will make SOLVE slower but will allow certain problems containing exponentials and logs to be solved. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVETRIGWARN</B> <DD><A NAME="IDX591"></A> default: [TRUE] - if set to FALSE will inhibit printing by SOLVE of the warning message saying that it is using inverse trigonometric functions to solve the equation, and thereby losing solutions. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SOLVE_INCONSISTENT_ERROR</B> <DD><A NAME="IDX592"></A> default: [TRUE] - If TRUE, SOLVE and LINSOLVE give an error if they meet up with a set of inconsistent linear equations, e.g. SOLVE([A+B=1,A+B=2]). If FALSE, they return [] in this case. (This is the new mode, previously gotten only by calling ALGSYS.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ZRPOLY</B> <DD><A NAME="IDX593"></A> - This is no longer available in Maxima. See ALLROOTS for a function to compute the roots of a polynomial. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ZSOLVE</B> <DD><A NAME="IDX594"></A> This is not available with Maxima anymore. Documentation is left for historical purposes. </P> <P> - For those who can make use of approximate numerical solutions to problems, there is a package which calls a routine which has been translated from the IMSL fortran library to solve N simultaneous non-linear equations in N unknowns. It uses black-box techniques that probably aren't desirable if an exact solution can be obtained from one of the smarter solvers (LINSOLVE, ALGSYS, etc). But for things that the other solvers don't attempt to handle, this can probably give some very useful results. For documentation, do PRINTFILE("zsolve.usg");. For a demo do batch("zsolve.mc")$ </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_20.html">previous</A>, <A HREF="maxima_22.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_22.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Differential Equations</TITLE> <link href="maxima_23.html" rel=Next> <link href="maxima_21.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_21.html">previous</A>, <A HREF="maxima_23.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC69" HREF="maxima_toc.html#TOC69">Differential Equations</A></H1> <H2><A NAME="SEC70" HREF="maxima_toc.html#TOC70">Definitions for Differential Equations</A></H2> <P> <DL> <DT><U>Function:</U> <B>DESOLVE</B> <I>([eq1,...,eqn],[var1,...,varn])</I> <DD><A NAME="IDX595"></A> where the eq's are differential equations in the dependent variables var1,...,varn. The functional relationships must be explicitly indicated in both the equations and the variables. For example <PRE> (C1) 'DIFF(F,X,2)=SIN(X)+'DIFF(G,X); (C2) 'DIFF(F,X)+X^2-F=2*'DIFF(G,X,2); is NOT the proper format. The correct way is: (C3) 'DIFF(F(X),X,2)=SIN(X)+'DIFF(G(X),X); (C4) 'DIFF(F(X),X)+X^2-F(X)=2*'DIFF(G(X),X,2); The call is then DESOLVE([D3,D4],[F(X),G(X)]); If initial conditions at 0 are known, they should be supplied before calling DESOLVE by using ATVALUE. (C11) 'DIFF(F(X),X)='DIFF(G(X),X)+SIN(X); d d (D11) -- F(X) = -- G(X) + SIN(X) dX dX (C12) 'DIFF(G(X),X,2)='DIFF(F(X),X)-COS(X); 2 d d (D12) -- G(X) = -- F(X) - COS(X) 2 dX dX (C13) ATVALUE('DIFF(G(X),X),X=0,A); (D13) A (C14) ATVALUE(F(X),X=0,1); (D14) 1 (C15) DESOLVE([D11,D12],[F(X),G(X)]); X X (D16) [F(X)=A %E - A+1, G(X) = COS(X) + A %E - A + G(0) - 1] /* VERIFICATION */ (C17) [D11,D12],D16,DIFF; X X X X (D17) [A %E = A %E , A %E - COS(X) = A %E - COS(X)] </PRE> <P> If DESOLVE cannot obtain a solution, it returns "FALSE". </P> </DL> <P> <DL> <DT><U>Function:</U> <B>IC1</B> <I>(exp,var,var)</I> <DD><A NAME="IDX596"></A> In order to solve initial value problems (IVPs) and boundary value problems (BVPs), the routine IC1 is available in the ODE2 package for first order equations, and IC2 and BC2 for second order IVPs and BVPs, respectively. Do LOAD(ODE2) to access these. They are used as in the following examples: <PRE> (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 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>ODE</B> <I>(equation,y,x)</I> <DD><A NAME="IDX597"></A> This no longer exists in Maxima. The documentation is left here for historical purposes. </P> <P> a pot-pourri of Ordinary Differential solvers combined in such a way as to attempt more and more difficult methods as each fails. For example, the first attempt is with ODE2, so therefore, a user using ODE can assume he has all the capabilities of ODE2 at the very beginning and if he has been using ODE2 in programs they will still run if he substitutes ODE (the returned values, and calling sequence are identical). In addition, ODE has a number of user features which can assist an experienced ODE solver if the basic system cannot handle the equation. The equation is of the same form as required for ODE2 (which see) and the y and x are dependent and independent variables, as with ODE2. For more details, do PRINTFILE(ODE,USAGE,SHARE); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ODE2</B> <I>(exp,dvar,ivar)</I> <DD><A NAME="IDX598"></A> 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 non-constant 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. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_21.html">previous</A>, <A HREF="maxima_23.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_23.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Numerical</TITLE> <link href="maxima_24.html" rel=Next> <link href="maxima_22.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_22.html">previous</A>, <A HREF="maxima_24.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC71" HREF="maxima_toc.html#TOC71">Numerical</A></H1> <H2><A NAME="SEC72" HREF="maxima_toc.html#TOC72">Introduction to Numerical</A></H2> <H2><A NAME="SEC73" HREF="maxima_toc.html#TOC73">DCADRE</A></H2> <P> The following is obsolete and does not exist in Maxima 5.9. We leave the documentation here for historical purposes. </P> <P> To make an interface to fortran libraries in the current MAXIMA look at the examples in "maxima/src/fortdef.lsp" - The IMSL version of Romberg integration is now available in Macsyma. For documentation, Do PRINTFILE(DCADRE,USAGE,IMSL1); . For a demo, do batch("dcadre.mc"); This is a numerical integration package using cautious, adaptive Romberg extrapolation. The DCADRE package is written to call the IMSL fortran library routine DCADRE. This is documentation for that program. Send bugs/comments to KMP To load this package, do <PRE> LOADFILE("imsl")$ </PRE> <P> For a demo of this package, do <PRE> batch("dcadre.mc"); </PRE> <P> The worker function takes the following syntax: IMSL_ROMBERG(fn,low,hi) where fn is a function of 1 argument; low and hi should be the lower and upper bounds of integration. fn must return floating point values. IMSL_ROMBERG(exp,var,low,hi) where exp should be integrated over the range var=low to hi. The result of evaluating exp must always be a floating point number. FAST_IMSL_ROMBERG(fn,low,hi) This function does no error checking but may achieve a speed gain over the IMSL_ROMBERG function. It expects that fn is a Lisp function (or translated Macsyma function) which accepts a floating point argument and that it always returns a floating point value. Returns either [SUCCESS, answer, error] where answer is the result of the integration and error is the estimated bound on the absolute error of the output, DCADRE, as described in PURPOSE below. or [WARNING, n, answer, error] where n is a warning code, answer is the answer, and error is the estimated bound on the absolute error of the output, DCADRE, as described in PURPOSE below. The following warnings may occur: 65 = One or more singularities were successfully handled. 66 = In some subinterval(s), the estimate of the integral was accepted merely because the estimated error was small, even though no regular behavior was recognized. or [ERROR, errorcode] where error code is the IMSL-generated error code. The following error codes may occur: 131 = Failure due to insufficient internal working storage. 132 = Failure. This may be due to too much noise in function (relative to the given error requirements) or due to an ill-behaved integrand. 133 = RERR is greater than 0.1 or less than 0.0 or is too small for the precision of the machine. The following flags have an influence upon the operation of IMSL_ROMBERG -- </P> <P> ROMBERG_AERR [Default 1.0E-5] -- Desired absolute error in answer. </P> <P> ROMBERG_RERR [Default 0.0] -- Desired relative error in the answer. </P> <P> Note: If IMSL signals an error, a message will be printed on the user's console stating the nature of the error. (This error message may be supressed by setting IMSLVERBOSE to FALSE.) </P> <P> Note: Because this uses a translated Fortran routine, it may not be recursively invoked. It does not call itself, but the user should be aware that he may not type ^A in the middle of an IMSL_ROMBERG computation, begin another calculation using the same package, and expect to win -- IMSL_ROMBERG will complain if it was already doing one project when you invoke it. This should cause minimal problems. </P> <P> Purpose (modified version of the IMSL documentation) ---------------------------------------------------- </P> <P> DCADRE attempts to solve the following problem: Given a real-valued function F of one argument, two real numbers A and B, find a number </P> <P> DCADRE such that: </P> <PRE> | / B | [ | / B | ] | [ | [ | [ | ] | I F(x)dx - DCADRE | <= max [ ROMBERG_AERR, ROMBERG_RERR * | I F(x)dx | ] | ] | [ | ] | ] | / A | [ | / A | ] </PRE> <P> Algorithm (modified version of the IMSL documentation) </P> <P> This routine uses a scheme whereby DCADRE is computed as the sum of estimates for the integral of F(x) over suitably chosen subintervals of the given interval of integration. Starting with the interval of integration itself as the first such subinterval, cautious Romberg extrapolation is used to find an acceptable estimate on a given subinterval. If this attempt fails, the subinterval is divided into two subintervals of equal length, each of which is considered separately. Programming Notes (modified version of the IMSL documentation) </P> <UL> <LI> 1. DCADRE (the translated-Fortran base for IMSL_ROMBERG) can, in many cases, handle jump discontinuities and certain algebraic discontinuities. See reference for full details. <LI> 2. The relative error parameter ROMBERG_RERR must be in the interval [0.0,0.1]. For example, ROMBERG_RERR=0.1 indicates that the estimate of the intergral is to be correct to one digit, where as ROMBERG_RERR=1.0E-4 calls for four digits of accuracy. If DCADRE determines that the relative accuracy requirement cannot be satisfied, IER is set to 133 (ROMBERG_RERR should be large enough that, when added to 100.0, the result is a number greater than 100.0 (this will not be true of very tiny floating point numbers due to the nature of machine arithmetic)). <LI> 3. The absolute error parameter, ROMBERG_AERR, should be nonnegative. In order to give a reasonable value for ROMBERG_AERR, the user must know the approximate magnitude of the integral being computed. In many cases, it is satisfactory to use AERR=0.0. In this case, only the relative error requirement is satisfied in the compuatation. <LI> 4. We quote from the reference, "A very cautious man would accept DCADRE only if IER [the warning or error code] is 0 or 65. The merely reasonable man would keep the faith even if IER is 66. The adventurous man is quite often right in accepting DCADRE even if the IER is 131 or 132." Even when IER is not 0, DCADRE returns the best estimate that has been computed. </UL> <P> For references on this technique, see de Boor, Calr, "CADRE: An Algorithm for Numerical Quadrature," Mathematical Software (John R. Rice, Ed.), New York, Academic Press, 1971, Chapter 7. </P> <H2><A NAME="SEC74" HREF="maxima_toc.html#TOC74">ELLIPT</A></H2> <P> - A package on the SHARE directory for Numerical routines for Elliptic Functions and Complete Elliptic Integrals. (Notation of Abramowitz and Stegun, Chs 16 and 17) Do LOAD(ELLIPT); to use this package. At present all arguments MUST be floating point. You'll get nonsense otherwise. Be warned. The functions available are: Jacobian elliptic functions </P> <PRE> AM(U,M) - amplitude with modulus M AM1(U,M1) - amplitude with complementary modulus M1 AM(U,M):=AM1(U,1-M); so use AM1 if M ~ 1 SN(U,M):=SIN(AM(U,M)); CN(U,M):=COS(AM(U,M)); DN(U,M):=SQRT(1-M*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(1-M); so use if M ~ 1 ELLIPTE(M) - Complete elliptic integral of second kind ELLIPTE1(M1) - Same but with complementary modulus. ELLIPTE(M):=ELLIPTE1(1-M); so use if M ~ 1 </PRE> <H2><A NAME="SEC75" HREF="maxima_toc.html#TOC75">FOURIER</A></H2> <P> - There is a Fast Fourier Transform package, do DESCRIBE(FFT) for details. There is also a Fourier Series package. It may be loaded with LOAD(FOURIE). It will also calculate Fourier integral coefficients and has various other functions to do such things as replace all occurrences of F(ARG) by ARG in expression (like changing ABS(a*x+b) to a*x+b). Do PRINTFILE(FOURIE,USAGE,DSK,SHARE1); for a list of the functions included. </P> <H2><A NAME="SEC76" HREF="maxima_toc.html#TOC76">NDIFFQ</A></H2> <P> a package residing on the SHARE directory for numerical solutions of differential equations. LOAD("NDIFFQ"); will load it in for use. An example of its use would be: </P> <PRE> Define_Variable(N,0.3,FLOAT); Define_Variable(H,0.175,FLOAT); F(X,E):=(Mode_Declare([X,E],FLOAT),N*EXP(X)/(E+X^(2*H)*EXP(H*X))); Compile(F); Array([X,E],FLOAT,35); Init_Float_Array(X,1.0E-3,6.85); /* Fills X with the interval */ E[0]:5.0; /* Initial condition */ Runge_Kutta(F,X,E); /* Solve it */ Graph2(X,E); /* Graph the solution */ </PRE> <P> p.s. Runge_Kutta(F,X,E,E_Prime) would be the call for a second-order equation. </P> <H2><A NAME="SEC77" HREF="maxima_toc.html#TOC77">Definitions for Numerical</A></H2> <P> <DL> <DT><U>Function:</U> <B>FFT</B> <I>(real-array, imag-array)</I> <DD><A NAME="IDX599"></A> Fast Fourier Transform. This package may be loaded by doing LOAD(FFT); There is also an IFT command, for Inverse Fourier Transform. These functions perform a (complex) fast fourier transform on either 1 or 2 dimensional FLOATING-POINT arrays, obtained by: <PRE> ARRAY(<ary>,FLOAT,<dim1>); or ARRAY(<ary>,FLOAT,<dim1>,<dim2>); </PRE> <P> For 1D arrays <PRE> <dim1> = 2^n-1 </PRE> <P> and for 2D arrays <PRE> <dim1>=<dim2>=2^n-1 </PRE> <P> (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.) This package also contains two other functions, POLARTORECT and RECTTOPOLAR. Do DESCRIBE(cmd) for details. For details on the implementation, do PRINTFILE(FFT,USAGE,SHARE); . </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FORTINDENT</B> <DD><A NAME="IDX600"></A> default: [0] - controls the left margin indentation of expressions printed out by the FORTRAN command. 0 gives normal printout (i.e. 6 spaces), and positive values will causes the expressions to be printed farther to the right. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FORTMX</B> <I>(name,matrix)</I> <DD><A NAME="IDX601"></A> converts a MACSYMA matrix into a sequence of FORTRAN assignment statements of the form name(i,j)=<corresponding matrix element>. This command is now obsolete. FORTMX(name,matrix); may now be done as FORTRAN(name=matrix);. (If "name" is bound, FORTRAN('name=matrix); may be necessary.) Please convert code that uses the FORTMX command as it may be flushed some day. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FORTRAN</B> <I>(exp)</I> <DD><A NAME="IDX602"></A> converts exp into a FORTRAN linear expression in legal FORTRAN with 6 spaces inserted at the beginning of each line, continuation lines, and ** rather than ^ for exponentiation. When the option FORTSPACES[FALSE] is TRUE, the FORTRAN command fills out to 80 columns using spaces. If FORTRAN is called on a bound symbolic atom, e.g. FORTRAN(X); where X:A*B$ has been done, then X={value of X}, e.g. X=A*B will be generated. In particular, if e.g. M:MATRIX(...); has been done, then FORTRAN(M); will generate the appropriate assignment statements of the form name(i,j)=<corresponding matrix element>. FORTINDENT[0] controls the left margin of expressions printed out, 0 is the normal margin (i.e. indented 6 spaces), increasing it will cause the expression to be printed further to the right. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FORTSPACES</B> <DD><A NAME="IDX603"></A> default: [FALSE] - if TRUE, the FORTRAN command fills out to 80 columns using spaces. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>HORNER</B> <I>(exp, var)</I> <DD><A NAME="IDX604"></A> will convert exp into a rearranged representation as in Horner's rule, using var as the main variable if it is specified. Var may also be omitted in which case the main variable of the CRE form of exp is used. HORNER sometimes improves stability if expr is to be numerically evaluated. It is also useful if MACSYMA is used to generate programs to be run in FORTRAN (see DESCRIBE(STRINGOUT);) <PRE> (C1) 1.0E-20*X^2-5.5*X+5.2E20; 2 (D1) 1.0E-20 X - 5.5 X + 5.2E+20 (C2) HORNER(%,X),KEEPFLOAT:TRUE; (D2) X (1.0E-20 X - 5.5) + 5.2E+20 (C3) D1,X=1.0E20; ARITHMETIC OVERFLOW (C4) D2,X=1.0E20; (D4) 6.9999999E+19 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>IFT</B> <I>(real-array, imag-array)</I> <DD><A NAME="IDX605"></A> Inverse Fourier Transform. Do LOAD(FFT); to load in this package. These functions (FFT and IFT) perform a (complex) fast fourier transform on either 1 or 2 dimensional FLOATING-POINT arrays, obtained by: ARRAY(<ary>,FLOAT,<dim1>); or ARRAY(<ary>,FLOAT,<dim1>,<dim2>); For 1D arrays <dim1> must equal 2^n-1, and for 2D arrays <dim1>=<dim2>=2^n-1 (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.) For details on the implementation, do PRINTFILE(FFT,USAGE,SHARE); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INTERPOLATE</B> <I>(func,x,a,b)</I> <DD><A NAME="IDX606"></A> finds the zero of func as x varies. The last two args give the range to look in. The function must have a different sign at each endpoint. If this condition is not met, the action of the of the function is governed by INTPOLERROR[TRUE]). If INTPOLERROR is TRUE then an error occurs, otherwise the value of INTPOLERROR is returned (thus for plotting INTPOLERROR might be set to 0.0). Otherwise (given that MACSYMA can evaluate the first argument in the specified range, and that it is continuous) INTERPOLATE is guaranteed to come up with the zero (or one of them if there is more than one zero). The accuracy of INTERPOLATE is governed by INTPOLABS[0.0] and INTPOLREL[0.0] which must be non-negative floating point numbers. INTERPOLATE will stop when the first arg evaluates to something less than or equal to INTPOLABS or if successive approximants to the root differ by no more than INTPOLREL * <one of the approximants>. The default values of INTPOLABS and INTPOLREL are 0.0 so INTERPOLATE gets as good an answer as is possible with the single precision arithmetic we have. The first arg may be an equation. The order of the last two args is irrelevant. Thus </P> <PRE> INTERPOLATE(SIN(X)=X/2,X,%PI,.1); is equivalent to INTERPOLATE(SIN(X)=X/2,X,.1,%PI); </PRE> <P> The method used is a binary search in the range specified by the last two args. When it thinks the function is close enough to being linear, it starts using linear interpolation. An alternative syntax has been added to interpolate, this replaces the first two arguments by a function name. The function MUST be TRANSLATEd or compiled function of one argument. No checking of the result is done, so make sure the function returns a floating point number. </P> <PRE> F(X):=(MODE_DECLARE(X,FLOAT),SIN(X)-X/2.0); INTERPOLATE(SIN(X)-X/2,X,0.1,%PI) time= 60 msec INTERPOLATE(F(X),X,0.1,%PI); time= 68 msec TRANSLATE(F); INTERPOLATE(F(X),X,0.1,%PI); time= 26 msec INTERPOLATE(F,0.1,%PI); time= 5 msec </PRE> <P> There is also a Newton method interpolation routine, do DESCRIBE(NEWTON); . </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INTPOLABS</B> <DD><A NAME="IDX607"></A> default: [0.0] - The accuracy of the INTERPOLATE command is governed by INTPOLABS[0.0] and INTPOLREL[0.0] which must be non-negative floating point numbers. INTERPOLATE will stop when the first arg evaluates to something less than or equal to INTPOLABS or if successive approximants to the root differ by no more than INTPOLREL * <one of the approximants>. The default values of INTPOLABS and INTPOLREL are 0.0 so INTERPOLATE gets as good an answer as is possible with the single precision arithmetic we have. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INTPOLERROR</B> <DD><A NAME="IDX608"></A> default: [TRUE] - Governs the behavior of INTERPOLATE. When INTERPOLATE is called, it determines whether or not the function to be interpolated satisfies the condition that the values of the function at the endpoints of the interpolation interval are opposite in sign. If they are of opposite sign, the interpolation proceeds. If they are of like sign, and INTPOLERROR is TRUE, then an error is signaled. If they are of like sign and INTPOLERROR is not TRUE, the value of INTPOLERROR is returned. Thus for plotting, INTPOLERROR might be set to 0.0. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INTPOLREL</B> <DD><A NAME="IDX609"></A> default: [0.0] - The accuracy of the INTERPOLATE command is governed by INTPOLABS[0.0] and INTPOLREL[0.0] which must be non-negative floating point numbers. INTERPOLATE will stop when the first arg evaluates to something less than or equal to INTPOLABS or if successive approximants to the root differ by no more than INTPOLREL * <one of the approximants>. The default values of INTPOLABS and INTPOLREL are 0.0 so INTERPOLATE gets as good an answer as is possible with the single precision arithmetic we have. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NEWTON</B> <I>(exp,var,X0,eps)</I> <DD><A NAME="IDX610"></A> The file NEWTON 1 on the SHARE directory contains a function which will do interpolation using Newton's method. It may be accessed by LOAD(NEWTON); . The Newton method can do things that INTERPOLATE will refuse to handle, since INTERPOLATE requires that everything evaluate to a flonum. Thus NEWTON(x^2-a^2,x,a/2,a^2/100); will say that it can't tell if flonum*a^2<a^2/100. Doing ASSUME(a>0); and then doing NEWTON again works. You get x=a+<small flonum>*a which is symbolic all the way. INTERPOLATE(x^2-a^2,x,a/2,2*a); complains that .5*a is not flonum... An adaptive integrator which uses the Newton-Cotes 8 panel quadrature rule is available in SHARE1;QQ FASL. Do DESCRIBE(QQ) for details. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POLARTORECT</B> <I>(magnitude-array, phase-array)</I> <DD><A NAME="IDX611"></A> converts from magnitude and phase form into real and imaginary form putting the real part in the magnitude array and the imaginary part into the phase array </P> <PRE> <real>=<magnitude>*COS(<phase>) ==> <imaginary>=<magnitude>*SIN(<phase> </PRE> <P> This function is part of the FFT package. Do LOAD(FFT); to use it. Like FFT and IFT this function accepts 1 or 2 dimensional arrays. However, the array dimensions need not be a power of 2, nor need the 2D arrays be square. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RECTTOPOLAR</B> <I>(real-array, imag-array)</I> <DD><A NAME="IDX612"></A> undoes POLARTORECT. The phase is given in the range from -%PI to %PI. This function is part of the FFT package. Do LOAD(FFT); to use it. Like FFT and IFT this function accepts 1 or 2 dimensional arrays. However, the array dimensions need not be a power of 2, nor need the 2D arrays be square. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_22.html">previous</A>, <A HREF="maxima_24.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_24.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Statistics</TITLE> <link href="maxima_25.html" rel=Next> <link href="maxima_23.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_23.html">previous</A>, <A HREF="maxima_25.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC78" HREF="maxima_toc.html#TOC78">Statistics</A></H1> <H2><A NAME="SEC79" HREF="maxima_toc.html#TOC79">Definitions for Statistics</A></H2> <P> <DL> <DT><U>Function:</U> <B>GAUSS</B> <I>(mean,sd)</I> <DD><A NAME="IDX613"></A> returns a random floating point number from a normal distribution with mean MEAN and standard deviation SD. This is part of the BESSEL function package, do LOAD(BESSEL); to use it. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_23.html">previous</A>, <A HREF="maxima_25.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_25.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Arrays and Tables</TITLE> <link href="maxima_26.html" rel=Next> <link href="maxima_24.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_24.html">previous</A>, <A HREF="maxima_26.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC80" HREF="maxima_toc.html#TOC80">Arrays and Tables</A></H1> <H2><A NAME="SEC81" HREF="maxima_toc.html#TOC81">Definitions for Arrays and Tables</A></H2> <P> <DL> <DT><U>Function:</U> <B>ARRAY</B> <I>(name, dim1, dim2, ..., dimk)</I> <DD><A NAME="IDX614"></A> <DT><U>Function:</U> <B>ARRAY</B> <I>(name, type, dim1, dim2, ..., dimk)</I> <DD><A NAME="IDX615"></A> This sets up a k-dimensional array. A maximum of five dimensions may be used. In the first form, a general array is created. In the second form, an array meant to have elements of the specified type is created. TYPE can be fixnum for integers of limited size or flonum for floating-point numbers. </P> <P> The subscripts for the ith dimension are the integers running from 0 to dimi. If the user assigns to a subscripted variable before declaring the corresponding array, an undeclared array is set up. If the user has more than one array to be set up the same way, they may all be set up at the same time, by ARRAY([list-of-names],dim1, dim2, ..., dimk). Undeclared arrays, otherwise known as hashed arrays (because hash coding is done on the subscripts), are more general than declared arrays. The user does not declare their maximum size, and they grow dynamically by hashing as more elements are assigned values. The subscripts of undeclared arrays need not even be numbers. However, unless an array is rather sparse, it is probably more efficient to declare it when possible than to leave it undeclared. The ARRAY function can be used to transform an undeclared array into a declared array. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ARRAYAPPLY</B> <I>(array,[sub1, ... ,subk])</I> <DD><A NAME="IDX616"></A> is like APPLY except the first argument is an array. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ARRAYINFO</B> <I>(a)</I> <DD><A NAME="IDX617"></A> returns a list of information about the array a. For hashed arrays it returns a list of "HASHED", the number of subscripts, and the subscripts of every element which has a value. For declared arrays it returns a list of "DECLARED", the number of subscripts, and the bounds that were given the the ARRAY function when it was called on a. Do EXAMPLE(ARRAYINFO); for an example. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ARRAYMAKE</B> <I>(name,[i1,i2,...])</I> <DD><A NAME="IDX618"></A> returns name[i1,i2,...]. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ARRAYS</B> <DD><A NAME="IDX619"></A> default: [] a list of all the arrays that have been allocated, both declared and undeclared. Functions which deal with arrays are: ARRAY, ARRAYAPPLY, ARRAYINFO, ARRAYMAKE, FILLARRAY, LISTARRAY, and REARRAY. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>BASHINDICES</B> <I>(expr)</I> <DD><A NAME="IDX620"></A> - transforms the expression expr by giving each summation and product a unique index. This gives CHANGEVAR greater precision when it is working with summations or products. The form of the unique index is J<number>. The quantity <number> is determined by referring to GENSUMNUM, which can be changed by the user. For example, GENSUMNUM:0$ resets it. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FILLARRAY</B> <I>(array,list-or-array)</I> <DD><A NAME="IDX621"></A> fills array from list-or-array. If array is a floating-point (integer) array then list-or-array should be either a list of floating-point (integer) numbers or another floating-point (integer) array. If the dimensions of the arrays are different array is filled in row-major order. If there are not enough elements in list-or-array the last element is used to fill out the rest of array. If there are too many the remaining ones are thrown away. FILLARRAY returns its first argument. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GETCHAR</B> <I>(a, i)</I> <DD><A NAME="IDX622"></A> returns the ith character of the quoted string or atomic name a. This function is useful in manipulating the LABELS list. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LISTARRAY</B> <I>(array)</I> <DD><A NAME="IDX623"></A> returns a list of the elements of a declared or hashed array. the order is row-major. Elements which you have not defined yet will be represented by #####. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAKE_ARRAY</B> <I>(type,dim1,dim2,...,dimn)</I> <DD><A NAME="IDX624"></A> - creates an array. "type" may be 'ANY, 'FLONUM, 'FIXNUM, 'HASHED or 'FUNCTIONAL. This is similar to the ARRAY command, except that the created array is a functional array object. The advantage of this over ARRAY is that it doesn't have a name, and once a pointer to it goes away, it will also go away. e.g. Y:MAKE_ARRAY(....); Y now points to an object which takes up space, but do Y:FALSE, and Y no longer points to that object, so the object will get garbage collected. Note: the "dimi" here are different from the ARRAY command, since they go from 0 to i-1, i.e. a "dimension" of 10 means you have elements from 0 to 9. Y:MAKE_ARRAY('FUNCTIONAL,'F,'HASHED,1) - The second argument to MAKE_ARRAY in this case is the function to call to calculate array elements, and the rest of the arguments are passed recursively to MAKE_ARRAY to generate the "memory" for the array function object. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REARRAY</B> <I>(array,dim1, ... ,dimk)</I> <DD><A NAME="IDX625"></A> can be used to change the size or dimensions of an array. The new array will be filled with the elements of the old one in row-major order. If the old array was too small, FALSE, 0.0 or 0 will be used to fill the remaining elements, depending on the type of the array. The type of the array cannot be changed. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMARRAY</B> <I>(name1, name2, ...)</I> <DD><A NAME="IDX626"></A> removes arrays and array associated functions and frees the storage occupied. If name is ALL then all arrays are removed. It may be necessary to use this function if it is desired to redefine the values in a hashed array. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>USE_FAST_ARRAYS</B> <DD><A NAME="IDX627"></A> [TRUE on Lispm] - If TRUE then only two types of arrays are recognized. </P> <P> 1) The art-q array (t in common lisp) which may have several dimensions indexed by integers, and may hold any lisp or macsyma object as an entry. To construct such an array, enter A:MAKE_ARRAY(ANY,3,4); then A will have as value, an array with twelve slots, and the indexing is zero based. </P> <P> 2) The Hash_table array which is the default type of array created if one does B[X+1]:Y^2 (and B is not already an array,a list, or a matrix-- if it were one of these an error would be caused since x+1 would not be a valid subscript for an art-q array,a list or a matrix ). Its indices (also known as keys) may be any object. It only takes ONE KEY at a time (B[X+1,U]:Y would ignore the u) Referencing is done by B[X+1]==> Y^2. Of course the key may be a list, eg B[[x+1,u]]:y would be valid. This is in- compatible with the old Macsyma hash arrays, but saves consing. </P> <P> An advantage of storing the arrays as values of the symbol is that the usual conventions about local variables of a function apply to arrays as well. The Hash_table type also uses less consing and is more efficient than the old type of macsyma hashar. To obtain consistent behaviour in translated and compiled code set TRANSLATE_FAST_ARRAYS [TRUE] to be TRUE. </DL> </P> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_24.html">previous</A>, <A HREF="maxima_26.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_26.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Matrices and Linear Algebra</TITLE> <link href="maxima_27.html" rel=Next> <link href="maxima_25.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_25.html">previous</A>, <A HREF="maxima_27.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC82" HREF="maxima_toc.html#TOC82">Matrices and Linear Algebra</A></H1> <H2><A NAME="SEC83" HREF="maxima_toc.html#TOC83">Introduction to Matrices and Linear Algebra</A></H2> <H3><A NAME="SEC84" HREF="maxima_toc.html#TOC84">DOT</A></H3> <P> - . The dot operator, for matrix (non-commutative) multiplication. When "." is used in this way, spaces should be left on both sides of it, e.g. A . B. This distinguishes it plainly from a decimal point in a floating point number. Do APROPOS(DOT); for a list of the switches which affect the dot operator. </P> <H3><A NAME="SEC85" HREF="maxima_toc.html#TOC85">VECTORS</A></H3> <P> - The file SHARE;VECT > contains a vector analysis package, share/vect.dem contains a corresponding demonstration, and SHARE;VECT ORTH contains definitions of various orthogonal curvilinear coordinate systems. LOAD(VECT); will load this package for you. 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. The package contains the following commands: VECTORSIMP, SCALEFACTORS, EXPRESS, POTENTIAL, and VECTORPOTENTIAL. Do DESCRIBE(cmd) on these command names, or PRINTFILE(VECT,USAGE,SHARE); for details. Warning: The VECT package declares "." to be a commutative operator. </P> <H2><A NAME="SEC86" HREF="maxima_toc.html#TOC86">Definitions for Matrices and Linear Algebra</A></H2> <P> <DL> <DT><U>Function:</U> <B>ADDCOL</B> <I>(M,list1,list2,...,listn)</I> <DD><A NAME="IDX628"></A> appends the column(s) given by the one or more lists (or matrices) onto the matrix M. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ADDROW</B> <I>(M,list1,list2,...,listn)</I> <DD><A NAME="IDX629"></A> appends the row(s) given by the one or more lists (or matrices) onto the matrix M. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ADJOINT</B> <I>(matrix)</I> <DD><A NAME="IDX630"></A> computes the adjoint of a matrix. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>AUGCOEFMATRIX</B> <I>([eq1, ...], [var1, ...])</I> <DD><A NAME="IDX631"></A> the augmented coefficient matrix for the variables var1,... of the system of linear equations eq1,.... This is the coefficient matrix with a column adjoined for the constant terms in each equation (i.e. those not dependent upon var1,...). Do EXAMPLE(AUGCOEFMATRIX); for an example. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CHARPOLY</B> <I>(M, var)</I> <DD><A NAME="IDX632"></A> computes the characteristic polynomial for Matrix M with respect to var. That is, DETERMINANT(M - DIAGMATRIX(LENGTH(M),var)). For examples of this command, do EXAMPLE(CHARPOLY); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COEFMATRIX</B> <I>([eq1, ...], [var1, ...])</I> <DD><A NAME="IDX633"></A> the coefficient matrix for the variables var1,... of the system of linear equations eq1,... </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COL</B> <I>(M,i)</I> <DD><A NAME="IDX634"></A> gives a matrix of the ith column of the matrix M. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COLUMNVECTOR</B> <I>(X)</I> <DD><A NAME="IDX635"></A> a function in the EIGEN package. Do LOAD(EIGEN) to use it. COLUMNVECTOR 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.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CONJUGATE</B> <I>(X)</I> <DD><A NAME="IDX636"></A> a function in the EIGEN package on the SHARE directory. It returns the complex conjugate of its argument. This package may be loaded by LOAD(EIGEN); . For a complete description of this package, do PRINTFILE("eigen.usg"); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COPYMATRIX</B> <I>(M)</I> <DD><A NAME="IDX637"></A> creates a copy of the matrix M. This is the only way to make a copy aside from recreating M elementwise. Copying a matrix may be useful when SETELMX is used. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DETERMINANT</B> <I>(M)</I> <DD><A NAME="IDX638"></A> computes the determinant of M by a method similar to Gaussian elimination. The form of the result depends upon the setting of the switch RATMX. There is a special routine for dealing with sparse determininants which can be used by setting the switches RATMX:TRUE and SPARSE:TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DETOUT</B> <DD><A NAME="IDX639"></A> default: [FALSE] if TRUE will cause the determinant of a matrix whose inverse is computed to be kept outside of the inverse. For this switch to have an effect DOALLMXOPS and DOSCMXOPS should be FALSE (see their descriptions). Alternatively this switch can be given to EV which causes the other two to be set correctly. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DIAGMATRIX</B> <I>(n, x)</I> <DD><A NAME="IDX640"></A> returns a diagonal matrix of size n by n with the diagonal elements all x. An identity matrix is created by DIAGMATRIX(n,1), or one may use IDENT(n). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOALLMXOPS</B> <DD><A NAME="IDX641"></A> default: [TRUE] if TRUE all operations relating to matrices are carried out. If it is FALSE then the setting of the individual DOT switches govern which operations are performed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOMXEXPT</B> <DD><A NAME="IDX642"></A> default: [TRUE] if TRUE, <PRE> %E^MATRIX([1,2],[3,4]) ==> MATRIX([%E,%E^2],[%E^3,%E^4]) </PRE> <P> In general, this transformation affects expressions of the form <base>^<power> where <base> is an expression assumed scalar or constant, and <power> is a list or matrix. This transformation is turned off if this switch is set to FALSE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOMXMXOPS</B> <DD><A NAME="IDX643"></A> default: [TRUE] if TRUE then all matrix-matrix or matrix-list operations are carried out (but not scalar-matrix operations); if this switch is FALSE they are not. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOMXNCTIMES</B> <DD><A NAME="IDX644"></A> default: [FALSE] Causes non-commutative products of matrices to be carried out. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DONTFACTOR</B> <DD><A NAME="IDX645"></A> default: [] may be set to a list of variables with respect to which factoring is not to occur. (It is initially empty). Factoring also will not take place with respect to any variables which are less important (using the variable ordering assumed for CRE form) than those on the DONTFACTOR list. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOSCMXOPS</B> <DD><A NAME="IDX646"></A> default: [FALSE] if TRUE then scalar-matrix operations are performed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOSCMXPLUS</B> <DD><A NAME="IDX647"></A> default: [FALSE] if TRUE will cause SCALAR + MATRIX to give a matrix answer. This switch is not subsumed under DOALLMXOPS. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOT0NSCSIMP</B> <DD><A NAME="IDX648"></A> default: [TRUE] Causes a non-commutative product of zero and a nonscalar term to be simplified to a commutative product. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOT0SIMP</B> <DD><A NAME="IDX649"></A> default: [TRUE] Causes a non-commutative product of zero and a scalar term to be simplified to a commutative product. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOT1SIMP</B> <DD><A NAME="IDX650"></A> default: [TRUE] Causes a non-commutative product of one and another term to be simplified to a commutative product. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOTASSOC</B> <DD><A NAME="IDX651"></A> default: [TRUE] when TRUE causes (A.B).C to simplify to A.(B.C) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOTCONSTRULES</B> <DD><A NAME="IDX652"></A> default: [TRUE] Causes a non-commutative product of a constant and another term to be simplified to a commutative product. Turning on this flag effectively turns on DOT0SIMP, DOT0NSCSIMP, and DOT1SIMP as well. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOTDISTRIB</B> <DD><A NAME="IDX653"></A> default: [FALSE] if TRUE will cause A.(B+C) to simplify to A.B+A.C </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOTEXPTSIMP</B> <DD><A NAME="IDX654"></A> default: [TRUE] when TRUE causes A.A to simplify to A^^2 </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOTIDENT</B> <DD><A NAME="IDX655"></A> default: [1] The value to be returned by X^^0. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOTSCRULES</B> <DD><A NAME="IDX656"></A> default: [FALSE] when TRUE will cause A.SC or SC.A to simplify to SC*A and A.(SC*B) to simplify to SC*(A.B) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ECHELON</B> <I>(M)</I> <DD><A NAME="IDX657"></A> produces the echelon form of the matrix M. That is, M with elementary row operations performed on it such that the first non-zero element in each row in the resulting matrix is a one and the column elements under the first one in each row are all zero. <PRE> [2 1 - A -5 B ] (D2) [ ] [A B C ] (C3) ECHELON(D2); [ A - 1 5 B ] [1 - ----- - -- ] [ 2 2 ] (D3) [ ] [ 2 C + 5 A B ] [0 1 ------------] [ 2 ] [ 2 B + A - A] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>EIGENVALUES</B> <I>(mat)</I> <DD><A NAME="IDX658"></A> There is a package on the SHARE; directory which contains functions for computing EIGENVALUES and EIGENVECTORS and related matrix computations. For information on it do PRINTFILE(EIGEN,USAGE,SHARE); . 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 not-so-obviously real expression for an eigenvalue which is supposed to be real...)] The EIGENVALUES command is available directly from MACSYMA. To use the other functions you must have loaded in the EIGEN package, either by a previous call to EIGENVALUES, or by doing LOADFILE("eigen"); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EIGENVECTORS</B> <I>(MAT)</I> <DD><A NAME="IDX659"></A> 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. This function will work directly from MACSYMA, but if you wish to take advantage of the flags for controlling it (see below), you must first load in the EIGEN package from the SHARE; directory. You may do that by LOADFILE("eigen");. 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 Gram-Schmidt 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. ) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EMATRIX</B> <I>(m, n, x, i, j)</I> <DD><A NAME="IDX660"></A> will create an m by n matrix all of whose elements are zero except for the i,j element which is x. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ENTERMATRIX</B> <I>(m, n)</I> <DD><A NAME="IDX661"></A> allows one to enter a matrix element by element with MACSYMA requesting values for each of the m*n entries. <PRE> (C1) ENTERMATRIX(3,3); Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General Answer 1, 2, 3 or 4 1; Row 1 Column 1: A; Row 2 Column 2: B; Row 3 Column 3: C; Matrix entered. [ A 0 0 ] [ ] (D1) [ 0 B 0 ] [ ] [ 0 0 C ] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>GENMATRIX</B> <I>(array, i2, j2, i1, j1)</I> <DD><A NAME="IDX662"></A> generates a matrix from the array using array(i1,j1) for the first (upper-left) element and array(i2,j2) for the last (lower-right) element of the matrix. If j1=i1 then j1 may be omitted. If j1=i1=1 then i1 and j1 may both be omitted. If a selected element of the array doesn't exist a symbolic one will be used. <PRE> (C1) H[I,J]:=1/(I+J-1)$ (C2) GENMATRIX(H,3,3); [ 1 1] [1 - -] [ 2 3] [ ] [1 1 1] (D2) [- - -] [2 3 4] [ ] [1 1 1] [- - -] [3 4 5] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>GRAMSCHMIDT</B> <I>(X)</I> <DD><A NAME="IDX663"></A> a function in the EIGEN package. Do LOAD(EIGEN) to use it. GRAMSCHMIDT 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 Gram-Schmidt algorithm. This prevents the expressions from getting very messy and helps to reduce the sizes of the numbers that are produced along the way.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>HACH</B> <I>(a,b,m,n,l)</I> <DD><A NAME="IDX664"></A> An implementation of Hacijan's linear programming algorithm is available by doing BATCH("kach.mc"$. Details of use are available by doing BATCH("kach.dem"); </P> </DL> <P> <DL> <DT><U>Function:</U> <B>IDENT</B> <I>(n)</I> <DD><A NAME="IDX665"></A> produces an n by n identity matrix. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INNERPRODUCT</B> <I>(X,Y)</I> <DD><A NAME="IDX666"></A> a function in the EIGEN package. Do LOAD(EIGEN) to use it. INNERPRODUCT 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). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INVERT</B> <I>(matrix)</I> <DD><A NAME="IDX667"></A> finds the inverse of a matrix using the adjoint method. This allows a user to compute the inverse of a matrix with bfloat entries or polynomials with floating pt. coefficients without converting to cre-form. The DETERMINANT command is used to compute cofactors, so if RATMX is FALSE (the default) the inverse is computed without changing the representation of the elements. The current implementation is inefficient for matrices of high order. The DETOUT flag if true keeps the determinant factored out of the inverse. Note: the results are not automatically expanded. If the matrix originally had polynomial entries, better appearing output can be generated by EXPAND(INVERT(mat)),DETOUT. If it is desirable to then divide through by the determinant this can be accomplished by XTHRU(%) or alternatively from scratch by EXPAND(ADJOINT(mat))/EXPAND(DETERMINANT(mat)). INVERT(mat):=ADJOINT(mat)/DETERMINANT(mat). See also DESCRIBE("^^"); for another method of inverting a matrix. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LMXCHAR</B> <DD><A NAME="IDX668"></A> default: [[] - The character used to display the (left) delimiter of a matrix (see also RMXCHAR). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MATRIX</B> <I>(row1, ..., rown)</I> <DD><A NAME="IDX669"></A> defines a rectangular matrix with the indicated rows. Each row has the form of a list of expressions, e.g. [A, X**2, Y, 0] is a list of 4 elements. There are a number of MACSYMA commands which deal with matrices, for example: DETERMINANT, CHARPOLY, GENMATRIX, ADDCOL, ADDROW, COPYMATRIX, TRANSPOSE, ECHELON, and RANK. There is also a package on the SHARE directory for computing EIGENVALUES. Try DESCRIBE on these for more information. Matrix multiplication is effected by using the dot operator, ".", which is also convenient if the user wishes to represent other non-commutative algebraic operations. The exponential of the "." operation is "^^" . Thus, for a matrix A, A.A = A^^2 and, if it exists, A^^-1 is the inverse of A. The operations +,-,*,** are all element-by-element operations; all operations are normally carried out in full, including the . (dot) operation. Many switches exist for controlling simplification rules involving dot and matrix-list operations. Options Relating to Matrices: LMXCHAR, RMXCHAR, RATMX, LISTARITH, DETOUT, DOALLMXOPS, DOMXEXPT DOMXMXOPS, DOSCMXOPS, DOSCMXPLUS, SCALARMATRIX, and SPARSE. Do DESCRIBE(option) for details on them. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MATRIXMAP</B> <I>(fn, M)</I> <DD><A NAME="IDX670"></A> will map the function fn onto each element of the matrix M. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MATRIXP</B> <I>(exp)</I> <DD><A NAME="IDX671"></A> is TRUE if exp is a matrix else FALSE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MATRIX_ELEMENT_ADD</B> <DD><A NAME="IDX672"></A> default: [+] - May be set to "?"; may also be the name of a function, or a LAMBDA expression. In this way, a rich variety of algebraic structures may be simulated. For more details, do DEMO("matrix.dem1"); and DEMO("matrix.dem2");. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MATRIX_ELEMENT_MULT</B> <DD><A NAME="IDX673"></A> default: [*] - May be set to "."; may also be the name of a function, or a LAMBDA expression. In this way, a rich variety of algebraic structures may be simulated. For more details, do DEMO("matrix.dem1"); and DEMO("matrix.dem2"); </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MATRIX_ELEMENT_TRANSPOSE</B> <DD><A NAME="IDX674"></A> default: [FALSE] - Other useful settings are TRANSPOSE and NONSCALARS; may also be the name of a function, or a LAMBDA expression. In this way, a rich variety of algebraic structures may be simulated. For more details, do DEMO("matrix.dem1"); and DEMO("matrix.dem2");. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MATTRACE</B> <I>(M)</I> <DD><A NAME="IDX675"></A> computes the trace [sum of the elements on the main diagonal] of the square matrix M. It is used by NCHARPOLY, an alternative to MACSYMA's CHARPOLY. It is used by doing LOADFILE("nchrpl"); </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MINOR</B> <I>(M, i, j)</I> <DD><A NAME="IDX676"></A> computes the i,j minor of the matrix M. That is, M with row i and column j removed. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NCEXPT</B> <I>(A,B)</I> <DD><A NAME="IDX677"></A> if an (non-commutative) exponential expression is too wide to be displayed as A^^B it will appear as NCEXPT(A,B). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NCHARPOLY</B> <I>(M,var)</I> <DD><A NAME="IDX678"></A> finds the characteristic polynomial of the matrix M with respect to var. This is an alternative to MACSYMA's CHARPOLY. NCHARPOLY works by computing traces of powers of the given matrix, which are known to be equal to sums of powers of the roots of the characteristic polynomial. From these quantities the symmetric functions of the roots can be calculated, which are nothing more than the coefficients of the characteristic polynomial. CHARPOLY works by forming the determinant of VAR * IDENT [N] - A. Thus NCHARPOLY wins, for example, in the case of large dense matrices filled with integers, since it avoids polynomial arithmetic altogether. It may be used by doing LOADFILE("nchrpl"); </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NEWDET</B> <I>(M,n)</I> <DD><A NAME="IDX679"></A> also computes the determinant of M but uses the Johnson-Gentleman tree minor algorithm. M may be the name of a matrix or array. The argument n is the order; it is optional if M is a matrix. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>NONSCALAR</B> <DD><A NAME="IDX680"></A> - makes ai behave as does a list or matrix with respect to the dot operator. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NONSCALARP</B> <I>(exp)</I> <DD><A NAME="IDX681"></A> is TRUE if exp is a non-scalar, i.e. it contains atoms declared as non-scalars, lists, or matrices. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PERMANENT</B> <I>(M,n)</I> <DD><A NAME="IDX682"></A> computes the permanent of the matrix M. A permanent is like a determinant but with no sign changes. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RANK</B> <I>(M)</I> <DD><A NAME="IDX683"></A> computes the rank of the matrix M. That is, the order of the largest non-singular subdeterminant of M. Caveat: RANK may return the wrong answer if it cannot determine that a matrix element that is equivalent to zero is indeed so. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RATMX</B> <DD><A NAME="IDX684"></A> default: [FALSE] - if FALSE will cause determinant and matrix addition, subtraction, and multiplication to be performed in the representation of the matrix elements and will cause the result of matrix inversion to be left in general representation. If it is TRUE, the 4 operations mentioned above will be performed in CRE form and the result of matrix inverse will be in CRE form. Note that this may cause the elements to be expanded (depending on the setting of RATFAC) which might not always be desired. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ROW</B> <I>(M, i)</I> <DD><A NAME="IDX685"></A> gives a matrix of the ith row of matrix M. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SCALARMATRIXP</B> <DD><A NAME="IDX686"></A> default: [TRUE] - if TRUE, then whenever a 1 x 1 matrix is produced as a result of computing the dot product of matrices it will be converted to a scalar, namely the only element of the matrix. If set to ALL, then this conversion occurs whenever a 1 x 1 matrix is simplified. If set to FALSE, no conversion will be done. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SETELMX</B> <I>(x, i, j, M)</I> <DD><A NAME="IDX687"></A> changes the i,j element of M to x. The altered matrix is returned as the value. The notation M[i,j]:x may also be used, altering M in a similar manner, but returning x as the value. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SIMILARITYTRANSFORM</B> <I>(MAT)</I> <DD><A NAME="IDX688"></A> a function in the EIGEN package. Do LOAD(EIGEN) to use it. SIMILARITYTRANSFORM 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 (see DESCRIBE(EIGENVALUES); and DESCRIBE(EIGENVECTORS);) have the same effects since SIMILARITYTRANSFORM calls the other functions in the package in order to be able to form RIGHTMATRIX. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SPARSE</B> <DD><A NAME="IDX689"></A> default: [FALSE] - if TRUE and if RATMX:TRUE then DETERMINANT will use special routines for computing sparse determinants. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBMATRIX</B> <I>(m1, ..., M, n1, ...)</I> <DD><A NAME="IDX690"></A> creates a new matrix composed of the matrix M with rows mi deleted, and columns ni deleted. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRANSPOSE</B> <I>(M)</I> <DD><A NAME="IDX691"></A> produces the transpose of the matrix M. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRIANGULARIZE</B> <I>(M)</I> <DD><A NAME="IDX692"></A> produces the upper triangular form of the matrix M which needn't be square. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNITEIGENVECTORS</B> <I>(MAT)</I> <DD><A NAME="IDX693"></A> a function in the EIGEN package. Do LOAD(EIGEN) to use it. UNITEIGENVECTORS 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 a 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...) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNITVECTOR</B> <I>(X)</I> <DD><A NAME="IDX694"></A> a function in the EIGEN package. Do LOAD(EIGEN) to use it. UNITVECTOR takes a LIST as its argument and returns a unit list. (i.e. a list with unit magnitude). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>VECTORSIMP</B> <I>(vectorexpression)</I> <DD><A NAME="IDX695"></A> This function employs additional simplifications, together with various optional expansions according to the settings of the following global flags: </P> <PRE> EXPANDALL, EXPANDDOT, EXPANDDOTPLUS, EXPANDCROSS, EXPANDCROSSPLUS, EXPANDCROSSCROSS, EXPANDGRAD, EXPANDGRADPLUS, EXPANDGRADPROD, EXPANDDIV, EXPANDDIVPLUS, EXPANDDIVPROD, EXPANDCURL, EXPANDCURLPLUS, EXPANDCURLCURL, EXPANDLAPLACIAN, EXPANDLAPLACIANPLUS, EXPANDLAPLACIANPROD. </PRE> <P> All these flags have default value FALSE. 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[[X,Y,Z]], DIMENSION[3], SF[[1,1,1]], and SFPROD[1] are set by the function invocation </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>VECT_CROSS</B> <DD><A NAME="IDX696"></A> default:[FALSE] - If TRUE allows DIFF(X~Y,T) to work where ~ is defined in SHARE;VECT (where VECT_CROSS is set to TRUE, anyway.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ZEROMATRIX</B> <I>(m,n)</I> <DD><A NAME="IDX697"></A> takes integers m,n as arguments and returns an m by n matrix of 0's. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>"["</B> <DD><A NAME="IDX698"></A> - [ and ] are the characters which MACSYMA uses to delimit a list. </DL> </P> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_25.html">previous</A>, <A HREF="maxima_27.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_27.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Affine</TITLE> <link href="maxima_28.html" rel=Next> <link href="maxima_26.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_26.html">previous</A>, <A HREF="maxima_28.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC87" HREF="maxima_toc.html#TOC87">Affine</A></H1> <H2><A NAME="SEC88" HREF="maxima_toc.html#TOC88">Definitions for Affine</A></H2> <P> <DL> <DT><U>Function:</U> <B>FAST_LINSOLVE</B> <I>(eqns,variables)</I> <DD><A NAME="IDX699"></A> Solves the linear system of equations EQNS for the variables VARIABLES and returns a result suitable to SUBLIS. The function is faster than linsolve for system of equations which are sparse. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GROBNER_BASIS</B> <I>(eqns)</I> <DD><A NAME="IDX700"></A> Takes as argument a macsyma list of equations and returns a grobner basis for them. The function POLYSIMP may now be used to simplify other functions relative to the equations. </P> <P> GROBNER_BASIS([3*X^2+1,Y*X])$ </P> <P> POLYSIMP(Y^2*X+X^3*9+2)==> -3*x+2 </P> <P> Polysimp(f)==> 0 if and only if f is in the ideal generated by the EQNS ie. if and only if f is a polynomial combination of the elements of EQNS. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SET_UP_DOT_SIMPLIFICATIONS</B> <I>(eqns,[check-thru-degree])</I> <DD><A NAME="IDX701"></A> The eqns are polynomial equations in non commutative variables. The value of CURRENT_VARIABLES is the list of variables used for computing degrees. The equations must be homogeneous, in order for the procedure to terminate. </P> <P> If you have checked overlapping simplifications in DOT_SIMPLIFICATIONS above the degree of f, then the following is true: DOTSIMP(f)==> 0 if and only if f is in the ideal generated by the EQNS ie. if and only if f is a polynomial combination of the elements of EQNS. </P> <P> The degree is that returned by NC_DEGREE. This in turn is influenced by the weights of individual variables. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DECLARE_WEIGHT</B> <I>(var1,wt1,var2,wt2,...)</I> <DD><A NAME="IDX702"></A> Assigns VAR1 weight WT1, VAR2 weight wt2.. These are the weights used in computing NC_DEGREE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NC_DEGREE</B> <I>(poly)</I> <DD><A NAME="IDX703"></A> Degree of a non commutative polynomial. See DECLARE_WEIGHTS. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DOTSIMP</B> <I>(f)</I> <DD><A NAME="IDX704"></A> ==> 0 if and only if f is in the ideal generated by the EQNS ie. if and only if f is a polynomial combination of the elements of EQNS. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FAST_CENTRAL_ELEMENTS</B> <I>(variables,degree)</I> <DD><A NAME="IDX705"></A> if SET_UP_DOT_SIMPLIFICATIONS has been previously done, finds the central polynomials in the variables in the given degree, For example: <PRE> set_up_dot_simplifications([y.x+x.y],3); fast_central_elements([x,y],2); [y.y,x.x]; </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>CHECK_OVERLAPS</B> <I>(degree,add-to-simps)</I> <DD><A NAME="IDX706"></A> checks the overlaps thru degree, making sure that you have sufficient simplification rules in each degree, for dotsimp to work correctly. This process can be speeded up if you know before hand what the dimension of the space of monomials is. If it is of finite global dimension, then HILBERT should be used. If you don't know the monomial dimensions, do not specify a RANK_FUNCTIION. An optional third argument RESET, false says don't bother to query about resetting things. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MONO</B> <I>(vari,n)</I> <DD><A NAME="IDX707"></A> VARI is a list of variables. Returns the list of independent monomials relative to the current dot_simplifications, in degree N </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MONOMIAL_DIMENSIONS</B> <I>(n)</I> <DD><A NAME="IDX708"></A> </P> <P> Compute the hilbert series through degreen n for the current algebra. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EXTRACT_LINEAR_EQUATIONS</B> <I>(List_nc_polys,monoms)</I> <DD><A NAME="IDX709"></A> </P> <P> Makes a list of the coefficients of the polynomials in list_nc_polys of the monoms. MONOMS is a list of noncommutative monomials. The coefficients should be scalars. Use LIST_NC_MONOMIALS to build the list of monoms. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LIST_NC_MONOMIALS</B> <I>(polys_or_list)</I> <DD><A NAME="IDX710"></A> </P> <P> returns a list of the non commutative monomials occurring in a polynomial or a collection of polynomials. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PCOEFF</B> <I>(poly monom [variables-to-exclude-from-cof (list-variables monom)])</I> <DD><A NAME="IDX711"></A> </P> <P> This function is called from lisp level, and uses internal poly format. <PRE> CL-MAXIMA>>(setq me (st-rat #$x^2*u+y+1$)) (#:Y 1 1 0 (#:X 2 (#:U 1 1) 0 1)) CL-MAXIMA>>(pcoeff me (st-rat #$x^2$)) (#:U 1 1) </PRE> <P> </P> <P> Rule: if a variable appears in monom it must be to the exact power, and if it is in variables to exclude it may not appear unless it was in monom to the exact power. (pcoeff pol 1 ..) will exclude variables like substituting them to be zero. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NEW-DISREP</B> <I>(poly)</I> <DD><A NAME="IDX712"></A> </P> <P> From lisp this returns the general maxima format for an arg which is in st-rat form: </P> <PRE> (displa(new-disrep (setq me (st-rat #$x^2*u+y+1$)))) 2 Y + U X + 1 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>CREATE_LIST</B> <I>(form,var1,list1,var2,list2,...)</I> <DD><A NAME="IDX713"></A> </P> <P> Create a list by evaluating FORM with VAR1 bound to each element of LIST1, and for each such binding bind VAR2 to each element of LIST2,... The number of elements in the result will be length(list1)*length(list2)*... Each VARn must actually be a symbol--it will not be evaluated. The LISTn args will be evaluated once at the beginning of the iteration. </P> <PRE> (C82) create_list1(x^i,i,[1,3,7]); (D82) [X,X^3,X^7] </PRE> <P> </P> <P> With a double iteration: <PRE> (C79) create_list([i,j],i,[a,b],j,[e,f,h]); (D79) [[A,E],[A,F],[A,H],[B,E],[B,F],[B,H]] </PRE> <P> Instead of LISTn two args maybe supplied each of which should evaluate to a number. These will be the inclusive lower and upper bounds for the iteration. </P> <PRE> (C81) create_list([i,j],i,[1,2,3],j,1,i); (D81) [[1,1],[2,1],[2,2],[3,1],[3,2],[3,3]] </PRE> <P> Note that the limits or list for the j variable can depend on the current value of i. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ALL_DOTSIMP_DENOMS</B> <DD><A NAME="IDX714"></A> </P> <P> if its value is FALSE the denominators encountered in getting dotsimps will not be collected. To collect the denoms <PRE> ALL_DOTSIMP_DENOMS:[]; </PRE> <P> and they will be nconc'd onto the end of the list. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_26.html">previous</A>, <A HREF="maxima_28.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_28.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Tensor</TITLE> <link href="maxima_29.html" rel=Next> <link href="maxima_27.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_27.html">previous</A>, <A HREF="maxima_29.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC89" HREF="maxima_toc.html#TOC89">Tensor</A></H1> <H2><A NAME="SEC90" HREF="maxima_toc.html#TOC90">Introduction to Tensor</A></H2> <P> - Indicial Tensor Manipulation package. It may be loaded by LOADFILE("itensr"); A manual for the Tensor packages is available in share/tensor.descr. A demo is available by DEMO("itenso.dem1"); (and additional demos are in ("itenso.dem2"), ("itenso.dem3") and following). </P> <P> - There are two tensor packages in MACSYMA, CTENSR and ITENSR. CTENSR is Component Tensor Manipulation, and may be accessed with LOAD(CTENSR); . ITENSR is Indicial Tensor Manipulation, and is loaded by doing LOAD(ITENSR); A manual for CTENSR AND ITENSR is available from the LCS Publications Office. Request MIT/LCS/TM-167. In addition, demos exist on the TENSOR; directory under the filenames CTENSO DEMO1, DEMO2, etc. and ITENSO DEMO1, DEMO2, etc. Do DEMO("ctenso.dem1"); or DEMO("itenso.dem2"); Send bugs or comments to RP or TENSOR. </P> <H2><A NAME="SEC91" HREF="maxima_toc.html#TOC91">Definitions for Tensor</A></H2> <P> <DL> <DT><U>Function:</U> <B>CANFORM</B> <I>(exp)</I> <DD><A NAME="IDX715"></A> [Tensor Package] Simplifies exp by renaming dummy indices and reordering all indices as dictated by symmetry conditions imposed on them. If ALLSYM is TRUE then all indices are assumed symmetric, otherwise symmetry information provided by DECSYM declarations will be used. The dummy indices are renamed in the same manner as in the RENAME function. When CANFORM is applied to a large expression the calculation may take a considerable amount of time. This time can be shortened by calling RENAME on the expression first. Also see the example under DECSYM. Note: CANFORM may not be able to reduce an expression completely to its simplest form although it will always return a mathematically correct result. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CANTEN</B> <I>(exp)</I> <DD><A NAME="IDX716"></A> [Tensor Package] Simplifies exp by renaming (see RENAME) and permuting dummy indices. CANTEN is restricted to sums of tensor products in which no derivatives are present. As such it is limited and should only be used if CANFORM is not capable of carrying out the required simplification. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CARG</B> <I>(exp)</I> <DD><A NAME="IDX717"></A> returns the argument (phase angle) of exp. Due to the conventions and restrictions, principal value cannot be guaranteed unless exp is numeric. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>COUNTER</B> <DD><A NAME="IDX718"></A> default: [1] determines the numerical suffix to be used in generating the next dummy index in the tensor package. The prefix is determined by the option DUMMYX[#]. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEFCON</B> <I>(tensor1,<tensor2,tensor3>)</I> <DD><A NAME="IDX719"></A> gives tensor1 the property that the contraction of a product of tensor1 and tensor2 results in tensor3 with the appropriate indices. If only one argument, tensor1, is given, then the contraction of the product of tensor1 with any indexed object having the appropriate indices (say tensor) will yield an indexed object with that name, i.e.tensor, and with a new set of indices reflecting the contractions performed. For example, if METRIC: G, then DEFCON(G) will implement the raising and lowering of indices through contraction with the metric tensor. More than one DEFCON can be given for the same indexed object; the latest one given which applies in a particular contraction will be used. CONTRACTIONS is a list of those indexed objects which have been given contraction properties with DEFCON. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLUSH</B> <I>(exp,tensor1,tensor2,...)</I> <DD><A NAME="IDX720"></A> Tensor Package - will set to zero, in exp, all occurrences of the tensori that have no derivative indices. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLUSHD</B> <I>(exp,tensor1,tensor2,...)</I> <DD><A NAME="IDX721"></A> Tensor Package - will set to zero, in exp, all occurrences of the tensori that have derivative indices. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLUSHND</B> <I>(exp,tensor,n)</I> <DD><A NAME="IDX722"></A> Tensor Package - will set to zero, in exp, all occurrences of the differentiated object tensor that have n or more derivative indices as the following example demonstrates. <PRE> (C1) SHOW(A([I],[J,R],K,R)+A([I],[J,R,S],K,R,S)); J R S J R (D1) A + A I,K R S I,K R (C2) SHOW(FLUSHND(D1,A,3)); J R (D2) A I,K R </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>KDELTA</B> <I>(L1,L2)</I> <DD><A NAME="IDX723"></A> is the generalized Kronecker delta function defined in the Tensor package with L1 the list of covariant indices and L2 the list of contravariant indices. KDELTA([i],[j]) returns the ordinary Kronecker delta. The command EV(EXP,KDELTA) causes the evaluation of an expression containing KDELTA([],[]) to the dimension of the manifold. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LC</B> <I>(L)</I> <DD><A NAME="IDX724"></A> is the permutation (or Levi-Civita) tensor which yields 1 if the list L consists of an even permutation of integers, -1 if it consists of an odd permutation, and 0 if some indices in L are repeated. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LORENTZ</B> <I>(exp)</I> <DD><A NAME="IDX725"></A> imposes the Lorentz condition by substituting 0 for all indexed objects in exp that have a derivative index identical to a contravariant index. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAKEBOX</B> <I>(exp)</I> <DD><A NAME="IDX726"></A> will display exp in the same manner as SHOW; however, any tensor d'Alembertian occurring in exp will be indicated using the symbol []. For example, []P([M],[N]) represents G([],[I,J])*P([M],[N],I,J). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>METRIC</B> <I>(G)</I> <DD><A NAME="IDX727"></A> specifies the metric by assigning the variable METRIC:G; in addition, the contraction properties of the metric G are set up by executing the commands DEFCON(G), DEFCON(G,G,KDELTA). The variable METRIC, default: [], is bound to the metric, assigned by the METRIC(g) command. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NTERMSG</B> <I>()</I> <DD><A NAME="IDX728"></A> gives the user a quick picture of the "size" of the Einstein tensor. It returns a list of pairs whose second elements give the number of terms in the components specified by the first elements. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NTERMSRCI</B> <I>()</I> <DD><A NAME="IDX729"></A> returns a list of pairs, whose second elements give the number of terms in the RICCI component specified by the first elements. In this way, it is possible to quickly find the non-zero expressions and attempt simplification. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NZETA</B> <I>(Z)</I> <DD><A NAME="IDX730"></A> returns the complex value of the Plasma Dispersion Function for complex Z. <PRE> NZETAR(Z) ==> REALPART(NZETA(Z)) </PRE> <P> NZETAI(Z) returns IMAGPART(NZETA(Z)). This function is related to the complex error function by <PRE> NZETA(Z) = %I*SQRT(%PI)*EXP(-Z^2)*(1-ERF(-%I*Z)). </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>RAISERIEMANN</B> <I>(dis)</I> <DD><A NAME="IDX731"></A> returns the contravariant components of the Riemann curvature tensor as array elements UR[I,J,K,L]. These are displayed if dis is TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RATEINSTEIN</B> <DD><A NAME="IDX732"></A> default: [] - if TRUE rational simplification will be performed on the non-zero components of Einstein tensors; if FACRAT:TRUE then the components will also be factored. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RATRIEMAN</B> <DD><A NAME="IDX733"></A> - This switch has been renamed RATRIEMANN. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RATRIEMANN</B> <DD><A NAME="IDX734"></A> default: [] - one of the switches which controls simplification of Riemann tensors; if TRUE, then rational simplification will be done; if FACRAT:TRUE then each of the components will also be factored. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMCON</B> <I>(tensor1,tensor2,...)</I> <DD><A NAME="IDX735"></A> removes all the contraction properties from the tensori. REMCON(ALL) removes all contraction properties from all indexed objects. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RICCICOM</B> <I>(dis)</I> <DD><A NAME="IDX736"></A> Tensor package) This function first computes the covariant components LR[i,j] of the Ricci tensor (LR is a mnemonic for "lower Ricci"). Then the mixed Ricci tensor is computed using the contravariant metric tensor. If the value of the argument to RICCICOM is TRUE, then these mixed components, RICCI[i,j] (the index i is covariant and the index j is contravariant), will be displayed directly. Otherwise, RICCICOM(FALSE) will simply compute the entries of the array RICCI[i,j] without displaying the results. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RINVARIANT</B> <I>()</I> <DD><A NAME="IDX737"></A> Tensor package) forms the invariant obtained by contracting the tensors <PRE> R[i,j,k,l]*UR[i,j,k,l]. </PRE> <P> This object is not </P> <P> automatically simplified since it can be very large. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SCURVATURE</B> <I>()</I> <DD><A NAME="IDX738"></A> returns the scalar curvature (obtained by contracting the Ricci tensor) of the Riemannian manifold with the given metric. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SETUP</B> <I>()</I> <DD><A NAME="IDX739"></A> this has been renamed to TSETUP(); Sets up a metric for Tensor calculations. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>WEYL</B> <I>(dis)</I> <DD><A NAME="IDX740"></A> computes the Weyl conformal tensor. If the argument dis is TRUE, the non-zero components W[I,J,K,L] will be displayed to the user. Otherwise, these components will simply be computed and stored. If the switch RATWEYL is set to TRUE, then the components will be rationally simplified; if FACRAT is TRUE then the results will be factored as well. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_27.html">previous</A>, <A HREF="maxima_29.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_29.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Ctensor</TITLE> <link href="maxima_30.html" rel=Next> <link href="maxima_28.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_28.html">previous</A>, <A HREF="maxima_30.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC92" HREF="maxima_toc.html#TOC92">Ctensor</A></H1> <H2><A NAME="SEC93" HREF="maxima_toc.html#TOC93">Introduction to Ctensor</A></H2> <P> - Component Tensor Manipulation Package. To use the CTENSR package, type TSETUP(); which automatically loads it from within MACSYMA (if it is not already loaded) and then prompts the user to input his coordinate system. The user is first asked to specify the dimension of the manifold. If the dimension is 2, 3 or 4 then the list of coordinates defaults to [X,Y], [X,Y,Z] or [X,Y,Z,T] respectively. These names may be changed by assigning a new list of coordinates to the variable OMEGA (described below) and the user is queried about this. ** Care must be taken to avoid the coordinate names conflicting with other object definitions **. Next, the user enters the metric either directly or from a file by specifying its ordinal position. As an example of a file of common metrics, see TENSOR;METRIC FILE. The metric is stored in the matrix LG. Finally, the metric inverse is computed and stored in the matrix UG. One has the option of carrying out all calculations in a power series. A sample protocol is begun below for the static, spherically symmetric metric (standard coordinates) which will be applied to the problem of deriving Einstein's vacuum equations (which lead to the Schwarzschild solution) as an example. Many of the functions in CTENSR will be displayed for the standard metric as examples. <PRE> (C2) TSETUP(); Enter the dimension of the coordinate system: 4; Do you wish to change the coordinate names? N; Do you want to 1. Enter a new metric? 2. Enter a metric from a file? 3. Approximate a metric with a Taylor series? Enter 1, 2 or 3 1; Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General Answer 1, 2, 3 or 4 1; Row 1 Column 1: A; Row 2 Column 2: X^2; Row 3 Column 3: X^2*SIN(Y)^2; Row 4 Column 4: -D; Matrix entered. Enter functional dependencies with the DEPENDS function or 'N' if none DEPENDS([A,D],X); Do you wish to see the metric? Y; [ A 0 0 0 ] [ ] [ 2 ] [ 0 X 0 0 ] [ ] [ 2 2 ] [ 0 0 X SIN (Y) 0 ] [ ] [ 0 0 0 - D ] Do you wish to see the metric inverse? N; </PRE> <H2><A NAME="SEC94" HREF="maxima_toc.html#TOC94">Definitions for Ctensor</A></H2> <P> <DL> <DT><U>Function:</U> <B>CHR1</B> <I>([i,j,k])</I> <DD><A NAME="IDX741"></A> yields the Christoffel symbol of the first kind via the definition <PRE> (g + g - g )/2 . ik,j jk,i ij,k </PRE> <P> To evaluate the Christoffel symbols for a particular metric, the variable METRIC must be assigned a name as in the example under CHR2. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CHR2</B> <I>([i,j],[k])</I> <DD><A NAME="IDX742"></A> yields the Christoffel symbol of the second kind defined by the relation <PRE> ks CHR2([i,j],[k]) = g (g + g - g )/2 is,j js,i ij,s </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>CHRISTOF</B> <I>(arg)</I> <DD><A NAME="IDX743"></A> A function in the CTENSR (Component Tensor Manipulation) package. It computes the Christoffel symbols of both kinds. The arg determines which results are to be immediately displayed. The Christoffel symbols of the first and second kinds are stored in the arrays LCS[i,j,k] and MCS[i,j,k] respectively and defined to be symmetric in the first two indices. If the argument to CHRISTOF is LCS or MCS then the unique non-zero values of LCS[i,j,k] or MCS[i,j,k], respectively, will be displayed. If the argument is ALL then the unique non-zero values of LCS[i,j,k] and MCS[i,j,k] will be displayed. If the argument is FALSE then the display of the elements will not occur. The array elements MCS[i,j,k] are defined in such a manner that the final index is contravariant. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COVDIFF</B> <I>(exp,v1,v2,...)</I> <DD><A NAME="IDX744"></A> yields the covariant derivative of exp with respect to the variables vi in terms of the Christoffel symbols of the second kind (CHR2). In order to evaluate these, one should use EV(exp,CHR2). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CURVATURE</B> <I>([i,j,k],[h])</I> <DD><A NAME="IDX745"></A> Indicial Tensor Package) yields the Riemann curvature tensor in terms of the Christoffel symbols of the second kind (CHR2). The following notation is used: <PRE> h h h %1 h CURVATURE = - CHR2 - CHR2 CHR2 + CHR2 i j k i k,j %1 j i k i j,k h %1 + CHR2 CHR2 %1 k i j </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>DIAGMETRIC</B> <DD><A NAME="IDX746"></A> default:[] - An option in the CTENSR (Component Tensor Manipulation) package. If DIAGMETRIC is TRUE special routines compute all geometrical objects (which contain the metric tensor explicitly) by taking into consideration the diagonality of the metric. Reduced run times will, of course, result. Note: this option is set automatically by TSETUP if a diagonal metric is specified. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DIM</B> <DD><A NAME="IDX747"></A> default:[4] - An option in the CTENSR (Component Tensor Manipulation) package. DIM is the dimension of the manifold with the default 4. The command DIM:N; will reset the dimension to any other integral value. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EINSTEIN</B> <I>(dis)</I> <DD><A NAME="IDX748"></A> A function in the CTENSR (Component Tensor Manipulation) package. EINSTEIN computes the mixed Einstein tensor after the Christoffel symbols and Ricci tensor have been obtained (with the functions CHRISTOF and RICCICOM). If the argument dis is TRUE, then the non-zero values of the mixed Einstein tensor G[i,j] will be displayed where j is the contravariant index. RATEINSTEIN[TRUE] if TRUE will cause the rational simplification on these components. If RATFAC[FALSE] is TRUE then the components will also be factored. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LRICCICOM</B> <I>(dis)</I> <DD><A NAME="IDX749"></A> A function in the CTENSR (Component Tensor Manipulation) package. LRICCICOM computes the covariant (symmetric) components LR[i,j] of the Ricci tensor. If the argument dis is TRUE, then the non-zero components are displayed. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MOTION</B> <I>(dis)</I> <DD><A NAME="IDX750"></A> A function in the CTENSR (Component Tensor Manipulation) package. MOTION computes the geodesic equations of motion for a given metric. They are stored in the array EM[i]. If the argument dis is TRUE then these equations are displayed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>OMEGA</B> <DD><A NAME="IDX751"></A> default:[] - An option in the CTENSR (Component Tensor Manipulation) package. OMEGA assigns a list of coordinates to the variable. While normally defined when the function TSETUP is called, one may redefine the coordinates with the assignment OMEGA:[j1,j2,...jn] where the j's are the new coordinate names. A call to OMEGA will return the coordinate name list. Also see DESCRIBE(TSETUP); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RIEMANN</B> <I>(dis)</I> <DD><A NAME="IDX752"></A> A function in the CTENSR (Component Tensor Manipulation) Package. RIEMANN computes the Riemann curvature tensor from the given metric and the corresponding Christoffel symbols. If dis is TRUE, the non-zero components R[i,j,k,l] will be displayed. All the indicated indices are covariant. As with the Einstein tensor, various switches set by the user control the simplification of the components of the Riemann tensor. If RATRIEMAN[TRUE] is TRUE then rational simplification will be done. If RATFAC[FALSE] is TRUE then each of the components will also be factored. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRANSFORM</B> <DD><A NAME="IDX753"></A> - The TRANSFORM command in the CTENSR package has been renamed to TTRANSFORM. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TSETUP</B> <I>()</I> <DD><A NAME="IDX754"></A> A function in the CTENSR (Component Tensor Manipulation) package which automatically loads the CTENSR package from within MACSYMA (if it is not already loaded) and then prompts the user to make use of it. Do DESCRIBE(CTENSR); for more details. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TTRANSFORM</B> <I>(matrix)</I> <DD><A NAME="IDX755"></A> A function in the CTENSR (Component Tensor Manipulation) package which will perform a coordinate transformation upon an arbitrary square symmetric matrix. The user must input the functions which define the transformation. (Formerly called TRANSFORM.) </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_28.html">previous</A>, <A HREF="maxima_30.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_3.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Command Line</TITLE> <link href="maxima_4.html" rel=Next> <link href="maxima_2.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_2.html">previous</A>, <A HREF="maxima_4.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC8" HREF="maxima_toc.html#TOC8">Command Line</A></H1> <H2><A NAME="SEC9" HREF="maxima_toc.html#TOC9">Introduction to Command Line</A></H2> <P> <DL> <DT><U>Function:</U> <B>%TH</B> <I>(i)</I> <DD><A NAME="IDX4"></A> is the ith previous computation. That is, if the next expression to be computed is D(j) this is D(j-i). This is useful in BATCH files or for referring to a group of D expressions. For example, if SUM is initialized to 0 then FOR I:1 THRU 10 DO SUM:SUM+%TH(I) will set SUM to the sum of the last ten D expressions. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"'"</B> <DD><A NAME="IDX5"></A> - (single quote) has the effect of preventing evaluation. E.g. '(F(X)) means do not evaluate the expression F(X). 'F(X) means return the noun form of F applied to [X]. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"""</B> <DD><A NAME="IDX6"></A> - (two single quotes) causes an extra evaluation to occur. E.g. "c4; will re-execute line C4. "(F(X)) means evaluate the expression F(X) an extra time. "F(X) means return the verb form of F applied to [X]. </P> </DL> <H2><A NAME="SEC10" HREF="maxima_toc.html#TOC10">Definitions for Command Line</A></H2> <P> <DL> <DT><U>Function:</U> <B>ALIAS</B> <I>(newname1, oldname1, newname2, oldname2, ...)</I> <DD><A NAME="IDX7"></A> provides an alternate name for a (user or system) function, variable, array, etc. Any even number of arguments may be used. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEBUG</B> <I>()</I> <DD><A NAME="IDX8"></A> </P> <P> LISPDEBUGMODE(); DEBUGPRINTMODE(); and DEBUG(); make available to the user debugging features used by systems programmers. These tools are powerful, and although some conventions are different from the usual macsyma level it is felt their use is very intuitive. [Some printout may be verbose for slow terminals, there are switches for controlling this.] These commands were designed for the user who must debug translated macsyma code, as such they are a boon. See MACDOC;TRDEBG USAGE for more information. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DEBUGMODE</B> <DD><A NAME="IDX9"></A> default: [FALSE] - causes MACSYMA to enter a MACSYMA break loop whenever a MACSYMA error occurs if it is TRUE and to terminate that mode if it is FALSE. If it is set to ALL then the user may examine BACKTRACE for the list of functions currently entered. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEBUGPRINTMODE</B> <I>()</I> <DD><A NAME="IDX10"></A> </P> <P> LISPDEBUGMODE(); DEBUGPRINTMODE(); and DEBUG(); make available to the user debugging features used by systems programmers. These tools are powerful, and although some conventions are different from the usual macsyma level it is felt their use is very intuitive. [Some printout may be verbose for slow terminals, there are switches for controlling this.] These commands were designed for the user who must debug translated macsyma code, as such they are a boon. See MACDOC;TRDEBG USAGE for more information. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EV</B> <I>(exp, arg1, ..., argn)</I> <DD><A NAME="IDX11"></A> is one of MACSYMA's most powerful and versatile commands. It evaluates the expression exp in the environment specified by the argi. This is done in steps, as follows: <UL> <LI> (1) First the environment is set up by scanning the argi which may be as follows: SIMP causes exp to be simplified regardless of the setting of the switch SIMP which inhibits simplification if FALSE. NOEVAL supresses the evaluation phase of EV (see step (4) below). This is useful in conjunction with the other switches and in causing exp to be resimplified without being reevaluated. EXPAND causes expansion. EXPAND(m,n) causes expansion, setting the values of MAXPOSEX and MAXNEGEX to m and n respectively. DETOUT causes any matrix inverses computed in exp to have their determinant kept outside of the inverse rather than dividing through each element. DIFF causes all differentiations indicated in exp to be performed. DERIVLIST(var1,...,vark) causes only differentiations with respect to the indicated variables. FLOAT causes non-integral rational numbers to be converted to floating point. NUMER causes some mathematical functions (including exponentiation) with numerical arguments to be evaluated in floating point. It causes variables in exp which have been given numervals to be replaced by their values. It also sets the FLOAT switch on. PRED causes predicates (expressions which evaluate to TRUE or FALSE) to be evaluated. EVAL causes an extra post-evaluation of exp to occur. (See step (5) below.) E where E is an atom declared to be an EVFLAG causes E to be bound to TRUE during the evaluation of exp. V:expression (or alternately V=expression) causes V to be bound to the value of expression during the evaluation of exp. Note that if V is a MACSYMA option, then expression is used for its value during the evaluation of exp. If more than one argument to EV is of this type then the binding is done in parallel. If V is a non-atomic expression then a substitution rather than a binding is performed. E where E, a function name, has been declared to be an EVFUN causes E to be applied to exp. Any other function names (e.g. SUM) cause evaluation of occurrences of those names in exp as though they were verbs. In addition a function occurring in exp (say F(args)) may be defined locally for the purpose of this evaluation of exp by giving F(args):=body as an argument to EV. If an atom not mentioned above or a subscripted variable or subscripted expression was given as an argument, it is evaluated and if the result is an equation or assignment then the indicated binding or substitution is performed. If the result is a list then the members of the list are treated as if they were additional arguments given to EV. This permits a list of equations to be given (e.g. [X=1, Y=A**2] ) or a list of names of equations (e.g. [E1,E2] where E1 and E2 are equations) such as that returned by SOLVE. The argi of EV may be given in any order with the exception of substitution equations which are handled in sequence, left to right, and EVFUNS which are composed, e.g. EV(exp,RATSIMP,REALPART) is handled as REALPART(RATSIMP(exp)). The SIMP, NUMER, FLOAT, and PRED switches may also be set locally in a block, or globally at the "top level" in MACSYMA so that they will remain in effect until being reset. If exp is in CRE form then EV will return a result in CRE form provided the NUMER and FLOAT switches are not both TRUE. <LI> (2) During step (1), a list is made of the non-subscripted variables appearing on the left side of equations in the argi or in the value of some argi if the value is an equation. The variables (both subscripted variables which do not have associated array functions, and non-subscripted variables) in the expression exp are replaced by their global values, except for those appearing in this list. Usually, exp is just a label or % (as in (C2) below), so this step simply retrieves the expression named by the label, so that EV may work on it. <LI> (3) If any substitutions are indicated by the argi, they are carried out now. <LI> (4) The resulting expression is then re-evaluated (unless one of the argi was NOEVAL) and simplified according the the argi. Note that any function calls in exp will be carried out after the variables in it are evaluated and that EV(F(X)) thus may behave like F(EV(X)). <LI> (5) If one of the argi was EVAL, steps (3) and (4) are repeated. </UL> <PRE> Examples (C1) SIN(X)+COS(Y)+(W+1)**2+'DIFF(SIN(W),W); d 2 (D1) COS(Y) + SIN(X) + -- SIN(W) + (W + 1) dW (C2) EV(%,SIN,EXPAND,DIFF,X=2,Y=1); 2 (D2) COS(W) + W + 2 W + COS(1) + 1.90929742 </PRE> <P> An alternate top level syntax has been provided for EV, whereby one may just type in its arguments, without the EV(). That is, one may write simply <PRE> exp, arg1, ...,argn. </PRE> <P> This is not permitted as part of another expression, i.e. in functions, blocks, etc. </P> <PRE> (C4) X+Y,X:A+Y,Y:2; (D4) Y + A + 2 (Notice the parallel binding process) (C5) 2*X-3*Y=3$ (C6) -3*X+2*Y=-4$ (C7) SOLVE([D5,D6]); SOLUTION 1 (E7) Y = - - 5 6 (E8) X = - 5 (D8) [E7, E8] (C9) D6,D8; (D9) - 4 = - 4 (C10) X+1/X > GAMMA(1/2); 1 (D10) X + - > SQRT(%PI) X (C11) %,NUMER,X=1/2; (D11) 2.5 > 1.7724539 (C12) %,PRED; (D12) TRUE </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>EVFLAG</B> <DD><A NAME="IDX12"></A> default: [] - the list of things known to the EV function. An item will be bound to TRUE during the execution of EV if it is mentioned in the call to EV, e.g. EV(%,numer);. Initial evflags are </P> <PRE> FLOAT, PRED, SIMP, NUMER, DETOUT, EXPONENTIALIZE, DEMOIVRE, KEEPFLOAT, LISTARITH, TRIGEXPAND, SIMPSUM, ALGEBRAIC, RATALGDENOM, FACTORFLAG, %EMODE, LOGARC, LOGNUMER, RADEXPAND, RATSIMPEXPONS, RATMX, RATFAC, INFEVAL, %ENUMER, PROGRAMMODE, LOGNEGINT, LOGABS, LETRAT, HALFANGLES, EXPTISOLATE, ISOLATE_WRT_TIMES, SUMEXPAND, CAUCHYSUM, NUMER_PBRANCH, M1PBRANCH, DOTSCRULES, and LOGEXPAND. </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>EVFUN</B> <DD><A NAME="IDX13"></A> - the list of functions known to the EV function which will get applied if their name is mentioned. Initial evfuns are FACTOR, TRIGEXPAND, TRIGREDUCE, BFLOAT, RATSIMP, RATEXPAND, RADCAN, LOGCONTRACT, RECTFORM, and POLARFORM. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>INFEVAL</B> <DD><A NAME="IDX14"></A> leads to an "infinite evaluation" mode. EV repeatedly evaluates an expression until it stops changing. To prevent a variable, say X, from being evaluated away in this mode, simply include X='X as an argument to EV. Of course expressions such as EV(X,X=X+1,INFEVAL); will generate an infinite loop. CAVEAT EVALUATOR. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>KILL</B> <I>(arg1, arg2, ...)</I> <DD><A NAME="IDX15"></A> eliminates its arguments from the MACSYMA system. If argi is a variable (including a single array element), function, or array, the designated item with all of its properties is removed from core. If argi=LABELS then all input, intermediate, and output lines to date (but not other named items) are eliminated. If argi=CLABELS then only input lines will be eliminated; if argi=ELABELS then only intermediate E-lines will be eliminated; if argi=DLABELS only the output lines will be eliminated. If argi is the name of any of the other information lists (the elements of the MACSYMA variable INFOLISTS), then every item in that class (and its properties) is KILLed and if argi=ALL then every item on every information list previously defined as well as LABELS is KILLed. If argi=a number (say n), then the last n lines (i.e. the lines with the last n line numbers) are deleted. If argi is of the form [m,n] then all lines with numbers between m and n inclusive are killed. Note that KILL(VALUES) or KILL(variable) will not free the storage occupied unless the labels which are pointing to the same expressions are also KILLed. Thus if a large expression was assigned to X on line C7 one should do KILL(D7) as well as KILL(X) to release the storage occupied. KILL(ALLBUT(name1,...,namek) will do a KILL(ALL) except it will not KILL the names specified. (Note: namei means a name such as U, V, F, G, not an infolist such as FUNCTIONS.) KILL removes all properties from the given argument thus KILL(VALUES) will kill all properties associated with every item on the VALUES list whereas the REMOVE set of functions (REMVALUE,REMFUNCTION,REMARRAY,REMRULE) remove a specific property. Also the latter print out a list of names or FALSE if the specific argument doesn't exist whereas KILL always has value "DONE" even if the named item doesn't exist. Note that killing expressions will not help the problem which occurs on MC indicated by "NO CORE - FASLOAD" which results when either too many FASL files have been loaded in or when allocation level has gotten too high. In either of these cases, no amount of killing will cause the size of these spaces to decrease. Killing expressions only causes some spaces to get emptied out but not made smaller. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LABELS</B> <I>(char)</I> <DD><A NAME="IDX16"></A> takes a char C, D, or E as arg and generates a list of all C-labels, D-labels, or E- labels, respectively. If you've generated many E- labels via SOLVE, then <PRE> FIRST(REST(LABELS(C))) </PRE> <P> reminds you what the last C-label was. LABELS will take as arg any symbolic name, so if you have reset INCHAR, OUTCHAR, or LINECHAR, it will return the list of labels whose first character matches the first character of the arg you give to LABELS. The variable, LABELS, default: [], is a list of C, D, and E lines which are bound. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LASTTIME</B> <DD><A NAME="IDX17"></A> - the time to compute the last expression in milliseconds presented as a list of "time" and "gctime". </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LINENUM</B> <DD><A NAME="IDX18"></A> - the line number of the last expression. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MYOPTIONS</B> <DD><A NAME="IDX19"></A> default: [] - all options ever reset by the user (whether or not they get reset to their default value). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>NOLABELS</B> <DD><A NAME="IDX20"></A> default: [FALSE] - if TRUE then no labels will be bound except for E lines generated by the solve functions. This is most useful in the "BATCH" mode where it eliminates the need to do KILL(LABELS) in order to free up storage. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>OPTIONSET</B> <DD><A NAME="IDX21"></A> default: [FALSE] - if TRUE, MACSYMA will print out a message whenever a MACSYMA option is reset. This is useful if the user is doubtful of the spelling of some option and wants to make sure that the variable he assigned a value to was truly an option variable. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PLAYBACK</B> <I>(arg)</I> <DD><A NAME="IDX22"></A> "plays back" input and output lines. If arg=n (a number) the last n expressions (Ci, Di, and Ei count as 1 each) are "played-back", while if arg is omitted, all lines are. If arg=INPUT then only input lines are played back. If arg=[m,n] then all lines with numbers from m to n inclusive are played-back. If m=n then [m] is sufficient for arg. Arg=SLOW places PLAYBACK in a slow-mode similar to DEMO's (as opposed to the "fast" BATCH). This is useful in conjunction with SAVE or STRINGOUT when creating a secondary-storage file in order to pick out useful expressions. If arg=TIME then the computation times are displayed as well as the expressions. If arg=GCTIME or TOTALTIME, then a complete breakdown of computation times are displayed, as with SHOWTIME:ALL;. Arg=STRING strings-out (see STRING function) all input lines when playing back rather than displaying them. If ARG=GRIND "grind" mode can also be turned on (for processing input lines) (see GRIND). One may include any number of options as in PLAYBACK([5,10],20,TIME,SLOW). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PRINTPROPS</B> <I>(a, i)</I> <DD><A NAME="IDX23"></A> will display the property with the indicator i associated with the atom a. a may also be a list of atoms or the atom ALL in which case all of the atoms with the given property will be used. For example, PRINTPROPS([F,G],ATVALUE). PRINTPROPS is for properties that cannot otherwise be displayed, i.e. for ATVALUE, ATOMGRAD, GRADEF, and MATCHDECLARE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>PROMPT</B> <DD><A NAME="IDX24"></A> default: [_] is the prompt symbol of the DEMO function, PLAYBACK(SLOW) mode, and (MACSYMA-BREAK). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>QUIT</B> <I>()</I> <DD><A NAME="IDX25"></A> kills the current MACSYMA but doesn't affect the user's other jobs; equivalent to exiting to DCL and stopping the MACSYMA process. One may "quit" to MACSYMA top-level by typing Control-C Control-G; Control-C gets NIL's interrupt prompt, at which one types either Control-G or just G. Typing X at the Interrupt prompt will cause a quit in a computation started within a MACSYMA-BREAK without disrupting the suspended main computation. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMFUNCTION</B> <I>(f1, f2, ...)</I> <DD><A NAME="IDX26"></A> removes the user defined functions f1,f2,... from MACSYMA. If there is only one argument of ALL then all functions are removed. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RESET</B> <I>()</I> <DD><A NAME="IDX27"></A> causes all MACSYMA options to be set to their default values. (Please note that this does not include features of terminals such as LINEL which can only be changed by assignment as they are not considered to be computational features of MACSYMA.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RESTORE</B> <I>(file-specification)</I> <DD><A NAME="IDX28"></A> reinitializes all quantities filed away by a use of the SAVE or STORE functions, in a prior MACSYMA session, from the file given by file-specification without bringing them into core. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SHOWTIME</B> <DD><A NAME="IDX29"></A> default: [FALSE] - if TRUE then the computation time will be printed automatically with each output expression. By setting SHOWTIME:ALL, in addition to the cpu time MACSYMA now also prints out (when not zero) the amount of time spent in garbage collection (gc) in the course of a computation. This time is of course included in the time printed out as "time=" . (It should be noted that since the "time=" time only includes computation time and not any intermediate display time or time it takes to load in out-of-core files, and since it is difficult to ascribe "responsibility" for gc's, the gctime printed will include all gctime incurred in the course of the computation and hence may in rare cases even be larger than "time="). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SSTATUS</B> <I>(feature,package)</I> <DD><A NAME="IDX30"></A> - meaning SET STATUS. It can be used to SSTATUS( FEATURE, HACK_PACKAGE) so that STATUS( FEATURE, HACK_PACKAGE) will then return TRUE. This can be useful for package writers, to keep track of what FEATURES they have loaded in. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TOBREAK</B> <I>()</I> <DD><A NAME="IDX31"></A> causes the MACSYMA break which was left by typing TOPLEVEL; to be re-entered. If TOBREAK is given any argument whatsoever, then the break will be exited, which is equivalent to typing TOBREAK() immediately followed by EXIT;. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TOPLEVEL</B> <I>()</I> <DD><A NAME="IDX32"></A> During a break one may type TOPLEVEL;. This will cause top-level MACSYMA to be entered recursively. Labels will now be bound as usual. Everything will be identical to the previous top-level state except that the computation which was interrupted is saved. The function TOBREAK() will cause the break which was left by typing TOPLEVEL; to be re-entered. If TOBREAK is given any argument whatsoever, then the break will be exited, which is equivalent to typing TOBREAK() immediately followed by EXIT;. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TO_LISP</B> <I>()</I> <DD><A NAME="IDX33"></A> enters the LISP system under MACSYMA. This is useful on those systems where control-uparrow is not available for this function. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TTYINTFUN</B> <DD><A NAME="IDX34"></A> default: [FALSE] - Governs the function which will be run whenever the User-interrupt-character is typed. To use this feature, one sets TTYINTFUN (default FALSE meaning feature not in use) to a function of no arguments. Then whenever (e.g.) ^U (control-U) is typed, this function is run. E.g. suppose you have a FOR statement loop which increments I, and you want an easy way of checking on the value of I while the FOR statement is running. You can do: TTYINTFUN:PRINTI$ PRINTI():=PRINT(I)$ , then whenever you type (e.g.) ^U you get the check you want. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TTYINTNUM</B> <DD><A NAME="IDX35"></A> default: [21] (the ascii value of Control-U (^U), U being the 21st letter of the alphabet). This controls what character becomes the User-interrupt-character. ^U was chosen for it mnemonic value. Most users should not reset TTYINTNUM unless they are already using ^U for something else. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>VALUES</B> <DD><A NAME="IDX36"></A> default:[] - all bound atoms, i.e. user variables, not MACSYMA Options or Switches, (set up by : , :: , or functional binding). </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_2.html">previous</A>, <A HREF="maxima_4.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_30.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Series</TITLE> <link href="maxima_31.html" rel=Next> <link href="maxima_29.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_29.html">previous</A>, <A HREF="maxima_31.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC95" HREF="maxima_toc.html#TOC95">Series</A></H1> <H2><A NAME="SEC96" HREF="maxima_toc.html#TOC96">Introduction to Series</A></H2> <P> Maxima contains functions <CODE>Taylor</CODE> and <CODE>Powerseries</CODE> for finding the series of differentiable functions. It also has tools such as <CODE>Nusum</CODE> capable of finding the closed form of some series. Operations such as addition and multiplication work as usual on series. This section presents the various global various variables which control the expansion. <H2><A NAME="SEC97" HREF="maxima_toc.html#TOC97">Definitions for Series</A></H2> <P> <DL> <DT><U>Variable:</U> <B>CAUCHYSUM</B> <DD><A NAME="IDX756"></A> default: [FALSE] - When multiplying together sums with INF as their upper limit, if SUMEXPAND is TRUE and CAUCHYSUM is set to TRUE then the Cauchy product will be used rather than the usual product. In the Cauchy product the index of the inner summation is a function of the index of the outer one rather than varying independently. That is: SUM(F(I),I,0,INF)*SUM(G(J),J,0,INF) becomes SUM(SUM(F(I)*G(J-I),I,0,J),J,0,INF) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEFTAYLOR</B> <I>(function, exp)</I> <DD><A NAME="IDX757"></A> allows the user to define the Taylor series (about 0) of an arbitrary function of one variable as exp which may be a polynomial in that variable or which may be given implicitly as a power series using the SUM function. In order to display the information given to DEFTAYLOR one can use POWERSERIES(F(X),X,0). (see below). <PRE> (C1) DEFTAYLOR(F(X),X**2+SUM(X**I/(2**I*I!**2), I,4,INF)); (D1) [F] (C2) TAYLOR(%E**SQRT(F(X)),X,0,4); 2 3 4 X 3073 X 12817 X (D2)/R/ 1 + X + -- + ------- + -------- + . . . 2 18432 307200 </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAXTAYORDER</B> <DD><A NAME="IDX758"></A> default: [TRUE] - if TRUE, then during algebraic manipulation of (truncated) Taylor series, TAYLOR will try to retain as many terms as are certain to be correct. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NICEINDICES</B> <I>(expr)</I> <DD><A NAME="IDX759"></A> 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. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>NICEINDICESPREF</B> <DD><A NAME="IDX760"></A> default: [I,J,K,L,M,N] - the list which NICEINDICES uses to find indices for sums and products. This allows the user to set the order of preference of how NICEINDICES finds the "nice indices". E.g. NICEINDICESPREF:[Q,R,S,T,INDEX]$. Then if NICEINDICES finds that it cannot use any of these as indices in a particular summation, it uses the first as a base to try and tack on numbers. Here, if the list is exhausted, Q0, then Q1, etc, will be tried. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NUSUM</B> <I>(exp,var,low,high)</I> <DD><A NAME="IDX761"></A> performs indefinite summation of exp with respect to var using a decision procedure due to R.W. Gosper. exp and the potential answer must be expressible as products of nth powers, factorials, binomials, and rational functions. The terms "definite" and "indefinite summation" are used analogously to "definite" and "indefinite integration". To sum indefinitely means to give a closed form for the sum over intervals of variable length, not just e.g. 0 to inf. Thus, since there is no formula for the general partial sum of the binomial series, NUSUM can't do it. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PADE</B> <I>(taylor-series,num-deg-bound,denom-deg-bound)</I> <DD><A NAME="IDX762"></A> returns a list of all rational functions which have the given taylor-series expansion where the sum of the degrees of the numerator and the denominator is less than or equal to the truncation level of the power series, i.e. are "best" approximants, and which additionally satisfy the specified degree bounds. Its first argument must be a univariate taylor-series; the second and third are positive integers specifying degree bounds on the numerator and denominator. PADE's first argument can also be a Laurent series, and the degree bounds can be INF which causes all rational functions whose total degree is less than or equal to the length of the power series to be returned. Total degree is num-degree + denom-degree. Length of a power series is "truncation level" + 1 - minimum(0,"order of series"). </P> <PRE> (C15) ff:taylor(1+x+x^2+x^3,x,0,3); 2 3 (D15)/T/ 1 + X + X + X + . . . (C16) pade(ff,1,1); 1 (D16) [- -----] X - 1 (c1) ff:taylor(-(83787*X^10-45552*X^9-187296*X^8 +387072*X^7+86016*X^6-1507328*X^5 +1966080*X^4+4194304*X^3-25165824*X^2 +67108864*X-134217728) /134217728,x,0,10); (C25) PADE(ff,4,4); (D25) [] </PRE> <P> There is no rational function of degree 4 numerator/denominator, with this power series expansion. You must in general have degree of the numerator and degree of the denominator adding up to at least the degree of the power series, in order to have enough unknown coefficients to solve. <PRE> (C26) PADE(ff,5,5); (D26) [-(520256329*X^5-96719020632*X^4-489651410240*X^3 -1619100813312*X^2 -2176885157888*X-2386516803584) /(47041365435*X^5+381702613848*X^4+1360678489152*X^3 +2856700692480*X^2 +3370143559680*X+2386516803584)] </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>POWERDISP</B> <DD><A NAME="IDX763"></A> default: [FALSE] - if TRUE will cause sums to be displayed with their terms in the reverse order. Thus polynomials would display as truncated power series, i.e., with the lowest power first. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>POWERSERIES</B> <I>(exp, var, pt)</I> <DD><A NAME="IDX764"></A> generates the general form of the power series expansion for exp in the variable var about the point pt (which may be INF for infinity). If POWERSERIES is unable to expand exp, the TAYLOR function may give the first several terms of the series. VERBOSE[FALSE] - if TRUE will cause comments about the progress of POWERSERIES to be printed as the execution of it proceeds. <PRE> (C1) VERBOSE:TRUE$ (C2) POWERSERIES(LOG(SIN(X)/X),X,0); Can't expand LOG(SIN(X)) So we'll try again after applying the rule: d / -- (SIN(X)) [ dX LOG(SIN(X)) = I ----------- dX ] SIN(X) / In the first simplification we have returned: / [ I COT(X) dX - LOG(X) ] / INF ==== I1 2 I1 2 I1 \ (- 1) 2 BERN(2 I1) X > ------------------------------ / I1 (2 I1)! ==== I1 = 1 (D2) ------------------------------------- 2 </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>PSEXPAND</B> <DD><A NAME="IDX765"></A> default: [FALSE] - if TRUE will cause extended rational function expressions to display fully expanded. (RATEXPAND will also cause this.) If FALSE, multivariate expressions will be displayed just as in the rational function package. If PSEXPAND:MULTI, then terms with the same total degree in the variables are grouped together. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REVERT</B> <I>(expression,variable)</I> <DD><A NAME="IDX766"></A> Does reversion of Taylor Series. "Variable" is the variable the original Taylor expansion is in. Do LOAD(REVERT) to access this function. Try </P> <PRE> REVERT2(expression,variable,hipower) </PRE> <P> also. REVERT only works on expansions around 0. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SRRAT</B> <I>(exp)</I> <DD><A NAME="IDX767"></A> this command has been renamed to TAYTORAT. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TAYLOR</B> <I>(exp, var, pt, pow)</I> <DD><A NAME="IDX768"></A> expands the expression exp in a truncated Taylor series (or Laurent series, if required) in the variable var around the point pt. The terms through (var-pt)**pow are generated. If exp is of the form f(var)/g(var) and g(var) has no terms up to degree pow then TAYLOR will try to expand g(var) up to degree 2*pow. If there are still no non-zero terms TAYLOR will keep doubling the degree of the expansion of g(var) until reaching pow*2**n where n is the value of the variable TAYLORDEPTH[3]. If MAXTAYORDER[FALSE] is set to TRUE, then during algebraic manipulation of (truncated) Taylor series, TAYLOR will try to retain as many terms as are certain to be correct. Do EXAMPLE(TAYLOR); for examples. TAYLOR(exp,[var1,pt1,ord1],[var2,pt2,ord2],...) returns a truncated power series in the variables vari about the points pti, truncated at ordi. PSEXPAND[FALSE] if TRUE will cause extended rational function expressions to display fully expanded. (RATEXPAND will also cause this.) If FALSE, multivariate expressions will be displayed just as in the rational function package. If PSEXPAND:MULTI, then terms with the same total degree in the variables are grouped together. TAYLOR(exp, [var1, var2, . . .], pt, ord) where each of pt and ord may be replaced by a list which will correspond to the list of variables. that is, the nth items on each of the lists will be associated together. TAYLOR(exp, [x,pt,ord,ASYMP]) will give an expansion of exp in negative powers of (x-pt). The highest order term will be (x-pt)^(-ord). The ASYMP is a syntactic device and not to be assigned to. See also the TAYLOR_LOGEXPAND switch for controlling expansion. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TAYLORDEPTH</B> <DD><A NAME="IDX769"></A> default: [3] - If there are still no non-zero terms TAYLOR will keep doubling the degree of the expansion of g(var) until reaching pow*2**n where n is the value of the variable TAYLORDEPTH[3]. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TAYLORINFO</B> <I>(exp)</I> <DD><A NAME="IDX770"></A> returns FALSE if exp is not a Taylor series. Otherwise, a list of lists is returned describing the particulars of the Taylor expansion. For example, <PRE> (C3) TAYLOR((1-Y^2)/(1-X),X,0,3,[Y,A,INF]); 2 2 (D3)/R/ 1 - A - 2 A (Y - A) - (Y - A) 2 2 + (1 - A - 2 A (Y - A) - (Y - A) ) X 2 2 2 + (1 - A - 2 A (Y - A) - (Y - A) ) X 2 2 3 + (1 - A - 2 A (Y - A) - (Y - A) ) X + . . . (C4) TAYLORINFO(D3); (D4) [[Y, A, INF], [X, 0, 3]] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>TAYLORP</B> <I>(exp)</I> <DD><A NAME="IDX771"></A> a predicate function which returns TRUE if and only if the expression 'exp' is in Taylor series representation. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TAYLOR_LOGEXPAND</B> <DD><A NAME="IDX772"></A> default: [TRUE] controls expansions of logarithms in TAYLOR series. When TRUE all log's are expanded fully so that zero-recognition problems involving logarithmic identities do not disturb the expansion process. However, this scheme is not always mathematically correct since it ignores branch information. If TAYLOR_LOGEXPAND is set to FALSE, then the only expansion of log's that will occur is that necessary to obtain a formal power series. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TAYLOR_ORDER_COEFFICIENTS</B> <DD><A NAME="IDX773"></A> default: [TRUE] controls the ordering of coefficients in the expression. The default (TRUE) is that coefficients of taylor series will be ordered canonically. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TAYLOR_SIMPLIFIER</B> <DD><A NAME="IDX774"></A> - A function of one argument which TAYLOR uses to simplify coefficients of power series. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TAYLOR_TRUNCATE_POLYNOMIALS</B> <DD><A NAME="IDX775"></A> default: [TRUE] When FALSE polynomials input to TAYLOR are considered to have infinite precison; otherwise (the default) they are truncated based upon the input truncation levels. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TAYTORAT</B> <I>(exp)</I> <DD><A NAME="IDX776"></A> converts exp from TAYLOR form to CRE form, i.e. it is like RAT(RATDISREP(exp)) although much faster. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRUNC</B> <I>(exp)</I> <DD><A NAME="IDX777"></A> causes exp which is in general representation to be displayed as if its sums were truncated Taylor series. E.g. compare EXP1:X^2+X+1; with EXP2:TRUNC(X^2+X+1); . Note that IS(EXP1=EXP2); gives TRUE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNSUM</B> <I>(fun,n)</I> <DD><A NAME="IDX778"></A> is the first backward difference fun(n) - fun(n-1). <PRE> (C1) G(P):=P*4^N/BINOMIAL(2*N,N); N P 4 (D1) G(P) := ---------------- BINOMIAL(2 N, N) (C2) G(N^4); 4 N N 4 (D2) ---------------- BINOMIAL(2 N, N) (C3) NUSUM(D2,N,0,N); 4 3 2 N 2 (N + 1) (63 N + 112 N + 18 N - 22 N + 3) 4 2 (D3) ------------------------------------------------ - ------ 693 BINOMIAL(2 N, N) 3 11 7 (C4) UNSUM(%,N); 4 N N 4 (D4) ---------------- BINOMIAL(2 N, N) </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>VERBOSE</B> <DD><A NAME="IDX779"></A> default: [FALSE] - if TRUE will cause comments about the progress of POWERSERIES to be printed as the execution of it proceeds. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_29.html">previous</A>, <A HREF="maxima_31.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_31.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Number Theory</TITLE> <link href="maxima_32.html" rel=Next> <link href="maxima_30.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_30.html">previous</A>, <A HREF="maxima_32.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC98" HREF="maxima_toc.html#TOC98">Number Theory</A></H1> <H2><A NAME="SEC99" HREF="maxima_toc.html#TOC99">Definitions for Number Theory</A></H2> <P> <DL> <DT><U>Function:</U> <B>BERN</B> <I>(x)</I> <DD><A NAME="IDX780"></A> gives the Xth Bernoulli number for integer X. ZEROBERN[TRUE] if set to FALSE excludes the zero BERNOULLI numbers. (See also BURN). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BERNPOLY</B> <I>(v, n)</I> <DD><A NAME="IDX781"></A> generates the nth Bernoulli polynomial in the variable v. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BFZETA</B> <I>(exp,n)</I> <DD><A NAME="IDX782"></A> BFLOAT version of the Riemann Zeta function. The 2nd argument is how many digits to retain and return, it's a good idea to request a couple of extra. This function is available by doing LOAD(BFFAC); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BGZETA</B> <I>(S, FPPREC)</I> <DD><A NAME="IDX783"></A> BGZETA is like BZETA, but avoids arithmetic overflow errors on large arguments, is faster on medium size arguments (say S=55, FPPREC=69), and is slightly slower on small arguments. It may eventually replace BZETA. BGZETA is available by doing LOAD(BFAC);. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BHZETA</B> <I>(S,H,FPPREC)</I> <DD><A NAME="IDX784"></A> gives FPPREC digits of <PRE> SUM((K+H)^-S,K,0,INF) </PRE> <P> This is available by doing LOAD(BFFAC);. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BINOMIAL</B> <I>(X, Y)</I> <DD><A NAME="IDX785"></A> the binomial coefficient X*(X-1)*...*(X-Y+1)/Y!. If X and Y are integers, then the numerical value of the binomial coefficient is computed. If Y, or the value X-Y, is an integer, the binomial coefficient is expressed as a polynomial. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BURN</B> <I>(N)</I> <DD><A NAME="IDX786"></A> is like BERN(N), but without computing all of the uncomputed Bernoullis of smaller index. So BURN works efficiently for large, isolated N. (BERN(402) takes about 645 secs vs 13.5 secs for BURN(402). BERN's time growth seems to be exponential, while BURN's is about cubic. But if next you do BERN(404), it only takes 12 secs, since BERN remembers all in an array, whereas BURN(404) will take maybe 14 secs or maybe 25, depending on whether MACSYMA needs to BFLOAT a better value of %PI.) BURN is available by doing LOAD(BFFAC);. BURN uses an observation of WGD that (rational) Bernoulli numbers can be approximated by (transcendental) zetas with tolerable efficiency. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BZETA</B> <DD><A NAME="IDX787"></A> - This function is obsolete, see BFZETA. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CF</B> <I>(exp)</I> <DD><A NAME="IDX788"></A> converts exp into a continued fraction. exp is an expression composed of arithmetic operators and lists which represent continued fractions. A continued fraction a+1/(b+1/(c+...)) is represented by the list [a,b,c,...]. a,b,c,.. must be integers. Exp may also involve SQRT(n) where n is an integer. In this case CF will give as many terms of the continued fraction as the value of the variable CFLENGTH[1] times the period. Thus the default is to give one period. (CF binds LISTARITH to FALSE so that it may carry out its function.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CFDISREP</B> <I>(list)</I> <DD><A NAME="IDX789"></A> converts the continued fraction represented by list into general representation. <PRE> (C1) CF([1,2,-3]+[1,-2,1]); (D1) [1, 1, 1, 2] (C2) CFDISREP(%); 1 (D2) 1 + --------- 1 1 + ----- 1 1 + - 2 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>CFEXPAND</B> <I>(x)</I> <DD><A NAME="IDX790"></A> gives a matrix of the numerators and denominators of the next-to-last and last convergents of the continued fraction x. <PRE> (C1) CF(SQRT(3)); (D1) [1, 1, 2, 1, 2, 1, 2, 1] (C2) CFEXPAND(%); [71 97] (D2) [ ] [41 56] (C3) D2[1,2]/D2[2,2],NUMER; (D3) 1.7321429 </PRE> </DL> <P> <DL> <DT><U>Variable:</U> <B>CFLENGTH</B> <DD><A NAME="IDX791"></A> default: [1] controls the number of terms of the continued fraction the function CF will give, as the value CFLENGTH[1] times the period. Thus the default is to give one period. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CGAMMA</B> <DD><A NAME="IDX792"></A> - The Gamma function in the complex plane. Do LOAD(CGAMMA) to use these functions. Functions Cgamma, Cgamma2, and LogCgamma2. These functions evaluate the Gamma function over the complex plane using the algorithm of Kuki, CACM algorithm 421. Calculations are performed in single precision and the relative error is typically around 1.0E-7; evaluation at one point costs less than 1 msec. The algorithm provides for an error estimate, but the Macsyma implementation currently does not use it. Cgamma is the general function and may be called with a symbolic or numeric argument. With symbolic arguments, it returns as is; with real floating or rational arguments, it uses the Macsyma Gamma function; and for complex numeric arguments, it uses the Kuki algorithm. Cgamma2 of two arguments, real and imaginary, is for numeric arguments only; LogCgamma2 is the same, but the log-gamma function is calculated. These two functions are somewhat more efficient. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CGAMMA2</B> <DD><A NAME="IDX793"></A> - See CGAMMA. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DIVSUM</B> <I>(n,k)</I> <DD><A NAME="IDX794"></A> adds up all the factors of n raised to the kth power. If only one argument is given then k is assumed to be 1. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EULER</B> <I>(X)</I> <DD><A NAME="IDX795"></A> gives the Xth Euler number for integer X. For the Euler-Mascheroni constant, see %GAMMA. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FACTORIAL</B> <I>(X)</I> <DD><A NAME="IDX796"></A> The factorial function. FACTORIAL(X) = X! . See also MINFACTORIAL and FACTCOMB. The factorial operator is !, and the double factorial operator is !!. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FIB</B> <I>(X)</I> <DD><A NAME="IDX797"></A> the Xth Fibonacci number with FIB(0)=0, FIB(1)=1, and FIB(-N)=(-1)^(N+1) *FIB(N). PREVFIB is FIB(X-1), the Fibonacci number preceding the last one computed. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FIBTOPHI</B> <I>(exp)</I> <DD><A NAME="IDX798"></A> converts FIB(n) to its closed form definition. This involves the constant %PHI (= (SQRT(5)+1)/2 = 1.618033989). If you want the Rational Function Package to know About %PHI do TELLRAT(%PHI^2-%PHI-1)$ ALGEBRAIC:TRUE$ . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INRT</B> <I>(X,n)</I> <DD><A NAME="IDX799"></A> takes two integer arguments, X and n, and returns the integer nth root of the absolute value of X. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>JACOBI</B> <I>(p,q)</I> <DD><A NAME="IDX800"></A> is the Jacobi symbol of p and q. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LCM</B> <I>(exp1,exp2,...)</I> <DD><A NAME="IDX801"></A> returns the Least Common Multiple of its arguments. Do LOAD(FUNCTS); to access this function. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAXPRIME</B> <DD><A NAME="IDX802"></A> default: [489318] - the largest number which may be given to the PRIME(n) command, which returns the nth prime. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MINFACTORIAL</B> <I>(exp)</I> <DD><A NAME="IDX803"></A> examines exp for occurrences of two factorials which differ by an integer. It then turns one into a polynomial times the other. If exp involves binomial coefficients then they will be converted into ratios of factorials. <PRE> (C1) N!/(N+1)!; N! (D1) -------- (N + 1)! (C2) MINFACTORIAL(%); 1 (D2) ----- N + 1 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>PARTFRAC</B> <I>(exp, var)</I> <DD><A NAME="IDX804"></A> expands the expression exp in partial fractions with respect to the main variable, var. PARTFRAC does a complete partial fraction decomposition. The algorithm employed is based on the fact that the denominators of the partial fraction expansion (the factors of the original denominator) are relatively prime. The numerators can be written as linear combinations of denominators, and the expansion falls out. See EXAMPLE(PARTFRAC); for examples. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PRIME</B> <I>(n)</I> <DD><A NAME="IDX805"></A> gives the nth prime. MAXPRIME[489318] is the largest number accepted as argument. Note: The PRIME command does not work in maxima, since it required a large file of primes, which most users do not want. PRIMEP does work however. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PRIMEP</B> <I>(n)</I> <DD><A NAME="IDX806"></A> returns TRUE if n is a prime, FALSE if not. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>QUNIT</B> <I>(n)</I> <DD><A NAME="IDX807"></A> gives the principal unit of the real quadratic number field SQRT(n) where n is an integer, i.e. the element whose norm is unity. This amounts to solving Pell's equation A**2- n*B**2=1. <PRE> (C1) QUNIT(17); (D1) SQRT(17)+4 (C2) EXPAND(%*(SQRT(17)-4)); (D2) 1 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>TOTIENT</B> <I>(n)</I> <DD><A NAME="IDX808"></A> is the number of integers less than or equal to n which are relatively prime to n. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ZEROBERN</B> <DD><A NAME="IDX809"></A> default: [TRUE] - if set to FALSE excludes the zero BERNOULLI numbers. (See the BERN function.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ZETA</B> <I>(X)</I> <DD><A NAME="IDX810"></A> gives the Riemann zeta function for certain integer values of X. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ZETA%PI</B> <DD><A NAME="IDX811"></A> default: [TRUE] - if FALSE, suppresses ZETA(n) giving coeff*%PI^n for n even. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_30.html">previous</A>, <A HREF="maxima_32.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_32.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Symmetries</TITLE> <link href="maxima_33.html" rel=Next> <link href="maxima_31.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_31.html">previous</A>, <A HREF="maxima_33.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC100" HREF="maxima_toc.html#TOC100">Symmetries</A></H1> [...1478 lines suppressed...] [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]] treinat([3,2]); [[5], [4, 1], [3, 2]] </PRE> <P> Voir e'galement : LGTREILLIS, LTREILLIS et TREILLIS. </DL> </P> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_31.html">previous</A>, <A HREF="maxima_33.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_33.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Groups</TITLE> <link href="maxima_34.html" rel=Next> <link href="maxima_32.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_32.html">previous</A>, <A HREF="maxima_34.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC102" HREF="maxima_toc.html#TOC102">Groups</A></H1> <H2><A NAME="SEC103" HREF="maxima_toc.html#TOC103">Definitions for Groups</A></H2> <P> <DL> <DT><U>Function:</U> <B>TODD_COXETER</B> <I>(relations,subgroup)</I> <DD><A NAME="IDX857"></A> </P> <P> Find the order of G/H where G is the Free Group modulo RELATIONS, and H is the subgroup of G generated by SUBGROUP. SUBGROUP is an optional argument, defaulting to []. In doing this it produces a multiplication table for the right action of G on G/H, where the cosets are enumerated [H,Hg2,Hg3,...] This can be seen internally in the $todd_coxeter_state. The multiplication tables for the variables are in table:todd_coxeter_state[2] Then table[i] gives the table for the ith variable. mulcoset(coset,i) := table[varnum][coset]; </P> <P> Example: </P> <PRE> (C1) symet(n):=create_list(if (j - i) = 1 then (p(i,j))^^3 else if (not i = j) then (p(i,j))^^2 else p(i,i) , j,1,n-1,i,1,j); <3> (D1) SYMET(N) := CREATE_LIST(IF J - I = 1 THEN P(I, J) <2> ELSE (IF NOT I = J THEN P(I, J) ELSE P(I, I)), J, 1, N - 1, I, 1, J) (C2) p(i,j) :=concat(x,i).concat(x,j); (D2) P(I, J) := CONCAT(X, I) . CONCAT(X, J) (C3) symet(5); <3> <2> <3> (D3) [X1 . X1, (X1 . X2) , X2 . X2, (X1 . X3) , (X2 . X3) , <2> <2> <3> X3 . X3, (X1 . X4) , (X2 . X4) , (X3 . X4) , X4 . X4] (C4) todd_coxeter(d3); Rows tried 426 (D4) 120 (C5) todd_coxeter(d3,[x1]); Rows tried 213 (D5) 60 (C6) todd_coxeter(d3,[x1,x2]); Rows tried 71 (D6) 20 (C7) table:todd_coxeter_state[2]$ (C8) table:todd_coxeter_state[2]$ (C9) table[1]; (D9) {Array: FIXNUM #(0 2 1 3 7 6 5 4 8 11 17 9 12 14 13 20 16 10 18 19 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)} </PRE> <P> Note only the elements 1 thru 20 of this array d9 are meaningful. table[1][4] = 7 indicates coset4.var1 = coset7 </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_32.html">previous</A>, <A HREF="maxima_34.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_34.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Runtime Environment</TITLE> <link href="maxima_35.html" rel=Next> <link href="maxima_33.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_33.html">previous</A>, <A HREF="maxima_35.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC104" HREF="maxima_toc.html#TOC104">Runtime Environment</A></H1> <H2><A NAME="SEC105" HREF="maxima_toc.html#TOC105">Introduction for Runtime Environment</A></H2> <P> - A file which is loaded automatically for you when you start up a MACSYMA, to customize MACSYMA for you. It is possible to have an init file written as a BATCH file of macsyma commands. We hope this makes it easier for users to customize their macsyma environment. Here is an example init file <PRE> /*-*-macsyma-*-*/ setup_autoload("share\;bessel",j0,j1,jn); showtime:all; comgrind:true; </PRE> <P> The strange looking comment at the top of the file "/*-*-macsyma-*-*/" tells that it is a macsyma-language file. Also: "SETUP_AUTOLOAD" can be used to make functions in BATCH files autoloading, meaning that you can then use (for instance, here) the functions J0, J1 and Jn from the BESSEL package directly because when you use the function the BESSEL package will be loaded in for you automatically. If the second file name in the argument to SETUP_AUTOLOAD is not specified (the preferred usage) then the standard search for second file names of "FASL", "TRLISP", and ">" is done. </P> <H2><A NAME="SEC106" HREF="maxima_toc.html#TOC106">INTERRUPTS</A></H2> <P> - There are several ways the user can interrupt a MACSYMA computation, usually with a control character. Do DESCRIBE(CHARACTERS); for details. MACSYMA will also be interrupted if ^Z (control-Z) is typed, as this will exit back to Unix shell level Usually Control-C interrupts the computation putting you in a break loop. Typing :t should give you top level maxima back again. </P> <H2><A NAME="SEC107" HREF="maxima_toc.html#TOC107">Definitions for Runtime Environment</A></H2> <P> <DL> <DT><U>Function:</U> <B>ALARMCLOCK</B> <I>(arg1, arg2, arg3)</I> <DD><A NAME="IDX858"></A> will execute the function of no arguments whose name is arg3 when the time specified by arg1 and arg2 elapses. If arg1 is the atom "TIME" then arg3 will be executed after arg2 seconds of real-time has elapsed while if arg1 is the atom "RUNTIME" then arg3 will be executed after arg2 milliseconds of cpu time. If arg2 is negative then the arg1 timer is shut off. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ALLOC</B> <DD><A NAME="IDX859"></A> takes any number of arguments which are the same as the replies to the "run out of space" question. It increases allocations accordingly. E.g. If the user knows initially that his problem will require much space, he can say ALLOC(4); to allocate the maximum amount initially. See also the DYNAMALLOC switch. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BUG</B> <I>("message")</I> <DD><A NAME="IDX860"></A> similar to mail, sends a message to MACSYMA Mail. This may be used for reporting bugs or suspected bugs in MACSYMA. Expressions may be included by referring to them, outside double quotes, e.g. BUG("I am trying to integrate",D3,"but it asks for more list space. What should I do?"); </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CLEARSCREEN</B> <I>()</I> <DD><A NAME="IDX861"></A> Clears the screen. The same as typing control-L. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CONTINUE</B> <DD><A NAME="IDX862"></A> - Control-^ typed while in MACSYMA causes LISP to be entered. The user can now type any LISP S-expression and have it evaluated. Typing (CONTINUE) or ^G (control-G) causes MACSYMA to be re-entered. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DDT</B> <I>()</I> <DD><A NAME="IDX863"></A> Exits from MACSYMA to the operating system level. (The same as control-Z on ITS, or control-C on Tops-20.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DELFILE</B> <I>(file-specification)</I> <DD><A NAME="IDX864"></A> will delete the file given by the file-specification (i.e. firstname, secondname, device, user) from the given device. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DISKFREE</B> <I>()</I> <DD><A NAME="IDX865"></A> With no args or an arg of TRUE, will return the total number of free blocks of disk space in the system. With an arg of 0, 1, or 13, it will return the number of free blocks of diskspace on the respective disk pack. With an arg of SECONDARY or PRIMARY, it will return the total number of free blocks of disk space on the secondary or primary disk pack respectively. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>FEATURE</B> <DD><A NAME="IDX866"></A> - A nice adjunct to the system. STATUS(FEATURE) gives you a list of system features. At present the list for MC is: MACSYMA, NOLDMSG, MACLISP, PDP10, BIGNUM, FASLOAD, HUNK, FUNARG, ROMAN, NEWIO, SFA, PAGING, MC, and ITS. Any of these "features" may be given as a second argument to STATUS(FEATURE,...); If the specified feature exists, TRUE will be returned, else FALSE. Note: these are system features, and not really "user related". See also DESCRIBE(features); for more user-oriented features. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FEATUREP</B> <I>(a,f)</I> <DD><A NAME="IDX867"></A> attempts to determine whether the object a has the feature f on the basis of the facts in the current data base. If so, it returns TRUE, else FALSE. See DESCRIBE(FEATURES); . <PRE> (C1) DECLARE(J,EVEN)$ (C2) FEATUREP(J,INTEGER); (D2) TRUE </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>ROOM</B> <I>()</I> <DD><A NAME="IDX868"></A> types out a verbose description of the state of storage and stack management in the Macsyma. This simply utilizes the Lisp ROOM function. ROOM(FALSE) - types out a very terse description, containing most of the same information. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>STATUS</B> <I>(arg)</I> <DD><A NAME="IDX869"></A> will return miscellaneous status information about the user's MACSYMA depending upon the arg given. Permissible arguments and results are as follows: <UL> <LI> TIME - the time used so far in the computation. <LI> DAY - the day of the week. <LI> DATE - a list of the year, month, and day. <LI> DAYTIME - a list of the hour, minute, and second. <LI> RUNTIME - accumulated cpu time times the atom "MILLISECONDS" in the current MACSYMA. <LI> REALTIME - the real time (in sec) elapsed since the user started up his MACSYMA. <LI> GCTIME - the garbage collection time used so far in the current computation. <LI> TOTALGCTIME - gives the total garbage collection time used in MACSYMA so far. <LI> FREECORE - the number of blocks of core your MACSYMA can expand before it runs out of address space. (A block is 1024 words.) Subtracting that value from 250*BLOCKS (the maximum you can get on MC) tells you how many blocks of core your MACSYMA is using up. (A MACSYMA with no "fix" file starts at approx. 191 blocks.) <LI> FEATURE - gives you a list of system features. At present the list for MC is: MACSYMA, NOLDMSG, MACLISP, PDP10, BIGNUM, FASLOAD, HUNK, FUNARG, ROMAN, NEWIO, SFA, PAGING, MC, and ITS. Any of these "features" may be given as a second argument to STATUS(FEATURE,...); If the specified feature exists, TRUE will be returned, else FALSE. Note: these are system features, and not really "user related". </UL> <P> For information about your files, see the FILEDEFAULTS(); command. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TIME</B> <I>(Di1, Di2, ...)</I> <DD><A NAME="IDX870"></A> gives a list of the times in milliseconds taken to compute the Di. (Note: the Variable SHOWTIME, default: [FALSE], may be set to TRUE to have computation times printed out with each D-line.) </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_33.html">previous</A>, <A HREF="maxima_35.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_35.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Miscellaneous Options</TITLE> <link href="maxima_36.html" rel=Next> <link href="maxima_34.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_34.html">previous</A>, <A HREF="maxima_36.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC108" HREF="maxima_toc.html#TOC108">Miscellaneous Options</A></H1> <H2><A NAME="SEC109" HREF="maxima_toc.html#TOC109">Introduction to Miscellaneous Options</A></H2> <P> In this section various options are discussed which have a global effect on the operation of maxima. Also various lists such as the list of all user defined functions, are discussed. </P> <H2><A NAME="SEC110" HREF="maxima_toc.html#TOC110">SHARE</A></H2> <P> - The SHARE directory on MC or on a DEC20 version of MACSYMA contains programs, information files, etc. which are considered to be of interest to the MACSYMA community. Most files on SHARE; are not part of the MACSYMA system per se and must be loaded individually by the user, e.g. LOADFILE("array");. Many files on SHARE; were contributed by MACSYMA users. Do PRINTFILE(SHARE,USAGE,SHARE); for more details and the conventions for contributing to the SHARE directory. For an annotated "table of contents" of the directory, do: PRINTFILE(SHARE,>,SHARE); </P> <H2><A NAME="SEC111" HREF="maxima_toc.html#TOC111">Definitions for Miscellaneous Options</A></H2> <P> <DL> <DT><U>Variable:</U> <B>ALIASES</B> <DD><A NAME="IDX871"></A> default: [] atoms which have a user defined alias (set up by the ALIAS, ORDERGREAT, ORDERLESS functions or by DECLAREing the atom a NOUN). </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>ALLSYM</B> <DD><A NAME="IDX872"></A> default: [TRUE] - If TRUE then all indexed objects are assumed symmetric in all of their covariant and contravariant indices. If FALSE then no symmetries of any kind are assumed in these indices. Derivative indices are always taken to be symmetric. </DL> </P> <P> <DL> <DT><U>declaration:</U> <B>ALPHABETIC</B> <DD><A NAME="IDX873"></A> Adds to MACSYMA's alphabet which initially contains the letters A-Z, % and _. Thus, DECLARE("~",ALPHABETIC) enables NEW~VALUE to be used as a name. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>APROPOS</B> <I>(string)</I> <DD><A NAME="IDX874"></A> takes a character string as argument and looks at all the MACSYMA names for ones with that string appearing anywhere within them. Thus, APROPOS(EXP); will return a long list of all the flags and functions which have EXP as part of their names, such as EXPAND, EXP, EXPONENTIALIZE. Thus if you can only remember part of the name of something you can use this command to find the rest of the name. Similarily, you could say APROPOS(TR_); to find a list of many of the switches relating to the TRANSLATOR (most of which begin with TR_). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ARGS</B> <I>(exp)</I> <DD><A NAME="IDX875"></A> returns a list of the args of exp. I.e. it is essentially equivalent to <PRE> SUBSTPART("[",exp,0) </PRE> <P> Both ARGS and SUBSTPART depend on the setting of INFLAG. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DUMMY</B> <I>(i1,i2,...)</I> <DD><A NAME="IDX876"></A> will set each index i1,i2,... to name of the form !n where n is a positive integer. This guarantees that dummy indices which are needed in forming expressions will not conflict with indices already in use. COUNTER[default 1] determines the numerical suffix to be used in generating the next dummy index. The prefix is determined by the option DUMMYX[!]. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>GENINDEX</B> <DD><A NAME="IDX877"></A> default: [I] is the alphabetic prefix used to generate the next variable of summation when necessary. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>GENSUMNUM</B> <DD><A NAME="IDX878"></A> [0] is the numeric suffix used to generate the next variable of summation. If it is set to FALSE then the index will consist only of GENINDEX with no numeric suffix. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INF</B> <DD><A NAME="IDX879"></A> - real positive infinity. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INFINITY</B> <DD><A NAME="IDX880"></A> - complex infinity, an infinite magnitude of arbitrary phase angle. (See also INF and MINF.) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>INFOLISTS</B> <DD><A NAME="IDX881"></A> default: [] a list of the names of all of the information lists in MACSYMA. These are: LABELS - all bound C,D, and E labels. VALUES - all bound atoms, i.e. user variables, not MACSYMA Options or Switches, (set up by : , :: , or functional binding). FUNCTIONS - all user defined functions (set up by f(x):=...). ARRAYS - declared and undeclared arrays (set up by : , :: , or :=...) MACROS - any Macros defined by the user. MYOPTIONS - all options ever reset by the user (whether or not they get reset to their default value). RULES - user defined pattern matching and simplification rules (set up by TELLSIMP, TELLSIMPAFTER, DEFMATCH, or, DEFRULE.) ALIASES - atoms which have a user defined alias (set up by the ALIAS, ORDERGREAT, ORDERLESS functions or by DECLAREing the atom a NOUN). DEPENDENCIES - atoms which have functional dependencies (set up by the DEPENDS or GRADEF functions). GRADEFS - functions which have user defined derivatives (set up by the GRADEF function). PROPS - atoms which have any property other than those mentioned above, such as atvalues, matchdeclares, etc. as well as properties specified in the DECLARE function. LET_RULE_PACKAGES - a list of all the user-defined let rule packages plus the special package DEFAULT_LET_RULE_PACKAGE. (DEFAULT_LET_RULE_PACKAGE is the name of the rule package used when one is not explicitly set by the user.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INTEGERP</B> <I>(exp)</I> <DD><A NAME="IDX882"></A> is TRUE if exp is an integer else FALSE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>M1PBRANCH</B> <DD><A NAME="IDX883"></A> default: [FALSE] - "principal branch for -1 to a power". Quantities such as (-1)^(1/3) [i.e. "odd" rational exponent] and (-1)^(1/4) [i.e. "even" rational exponent] are now handled as indicated in the following chart: <PRE> DOMAIN:REAL(default) (-1)^(1/3): -1 (-1)^(1/4): (-1)^(1/4) DOMAIN:COMPLEX M1PBRANCH:FALSE(default) M1PBRANCH:TRUE (-1)^(1/3) 1/2+%i*sqrt(3)/2 (-1)^(1/4) sqrt(2)/2+%i*sqrt(2)/2 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>NUMBERP</B> <I>(exp)</I> <DD><A NAME="IDX884"></A> is TRUE if exp is an integer, a rational number, a floating point number or a bigfloat else FALSE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PROPERTIES</B> <I>(a)</I> <DD><A NAME="IDX885"></A> will yield a list showing the names of all the properties associated with the atom a. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>PROPS</B> <DD><A NAME="IDX886"></A> - atoms which have any property other than those explicitly mentioned in INFOLISTS, such as atvalues, matchdeclares, etc. as well as properties specified in the DECLARE function. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PROPVARS</B> <I>(prop)</I> <DD><A NAME="IDX887"></A> yields a list of those atoms on the PROPS list which have the property indicated by prop. Thus PROPVARS(ATVALUE) will yield a list of atoms which have atvalues. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PUT</B> <I>(a, p, i)</I> <DD><A NAME="IDX888"></A> associates with the atom a the property p with the indicator i. This enables the user to give an atom any arbitrary property. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>QPUT</B> <I>(a, p, i)</I> <DD><A NAME="IDX889"></A> is similar to PUT but it doesn't have its arguments evaluated. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REM</B> <I>(a, i)</I> <DD><A NAME="IDX890"></A> removes the property indicated by i from the atom a. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMOVE</B> <I>(args)</I> <DD><A NAME="IDX891"></A> will remove some or all of the properties associated with variables or functions. REMOVE(a1, p1, a2, p2, ...) removes the property pi from the atom ai. Ai and pi may also be lists as with DECLARE. Pi may be any property e.g. FUNCTION, MODE_DECLARE, etc. It may also be TRANSFUN implying that the translated LISP version of the function is to be removed. This is useful if one wishes to have the MACSYMA version of the function executed rather than the translated version. Pi may also be OP or OPERATOR to remove a syntax extension given to ai (see Appendix II). If ai is "ALL" then the property indicated by pi is removed from all atoms which have it. Unlike the more specific remove functions (REMVALUE, REMARRAY, REMFUNCTION, and REMRULE) REMOVE does not indicate when a given property is non-existent; it always returns "DONE". </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMVALUE</B> <I>(name1, name2, ...)</I> <DD><A NAME="IDX892"></A> removes the values of user variables (which can be subscripted) from the system. If name is ALL then the values of all user variables are removed. Values are those items given names by the user as opposed to those which are automatically labeled by MACSYMA as Ci, Di, or Ei. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RENAME</B> <I>(exp)</I> <DD><A NAME="IDX893"></A> returns an expression equivalent to exp but with the dummy indices in each term chosen from the set [!1,!2,...]. Each dummy index in a product will be different; for a sum RENAME will try to make each dummy index in a sum the same. In addition, the indices will be sorted alphanumerically. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RNCOMBINE</B> <I>(exp)</I> <DD><A NAME="IDX894"></A> transforms exp by combining all terms of exp that have identical denominators or denominators that differ from each other by numerical factors only. This is slightly different from the behavior of COMBINE, which collects terms that have identical denominators. Setting PFEFORMAT:TRUE and using COMBINE will achieve results similar to those that can be obtained with RNCOMBINE, but RNCOMBINE takes the additional step of cross-multiplying numerical denominator factors. This results in neater forms, and the possiblity of recognizing some cancellations. Bugs to ASB. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SCALARP</B> <I>(exp)</I> <DD><A NAME="IDX895"></A> is TRUE if exp is a number, constant, or variable DECLAREd SCALAR, or composed entirely of numbers, constants, and such variables, but not containing matrices or lists. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SCALEFACTORS</B> <I>(coordinatetransform)</I> <DD><A NAME="IDX896"></A> 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 3-dimensional rectangular Cartesian coordinates. To expand an expression into physical components in the current coordinate system, there is a function with usage of the form </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SETUP_AUTOLOAD</B> <I>(file,func1,...,funcN)</I> <DD><A NAME="IDX897"></A> which takes two or more arguments: a file specification, and one or more function names, "funcI", and which indicates that if a call to "funcI" is made and "funcI" is not defined, that the file specified by "file" is to be automatically loaded in via LOAD, which file should contain a definition for "funcI". (This is the process by which calling e.g. INTEGRATE in a fresh MACSYMA causes various files to be loaded in.) As with the other file-handling commands in MACSYMA, the arguments to SETUP_AUTOLOAD are not evaluated. Example: SETUP_AUTOLOAD("bessel")$ J1(0.0); . Note: SETUP_AUTOLOAD does not work for array functions. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_34.html">previous</A>, <A HREF="maxima_36.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_36.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Rules and Patterns</TITLE> <link href="maxima_37.html" rel=Next> <link href="maxima_35.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_35.html">previous</A>, <A HREF="maxima_37.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC112" HREF="maxima_toc.html#TOC112">Rules and Patterns</A></H1> <H2><A NAME="SEC113" HREF="maxima_toc.html#TOC113">Introduction to Rules and Patterns</A></H2> <P> This section discusses user defined pattern matching and simplification rules (set up by TELLSIMP, TELLSIMPAFTER, DEFMATCH, or, DEFRULE.) You may affect the main simplification procedures, or else have your rules applied explicityly using APPLY1 and APPLY2. There are additional mechanisms for polynomials rules under TELLRAT, and for commutative and non commutative algebra in chapter on AFFINE. </P> <H2><A NAME="SEC114" HREF="maxima_toc.html#TOC114">Definitions for Rules and Patterns</A></H2> <P> <DL> <DT><U>Function:</U> <B>APPLY1</B> <I>(exp, rule1, ..., rulen)</I> <DD><A NAME="IDX898"></A> repeatedly applies the first rule to exp until it fails, then repeatedly applies the same rule to all subexpressions of exp, left-to-right, until the first rule has failed on all subexpressions. Call the result of transforming exp in this manner exp'. Then the second rule is applied in the same fashion starting at the top of exp'. When the final rule fails on the final subexpression, the application is finished. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>APPLY2</B> <I>(exp, rule1, ..., rulen)</I> <DD><A NAME="IDX899"></A> differs from APPLY1 in that if the first rule fails on a given subexpression, then the second rule is repeatedly applied, etc. Only if they all fail on a given subexpression is the whole set of rules repeatedly applied to the next subexpression. If one of the rules succeeds, then the same subexpression is reprocessed, starting with the first rule. MAXAPPLYDEPTH[10000] is the maximum depth to which APPLY1 and APPLY2 will delve. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>APPLYB1</B> <I>(exp, rule1, ..., rulen)</I> <DD><A NAME="IDX900"></A> is similar to APPLY1 but works from the "bottom up" instead of from the "top down". That is, it processes the smallest subexpression of exp, then the next smallest, etc. MAXAPPLYHEIGHT[10000] - is the maximum height to which APPLYB1 will reach before giving up. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>CURRENT_LET_RULE_PACKAGE</B> <DD><A NAME="IDX901"></A> default:[DEFAULT_LET_RULE_PACKAGE] - the name of the rule package that is presently being used. The user may reset this variable to the name of any rule package previously defined via the LET command. Whenever any of the functions comprising the let package are called with no package name the value of <PRE> CURRENT_LET_RULE_PACKAGE </PRE> <P> is used. If a call such as LETSIMP(expr,rule_pkg_name); is made, the rule package rule_pkg_name is used for that LETSIMP command only, i.e. the value of CURRENT_LET_RULE_PACKAGE is not changed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DEFAULT_LET_RULE_PACKAGE</B> <DD><A NAME="IDX902"></A> - the name of the rule package used when one is not explicitly set by the user with LET or by changing the value of CURRENT_LET_RULE_PACKAGE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEFMATCH</B> <I>(progname, pattern, parm1, ..., parmn)</I> <DD><A NAME="IDX903"></A> creates a function of n+1 arguments with the name progname which tests an expression to see if it can match a particular pattern. The pattern is some expression containing pattern variables and parameters. The parms are given explicitly as arguments to DEFMATCH while the pattern variables (if supplied) were given implicitly in a previous MATCHDECLARE function. The first argument to the created function progname, is an expression to be matched against the "pattern" and the other n arguments are the actual variables occurring in the expression which are to take the place of dummy variables occurring in the "pattern". Thus the parms in the DEFMATCH are like the dummy arguments to the SUBROUTINE statement in FORTRAN. When the function is "called" the actual arguments are substituted. For example: <PRE> (C1) NONZEROANDFREEOF(X,E):= IF E#0 AND FREEOF(X,E) THEN TRUE ELSE FALSE$ (IS(E#0 AND FREEOF(X,E)) is an equivalent function definition) (C2) MATCHDECLARE(A,NONZEROANDFREEOF(X),B,FREEOF(X))$ (C3) DEFMATCH(LINEAR,A*X+B,X)$ This has caused the function LINEAR(exp,var1) to be defined. It </PRE> <P> tests exp to see if it is of the form A*var1+B where A and B do not contain var1 and A is not zero. DEFMATCHed functions return (if the match is successful) a list of equations whose left sides are the pattern variables and parms and whose right sides are the expressions which the pattern variables and parameters matched. The pattern variables, but not the parameters, are set to the matched expressions. If the match fails, the function returns FALSE. Thus LINEAR(3*Z+(Y+1)*Z+Y**2,Z) would return [B=Y**2, A=Y+4, X=Z]. Any variables not declared as pattern variables in MATCHDECLARE or as parameters in DEFMATCH which occur in pattern will match only themselves so that if the third argument to the DEFMATCH in (C4) had been omitted, then LINEAR would only match expressions linear in X, not in any other variable. A pattern which contains no parameters or pattern variables returns TRUE if the match succeeds. Do EXAMPLE(DEFMATCH); for more examples. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DEFRULE</B> <I>(rulename, pattern, replacement)</I> <DD><A NAME="IDX904"></A> defines and names a replacement rule for the given pattern. If the rule named rulename is applied to an expression (by one of the APPLY functions below), every subexpression matching the pattern will be replaced by the replacement. All variables in the replacement which have been assigned values by the pattern match are assigned those values in the replacement which is then simplified. The rules themselves can be treated as functions which will transform an expression by one operation of the pattern match and replacement. If the pattern fails, the original expression is returned. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DISPRULE</B> <I>(rulename1, rulename2, ...)</I> <DD><A NAME="IDX905"></A> will display rules with the names rulename1, rulename2, as were given by DEFRULE, TELLSIMP, or TELLSIMPAFTER or a pattern defined by DEFMATCH. For example, the first rule modifying SIN will be called SINRULE1. DISPRULE(ALL); will display all rules. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LET</B> <I>(prod, repl, predname, arg1, arg2, ..., argn)</I> <DD><A NAME="IDX906"></A> defines a substitution rule for LETSIMP such that prod gets replaced by repl. prod is a product of positive or negative powers of the following types of terms: <UL> <LI> (1) Atoms which LETSIMP will search for literally unless previous to calling LETSIMP the MATCHDECLARE function is used to associate a predicate with the atom. In this case LETSIMP will match the atom to any term of a product satisfying the predicate. <LI> (2) Kernels such as SIN(X), N!, F(X,Y), etc. As with atoms above LETSIMP will look for a literal match unless MATCHDECLARE is used to associate a predicate with the argument of the kernel. A term to a positive power will only match a term having at least that power in the expression being LETSIMPed. A term to a negative power on the other hand will only match a term with a power at least as negative. In the case of negative powers in "product" the switch LETRAT must be set to TRUE (see below). If a predicate is included in the LET function followed by a list of arguments, a tentative match (i.e. one that would be accepted if the predicate were omitted) will be accepted only if predname(arg1',...,argn') evaluates to TRUE where argi' is the value matched to argi. The argi may be the name of any atom or the argument of any kernel appearing in prod. repl may be any rational expression. If any of the atoms or arguments from prod appear in repl the appropriate substitutions will be made. </UL> <P> LETRAT[FALSE] when FALSE, LETSIMP will simplify the numerator and denominator of expr independently and return the result. Substitutions such as N!/N goes to (N-1)! will fail. To handle such situations LETRAT should be set to TRUE, then the numerator, denominator, and their quotient will be simplified in that order. These substitution functions allow you to work with several rulepackages at once. Each rulepackage can contain any number of LETed rules and is referred to by a user supplied name. To insert a rule into the rulepackage name, do LET([prod,repl,pred,arg1,...],name). To apply the rules in rulepackage name, do LETSIMP(expr, name). The function LETSIMP(expr,name1,name2,...) is equivalent to doing LETSIMP(expr,name1) followed by LETSIMP(%,name2) etc. CURRENT_LET_RULE_PACKAGE is the name of the rule package that is presently being used. The user may reset this variable to the name of any rule package previously defined via the LET command. Whenever any of the functions comprising the let package are called with no package name the value of CURRENT_LET_RULE_PACKAGE is used. If a call such as LETSIMP(expr,rule_pkg_name); is made, the rule package rule_pkg_name is used for that LETSIMP command only, i.e. the value of CURRENT_LET_RULE_PACKAGE is not changed. There is a DEFAULT_LET_RULE_PACKAGE which is assumed when no other name is supplied to any of the functions. Whenever a LET includes a rulepackage name that is used as the CURRENT_LET_RULE_PACKAGE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LETRAT</B> <DD><A NAME="IDX907"></A> default: [FALSE] - when FALSE, LETSIMP will simplify the numerator and denominator of expr independently and return the result. Substitutions such as N!/N goes to (N-1)! will fail. To handle such situations LETRAT should be set to TRUE, then the numerator, denominator, and their quotient will be simplified in that order. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LETRULES</B> <I>()</I> <DD><A NAME="IDX908"></A> displays the rules in the current rulepackage. LETRULES(name) displays the rules in the named rulepackage. The current rulepackage is the value of <PRE> CURRENT_LET_RULE_PACKAGE </PRE> <P> The initial value of the rules is <PRE> DEFAULT_LET_RULE_PACKAGE </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>LETSIMP</B> <I>(exp)</I> <DD><A NAME="IDX909"></A> will continually apply the substitution rules previously defined by the function LET until no further change is made to exp. LETSIMP(expr,rule_pkg_name); will cause the rule package rule_pkg_name to be used for that LETSIMP command only, i.e. the value of CURRENT_LET_RULE_PACKAGE is not changed. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LET_RULE_PACKAGES</B> <DD><A NAME="IDX910"></A> default:[DEFAULT_LET_RULE_PACKAGE] - The value of LET_RULE_PACKAGES is a list of all the user-defined let rule packages plus the special package <PRE> DEFAULT_LET_RULE_PACKAGE </PRE> <P> This is the name of the rule package used when one is not explicitly set by the user. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MATCHDECLARE</B> <I>(patternvar, predicate, ...)</I> <DD><A NAME="IDX911"></A> associates a predicate with a pattern variable so that the variable will only match expressions for which the predicate is not FALSE. (The matching is accomplished by one of the functions described below). For example after <PRE> MATCHDECLARE(Q,FREEOF(X,%E)) </PRE> <P> is executed, Q will match any expression not containing X or %E. If the match succeeds then the variable is set to the matched expression. The predicate (in this case FREEOF) is written without the last argument which should be the one against which the pattern variable is to be tested. Note that the patternvar and the arguments to the predicate are evaluated at the time the match is performed. The odd numbered argument may also be a list of pattern variables all of which are to have the associated predicate. Any even number of arguments may be given. For pattern matching, predicates refer to functions which are either FALSE or not FALSE (any non FALSE value acts like TRUE). MATCHDECLARE(var,TRUE) will permit var to match any expression. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MATCHFIX</B> <DD><A NAME="IDX912"></A> - MATCHFIX operators are used to denote functions of any number of arguments which are passed to the function as a list. The arguments occur between the main operator and its "matching" delimiter. The MATCHFIX("x",...) function is a syntax extension function which declares x to be a MATCHFIX operator. The default binding power is 180, and the ARGS inside may be anything. </P> <PRE> (C1) matchfix("|","|"); (D1) "|" (C2) |a|+b; (D2) b + (|a|) (C3) |(a,b)|; (D3) |b| (C4) |[a,b]|; (D4) |[a, b]| (C9) |x|:=IF NUMBERP(x) THEN ABS(x) ELSE (IF LISTP(x) AND APPLY("and",MAP(NUMBERP,x)) THEN SUM(x[i]^2,i,1,LENGTH(x))^0.5 ELSE BUILDQ([u:x],|u|))$ (C10) |[1,2,3]|; (D10) 3.741657386773941 (C18) |-7|; (D18) 7 (C19) |[a,b]|; (D19) |[a, b]| </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>REMLET</B> <I>(prod, name)</I> <DD><A NAME="IDX913"></A> deletes the substitution rule, prod --> repl, most recently defined by the LET function. If name is supplied the rule is deleted from the rule package name. REMLET() and REMLET(ALL) delete all substitution rules from the current rulepackage. If the name of a rulepackage is supplied, e.g. REMLET(ALL,name), the rulepackage, name, is also deleted. If a substitution is to be changed using the same product, REMLET need not be called, just redefine the substitution using the same product (literally) with the LET function and the new replacement and/or predicate name. Should REMLET(product) now be called the original substitution rule will be revived. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMRULE</B> <I>(function, rulename)</I> <DD><A NAME="IDX914"></A> will remove a rule with the name rulename from the function which was placed there by DEFRULE, DEFMATCH, TELLSIMP, or TELLSIMPAFTER. If rule-name is ALL, then all rules will be removed. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TELLSIMP</B> <I>(pattern, replacement)</I> <DD><A NAME="IDX915"></A> is similar to TELLSIMPAFTER but places new information before old so that it is applied before the built-in simplification rules. TELLSIMP is used when it is important to modify the expression before the simplifier works on it, for instance if the simplifier "knows" something about the expression, but what it returns is not to your liking. If the simplifier "knows" something about the main operator of the expression, but is simply not doing enough for you, you probably want to use TELLSIMPAFTER. The pattern may not be a sum, product, single variable, or number. RULES is a list of names having simplification rules added to them by DEFRULE, DEFMATCH, TELLSIMP, or TELLSIMPAFTER. Do EXAMPLE(TELLSIMP); for examples. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TELLSIMPAFTER</B> <I>(pattern, replacement)</I> <DD><A NAME="IDX916"></A> defines a replacement for pattern which the MACSYMA simplifier uses after it applies the built-in simplification rules. The pattern may be anything but a single variable or a number. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_35.html">previous</A>, <A HREF="maxima_37.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_37.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Lists</TITLE> <link href="maxima_38.html" rel=Next> <link href="maxima_36.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_36.html">previous</A>, <A HREF="maxima_38.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC115" HREF="maxima_toc.html#TOC115">Lists</A></H1> <H2><A NAME="SEC116" HREF="maxima_toc.html#TOC116">Introduction to Lists</A></H2> <P> Lists are the basic building block for maxima and lisp. All data types other than arrays, hash tables, numbers are represented as lisp lists, These lisp lists have the form <PRE> ((mplus) $A 2) </PRE> <P> to indicate an expression <CODE>A+2</CODE>. At maxima level one would see the infix notation <CODE>A+2</CODE>. Maxima also has lists which are printed as <PRE> [1, 2, 7, x+y] </PRE> <P> for a list with 4 elements. Internally this corresponds to a lisp list of the form <PRE> ((mlist) 1 2 7 ((mplus) $X $Y )) </PRE> <P> The flag which denotes the type field of the maxima expression is a list itself, since after it has been through the simplifier the list would become <PRE> ((mlist simp) 1 2 7 ((mplus simp) $X $Y)) </PRE> <H2><A NAME="SEC117" HREF="maxima_toc.html#TOC117">Definitions for Lists</A></H2> <P> <DL> <DT><U>Function:</U> <B>APPEND</B> <I>(list1, list2, ...)</I> <DD><A NAME="IDX917"></A> returns a single list of the elements of list1 followed by the elements of list2,... APPEND also works on general expressions, e.g. APPEND(F(A,B), F(C,D,E)); -> F(A,B,C,D,E). Do EXAMPLE(APPEND); for an example. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASSOC</B> <I>(exp)</I> <DD><A NAME="IDX918"></A> This function searches for the key in the left hand side of the input list of the form [x,y,z...] where each of the list elements is a expression of a binary operand and 2 elements. For example x=1, 2^3, [a,b] etc. The key checked againts the first operand and and returns the second operand if the key is found. If the key is not found it either returns the default value if supplied or false. </DL> <DL> <DT><U>Function:</U> <B>ATOM</B> <I>(exp)</I> <DD><A NAME="IDX919"></A> is TRUE if exp is atomic (i.e. a number or name) else FALSE. Thus ATOM(5) is TRUE while ATOM(A[1]) and ATOM(SIN(X)) are FALSE. (Assuming A[1] and X are unbound.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CONS</B> <I>(exp, list)</I> <DD><A NAME="IDX920"></A> returns a new list constructed of the element exp as its first element, followed by the elements of list. CONS also works on other expressions, e.g. CONS(X, F(A,B,C)); -> F(X,A,B,C). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>COPYLIST</B> <I>(L)</I> <DD><A NAME="IDX921"></A> creates a copy of the list L. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>DELETE</B> <I>(exp1, exp2)</I> <DD><A NAME="IDX922"></A> removes all occurrences of exp1 from exp2. Exp1 may be a term of exp2 (if it is a sum) or a factor of exp2 (if it is a product). <PRE> (C1) DELETE(SIN(X),X+SIN(X)+Y); (D1) Y + X </PRE> <P> DELETE(exp1, exp2, integer) removes the first integer occurrences of exp1 from exp2. Of course, if there are fewer than integer occurrences of exp1 in exp2 then all occurrences will be deleted. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ENDCONS</B> <I>(exp, list)</I> <DD><A NAME="IDX923"></A> returns a new list consisting of the elements of list followed by exp. ENDCONS also works on general expressions, e.g. ENDCONS(X, F(A,B,C)); -> F(A,B,C,X). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EVERY</B> <I>(exp)</I> <DD><A NAME="IDX924"></A> This function takes a list, or a positive number of arguments and returns true if all its arguments are not false. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FIRST</B> <I>(exp) SECOND (exp) .. TENTH (exp)</I> <DD><A NAME="IDX925"></A> yields the first part of exp which may result in the first element of a list, the first row of a matrix, the first term of a sum, etc. Note that FIRST and its related functions, REST and LAST, work on the form of exp which is displayed not the form which is typed on input. If the variable INFLAG [FALSE] is set to TRUE however, these functions will look at the internal form of exp. Note that the simplifier re-orders expressions. Thus FIRST(X+Y) will be X if INFLAG is TRUE and Y if INFLAG is FALSE. (FIRST(Y+X) gives the same results). The functions SECOND .. TENTH yield the second through the tenth part of their input argument. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLATTEN(exp)</B> <DD><A NAME="IDX926"></A> Takes a list of the form [[1,2],[3,4]] and returns [1,2,3,4]. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GET</B> <I>(a, i)</I> <DD><A NAME="IDX927"></A> retrieves the user property indicated by i associated with atom a or returns FALSE if a doesn't have property i. <PRE> (C1) PUT(%E,'TRANSCENDENTAL,'TYPE); (D1) TRANSCENDENTAL (C2) PUT(%PI,'TRANSCENDENTAL,'TYPE)$ (C3) PUT(%I,'ALGEBRAIC,'TYPE)$ (C4) TYPEOF(EXP) := BLOCK([Q], IF NUMBERP(EXP) THEN RETURN('ALGEBRAIC), IF NOT ATOM(EXP) THEN RETURN(MAPLIST('TYPEOF, EXP)), Q : GET(EXP, 'TYPE), IF Q=FALSE THEN ERRCATCH(ERROR(EXP,"is not numeric.")) ELSE Q)$ (C5) TYPEOF(2*%E+X*%PI); X is not numeric. (D5) [[TRANSCENDENTAL, []], [ALGEBRAIC, TRANSCENDENTAL]] (C6) TYPEOF(2*%E+%PI); (D6) [TRANSCENDENTAL, [ALGEBRAIC, TRANSCENDENTAL]] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>LAST</B> <I>(exp)</I> <DD><A NAME="IDX928"></A> yields the last part (term, row, element, etc.) of the exp. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LENGTH</B> <I>(exp)</I> <DD><A NAME="IDX929"></A> gives (by default) the number of parts in the external (displayed) form of exp. For lists this is the number of elements, for matrices it is the number of rows, and for sums it is the number of terms. (See DISPFORM). The LENGTH command is affected by the INFLAG switch [default FALSE]. So, e.g. LENGTH(A/(B*C)); gives 2 if INFLAG is FALSE (Assuming EXPTDISPFLAG is TRUE), but 3 if INFLAG is TRUE (the internal representation is essentially A*B^-1*C^-1). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>LISTARITH</B> <DD><A NAME="IDX930"></A> default: [TRUE] - if FALSE causes any arithmetic operations with lists to be suppressed; when TRUE, list-matrix operations are contagious causing lists to be converted to matrices yielding a result which is always a matrix. However, list-list operations should return lists. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>LISTP</B> <I>(exp)</I> <DD><A NAME="IDX931"></A> is TRUE if exp is a list else FALSE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAKELIST</B> <I>(exp,var,lo,hi)</I> <DD><A NAME="IDX932"></A> returns a list as value. MAKELIST may be called as MAKELIST(exp,var,lo,hi) ["lo" and "hi" must be integers], or as MAKELIST(exp,var,list). In the first case MAKELIST is analogous to SUM, whereas in the second case MAKELIST is similar to MAP. Examples: <PRE> MAKELIST(CONCAT(X,I),I,1,6) yields [X1,X2,X3,X4,X5,X6] MAKELIST(X=Y,Y,[A,B,C]) yields [X=A,X=B,X=C] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>MEMBER</B> <I>(exp, list)</I> <DD><A NAME="IDX933"></A> returns TRUE if exp occurs as a member of list (not within a member). Otherwise FALSE is returned. Member also works on non-list expressions, e.g. MEMBER(B, F(A,B,C)); -> TRUE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REST</B> <I>(exp, n)</I> <DD><A NAME="IDX934"></A> yields exp with its first n elements removed if n is positive and its last -n elements removed if n is negative. If n is 1 it may be omitted. Exp may be a list, matrix, or other expression. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REVERSE</B> <I>(list)</I> <DD><A NAME="IDX935"></A> reverses the order of the members of the list (not the members themselves). REVERSE also works on general expressions, e.g. REVERSE(A=B); gives B=A. REVERSE default: [FALSE] - in the Plotting functions, if TRUE cause a left-handed coordinate system to be assumed. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_36.html">previous</A>, <A HREF="maxima_38.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_38.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Function Definition</TITLE> <link href="maxima_39.html" rel=Next> <link href="maxima_37.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_37.html">previous</A>, <A HREF="maxima_39.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC118" HREF="maxima_toc.html#TOC118">Function Definition</A></H1> [...1244 lines suppressed...] <P> <DL> <DT><U>Function:</U> <B>DECLARE_TRANSLATED</B> <I>(FN1,FN2..)</I> <DD><A NAME="IDX990"></A> When translating a file of macsyma code to lisp, it is important for the translator to know which functions it sees in the file are to be called as translated or compiled functions, and which ones are just macsyma functions or undefined. Putting this declaration at the top of the file, lets it know that although a symbol does which does not yet have a lisp function value, will have one at call time. (MFUNCTION-CALL fn arg1 arg2.. ) is generated when the translator does not know fn is going to be a lisp function. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_37.html">previous</A>, <A HREF="maxima_39.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_39.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Program Flow</TITLE> <link href="maxima_40.html" rel=Next> <link href="maxima_38.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_38.html">previous</A>, <A HREF="maxima_40.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC126" HREF="maxima_toc.html#TOC126">Program Flow</A></H1> <H2><A NAME="SEC127" HREF="maxima_toc.html#TOC127">Introduction to Program Flow</A></H2> <P> MACSYMA provides a DO loop for iteration, as well as more primitive constructs such as GO. </P> <H2><A NAME="SEC128" HREF="maxima_toc.html#TOC128">Definitions for Program Flow</A></H2> <P> <DL> <DT><U>Variable:</U> <B>BACKTRACE</B> <DD><A NAME="IDX991"></A> default: [] (when DEBUGMODE:ALL has been done) has as value a list of all functions currently entered. </P> </DL> <P> <DL> <DT><U>special operator:</U> <B>DO</B> <DD><A NAME="IDX992"></A> - The DO statement is used for performing iteration. Due to its great generality the DO statement will be described in two parts. First the usual form will be given which is analogous to that used in several other programming languages (FORTRAN, ALGOL, PL/I, etc.); then the other features will be mentioned. 1. There are three variants of this form that differ only in their terminating conditions. They are: <UL> <LI> (a) FOR variable : initial-value STEP increment THRU limit DO body <LI> (b) FOR variable : initial-value STEP increment WHILE condition DO body <LI> (c) FOR variable : initial-value STEP increment UNLESS condition DO body </UL> <P> (Alternatively, the STEP may be given after the termination condition or limit.) The initial-value, increment, limit, and body can be any expressions. If the increment is 1 then "STEP 1" may be omitted. The execution of the DO statement proceeds by first assigning the initial-value to the variable (henceforth called the control-variable). Then: (1) If the control-variable has exceeded the limit of a THRU specification, or if the condition of the UNLESS is TRUE, or if the condition of the WHILE is FALSE then the DO terminates. (2) The body is evaluated. (3) The increment is added to the control-variable. The process from (1) to (3) is performed repeatedly until the termination condition is satisfied. One may also give several termination conditions in which case the DO terminates when any of them is satisfied. In general the THRU test is satisfied when the control-variable is greater than the limit if the increment was non-negative, or when the control-variable is less than the limit if the increment was negative. The increment and limit may be non-numeric expressions as long as this inequality can be determined. However, unless the increment is syntactically negative (e.g. is a negative number) at the time the DO statement is input, MACSYMA assumes it will be positive when the DO is executed. If it is not positive, then the DO may not terminate properly. Note that the limit, increment, and termination condition are evaluated each time through the loop. Thus if any of these involve much computation, and yield a result that does not change during all the executions of the body, then it is more efficient to set a variable to their value prior to the DO and use this variable in the DO form. The value normally returned by a DO statement is the atom DONE, as every statement in MACSYMA returns a value. However, the function RETURN may be used inside the body to exit the DO prematurely and give it any desired value. Note however that a RETURN within a DO that occurs in a BLOCK will exit only the DO and not the BLOCK. Note also that the GO function may not be used to exit from a DO into a surrounding BLOCK. The control-variable is always local to the DO and thus any variable may be used without affecting the value of a variable with the same name outside of the DO. The control-variable is unbound after the DO terminates. <PRE> (C1) FOR A:-3 THRU 26 STEP 7 DO LDISPLAY(A)$ (E1) A = -3 (E2) A = 4 (E3) A = 11 (E4) A = 18 (E5) A = 25 </PRE> <P> The function LDISPLAY generates intermediate labels; DISPLAY does not. <PRE> (C6) S:0$ (C7) FOR I:1 WHILE I<=10 DO S:S+I; (D7) DONE (C8) S; (D8) 55 </PRE> <P> Note that the condition in C7 is equivalent to UNLESS I > 10 and also THRU 10 <PRE> (C9) SERIES:1$ (C10) TERM:EXP(SIN(X))$ (C11) FOR P:1 UNLESS P>7 DO (TERM:DIFF(TERM,X)/P, SERIES:SERIES+SUBST(X=0,TERM)*X^P)$ (C12) SERIES; 7 6 5 4 2 (D12) X X X X X -- - -- - -- - -- + -- + X + 1 96 240 15 8 2 which gives 8 terms of the Taylor series for e^sin(x). (C13) POLY:0$ (C14) FOR I:1 THRU 5 DO FOR J:I STEP -1 THRU 1 DO POLY:POLY+I*X^J$ (C15) POLY; 5 4 3 2 (D15) 5 X + 9 X + 12 X + 14 X + 15 X (C16) GUESS:-3.0$ (C17) FOR I:1 THRU 10 DO (GUESS:SUBST(GUESS,X,.5*(X+10/X)), IF ABS(GUESS^2-10)<.00005 THEN RETURN(GUESS)); (D17) - 3.1622807 </PRE> <P> This example computes the negative square root of 10 using the Newton- Raphson iteration a maximum of 10 times. Had the convergence criterion not been met the value returned would have been "DONE". Additional Forms of the DO Statement Instead of always adding a quantity to the control-variable one may sometimes wish to change it in some other way for each iteration. In this case one may use "NEXT expression" instead of "STEP increment". This will cause the control-variable to be set to the result of evaluating expression each time through the loop. <PRE> (C1) FOR COUNT:2 NEXT 3*COUNT THRU 20 DO DISPLAY(COUNT)$ COUNT = 2 COUNT = 6 COUNT = 18 </PRE> <P> As an alternative to FOR variable:value ...DO... the syntax FOR variable FROM value ...DO... may be used. This permits the "FROM value" to be placed after the step or next value or after the termination condition. If "FROM value" is omitted then 1 is used as the initial value. Sometimes one may be interested in performing an iteration where the control-variable is never actually used. It is thus permissible to give only the termination conditions omitting the initialization and updating information as in the following example to compute the square-root of 5 using a poor initial guess. <PRE> (C1) X:1000; (C2) THRU 10 WHILE X#0.0 DO X:.5*(X+5.0/X)$ (C3) X; (D3) 2.236068 </PRE> <P> If it is desired one may even omit the termination conditions entirely and just give "DO body" which will continue to evaluate the body indefinitely. In this case the function RETURN should be used to terminate execution of the DO. <PRE> (C1) NEWTON(F,GUESS):= BLOCK([NUMER,Y], LOCAL(DF), NUMER:TRUE, DEFINE(DF(X),DIFF(F(X),X)), DO (Y:DF(GUESS), IF Y=0.0 THEN ERROR("Derivative at:",GUESS," is zero."), GUESS:GUESS-F(GUESS)/Y, IF ABS(F(GUESS))<5.0E-6 THEN RETURN(GUESS)))$ (C2) SQR(X):=X^2-5.0$ (C3) NEWTON(SQR,1000); (D3) 2.236068 </PRE> <P> (Note that RETURN, when executed, causes the current value of GUESS to be returned as the value of the DO. The BLOCK is exited and this value of the DO is returned as the value of the BLOCK because the DO is the last statement in the block.) One other form of the DO is available in MACSYMA. The syntax is: </P> <PRE> FOR variable IN list [end-tests] DO body </PRE> <P> The members of the list are any expressions which will successively be assigned to the variable on each iteration of the body. The optional end-tests can be used to terminate execution of the DO; otherwise it will terminate when the list is exhausted or when a RETURN is executed in the body. (In fact, list may be any non-atomic expression, and successive parts are taken.) <PRE> (C1) FOR F IN [LOG, RHO, ATAN] DO LDISP(F(1))$ (E1) 0 (E2) RHO(1) %PI (E3) --- 4 (C4) EV(E3,NUMER); (D4) 0.78539816 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>ERRCATCH</B> <I>(exp1, exp2, ...)</I> <DD><A NAME="IDX993"></A> evaluates its arguments one by one and returns a list of the value of the last one if no error occurs. If an error occurs in the evaluation of any arguments, ERRCATCH "catches" the error and immediately returns [] (the empty list). This function is useful in BATCH files where one suspects an error might occur which would otherwise have terminated the BATCH if the error weren't caught. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ERREXP</B> <DD><A NAME="IDX994"></A> default: [ERREXP] When an error occurs in the course of a computation, MACSYMA prints out an error message and terminates the computation. ERREXP is set to the offending expression and the message "ERREXP contains the offending expression" is printed. The user can then type ERREXP; to see this and hopefully find the problem. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ERROR</B> <I>(arg1, arg2, ...)</I> <DD><A NAME="IDX995"></A> will evaluate and print its arguments and then will cause an error return to top level MACSYMA or to the nearest enclosing ERRCATCH. This is useful for breaking out of nested functions if an error condition is detected, or wherever one can't type control-^. The variable ERROR is set to a list describing the error, the first of it being a string of text, and the rest the objects in question. ERRORMSG(); is the preferred way to see the last error message. ERRORFUN default: [FALSE] - if set to the name of a function of no arguments will cause that function to be executed whenever an error occurs. This is useful in BATCH files where the user may want his MACSYMA killed or his terminal logged out if an error occurs. In these cases ERRORFUN would be set to QUIT or LOGOUT. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ERRORFUN</B> <DD><A NAME="IDX996"></A> default: [FALSE] - if set to the name of a function of no arguments will cause that function to be executed whenever an error occurs. This is useful in BATCH files where the user may want his MACSYMA killed or his terminal logged out if an error occurs. In these cases ERRORFUN would be set to QUIT or LOGOUT. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ERRORMSG</B> <I>()</I> <DD><A NAME="IDX997"></A> reprints the last error message. This is very helpful if you are using a display console and the message has gone off the screen. The variable ERROR is set to a list describing the error, the first of it being a string of text, and the rest the objects in question. TTYINTFUN:LAMBDA([],ERRORMSG(),PRINT(""))$ will set up the user-interrupt character (^U) to reprint the message. </P> </DL> <P> <DL> <DT><U>special operator:</U> <B>FOR</B> <DD><A NAME="IDX998"></A> - Used in iterations, do DESCRIBE("DO"); for a description of MACSYMA's iteration facilities. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>GO</B> <I>(tag)</I> <DD><A NAME="IDX999"></A> is used within a BLOCK to transfer control to the statement of the block which is tagged with the argument to GO. To tag a statement, precede it by an atomic argument as another statement in the BLOCK. For example: <PRE> BLOCK([X],X:1,LOOP,X+1,...,GO(LOOP),...) </PRE> <P> . The argument to GO must be the name of a tag appearing in the same BLOCK. One cannot use GO to transfer to tag in a BLOCK other than the one containing the GO. </P> </DL> <P> <DL> <DT><U>special operator:</U> <B>IF</B> <DD><A NAME="IDX1000"></A> - The IF statement is used for conditional execution. The syntax is: <PRE> IF condition THEN expression1 ELSE expression2. </PRE> <P> The result of an IF statement is expression1 if condition is true and expression2 if it is false. expression1 and expression2 are any MACSYMA expressions (including nested IF statements), and condition is an expression which evaluates to TRUE or FALSE and is composed of relational and logical operators which are as follows: <PRE> Operator name Symbol Type greater than > relational infix equal to = , EQUAL " " not equal to # " " less than < " " greater than >= or equal to " " less than <= or equal to " " and AND logical infix or OR " " not NOT logical prefix </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>LISPDEBUGMODE</B> <I>()</I> <DD><A NAME="IDX1001"></A> LISPDEBUGMODE(); DEBUGPRINTMODE(); and DEBUG(); make available to the user debugging features used by systems programmers. These tools are powerful, and although some conventions are different from the usual macsyma level it is felt their use is very intuitive. [Some printout may be verbose for slow terminals, there are switches for controlling this.] These commands were designed for the user who must debug translated macsyma code, as such they are a boon. See MACDOC;TRDEBG USAGE for more information. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAP</B> <I>(fn, exp1, exp2, ...)</I> <DD><A NAME="IDX1002"></A> returns an expression whose leading operator is the same as that of the expi but whose subparts are the results of applying fn to the corresponding subparts of the expi. Fn is either the name of a function of n arguments (where n is the number of expi) or is a LAMBDA form of n arguments. MAPERROR[TRUE] - if FALSE will cause all of the mapping functions to (1) stop when they finish going down the shortest expi if not all of the expi are of the same length and (2) apply fn to [exp1, exp2,...] if the expi are not all the same type of object. If MAPERROR is TRUE then an error message will be given in the above two instances. One of the uses of this function is to MAP a function (e.g. PARTFRAC) onto each term of a very large expression where it ordinarily wouldn't be possible to use the function on the entire expression due to an exhaustion of list storage space in the course of the computation. <PRE> (C1) MAP(F,X+A*Y+B*Z); (D1) F(B Z) + F(A Y) + F(X) (C2) MAP(LAMBDA([U],PARTFRAC(U,X)),X+1/(X^3+4*X^2+5*X+2)); 1 1 1 (D2) ----- - ----- + -------- + X X + 2 X + 1 2 (X + 1) (C3) MAP(RATSIMP, X/(X^2+X)+(Y^2+Y)/Y); 1 (D3) Y + ----- + 1 X + 1 (C4) MAP("=",[A,B],[-0.5,3]); (D4) [A = - 0.5, B = 3] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>MAPATOM</B> <I>(expr)</I> <DD><A NAME="IDX1003"></A> is TRUE if and only if expr is treated by the MAPping routines as an "atom", a unit. "Mapatoms" are atoms, numbers (including rational numbers), and subscripted variables. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAPERROR</B> <DD><A NAME="IDX1004"></A> default: [TRUE] - if FALSE will cause all of the mapping functions, for example <PRE> MAP(fn,exp1,exp2,...)) </PRE> <P> to (1) stop when they finish going down the shortest expi if not all of the expi are of the same length and (2) apply fn to [exp1, exp2,...] if the expi are not all the same type of object. If MAPERROR is TRUE then an error message will be given in the above two instances. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAPLIST</B> <I>(fn, exp1, exp2, ...)</I> <DD><A NAME="IDX1005"></A> yields a list of the applications of fn to the parts of the expi. This differs from MAP(fn,exp1,exp2,...) which returns an expression with the same main operator as expi has (except for simplifications and the case where MAP does an APPLY). Fn is of the same form as in MAP. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>PREDERROR</B> <DD><A NAME="IDX1006"></A> default: [TRUE] - If TRUE, an error message is signalled whenever the predicate of an IF statement or an IS function fails to evaluate to either TRUE or FALSE. If FALSE, UNKNOWN is returned instead in this case. The PREDERROR:FALSE mode is not supported in translated code. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RETURN</B> <I>(value)</I> <DD><A NAME="IDX1007"></A> may be used to exit explicitly from a BLOCK, bringing its argument. Do DESCRIBE(BLOCK); for more information. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SCANMAP</B> <I>(function,exp)</I> <DD><A NAME="IDX1008"></A> recursively applies function to exp, in a "top down" manner. This is most useful when "complete" factorization is desired, for example: <PRE> (C1) EXP:(A^2+2*A+1)*Y + X^2$ (C2) SCANMAP(FACTOR,EXP); 2 2 (D2) (A + 1) Y + X </PRE> <P> Note the way in which SCANMAP applies the given function FACTOR to the constituent subexpressions of exp; if another form of exp is presented to SCANMAP then the result may be different. Thus, D2 is not recovered when SCANMAP is applied to the expanded form of exp: <PRE> (C3) SCANMAP(FACTOR,EXPAND(EXP)); 2 2 (D3) A Y + 2 A Y + Y + X </PRE> <P> Here is another example of the way in which SCANMAP recursively applies a given function to all subexpressions, including exponents: <PRE> (C4) EXPR : U*V^(A*X+B) + C$ (C5) SCANMAP('F, EXPR); F(F(F(A) F(X)) + F(B)) (D5) F(F(F(U) F(F(V) )) + F(C)) </PRE> <P> SCANMAP(function,expression,BOTTOMUP) applies function to exp in a "bottom-up" manner. E.g., for undefined F, </P> <PRE> SCANMAP(F,A*X+B) -> F(A*X+B) -> F(F(A*X)+F(B)) -> F(F(F(A)*F(X))+F(B)) SCANMAP(F,A*X+B,BOTTOMUP) -> F(A)*F(X)+F(B) -> F(F(A)*F(X))+F(B) -> F(F(F(A)*F(X))+F(B)) </PRE> <P> In this case, you get the same answer both ways. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>THROW</B> <I>(exp)</I> <DD><A NAME="IDX1009"></A> evaluates exp and throws the value back to the most recent CATCH. THROW is used with CATCH as a structured nonlocal exit mechanism. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_38.html">previous</A>, <A HREF="maxima_40.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_4.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Operators</TITLE> <link href="maxima_5.html" rel=Next> <link href="maxima_3.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_3.html">previous</A>, <A HREF="maxima_5.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC11" HREF="maxima_toc.html#TOC11">Operators</A></H1> <H2><A NAME="SEC12" HREF="maxima_toc.html#TOC12">NARY</A></H2> <P> - An NARY operator is used to denote a function of any number of arguments, each of which is separated by an occurrence of the operator, e.g. A+B or A+B+C. The NARY("x") function is a syntax extension function to declare x to be an NARY operator. Do DESCRIBE(SYNTAX); for more details. Functions may be DECLAREd to be NARY. If DECLARE(J,NARY); is done, this tells the simplifier to simplify, e.g. J(J(A,B),J(C,D)) to J(A, B, C, D). </P> <H2><A NAME="SEC13" HREF="maxima_toc.html#TOC13">NOFIX</A></H2> <P> - NOFIX operators are used to denote functions of no arguments. The mere presence of such an operator in a command will cause the corresponding function to be evaluated. For example, when one types "exit;" to exit from a MACSYMA break, "exit" is behaving similar to a NOFIX operator. The function NOFIX("x") is a syntax extension function which declares x to be a NOFIX operator. Do DESCRIBE(SYNTAX); for more details. </P> <H2><A NAME="SEC14" HREF="maxima_toc.html#TOC14">OPERATOR</A></H2> <P> - See OPERATORS </P> <H2><A NAME="SEC15" HREF="maxima_toc.html#TOC15">POSTFIX</A></H2> <P> - POSTFIX operators like the PREFIX variety denote functions of a single argument, but in this case the argument immediately precedes an occurrence of the operator in the input string, e.g. 3! . The POSTFIX("x") function is a syntax extension function to declare x to be a POSTFIX operator. Do DESCRIBE(SYNTAX); for details. </P> <H2><A NAME="SEC16" HREF="maxima_toc.html#TOC16">PREFIX</A></H2> <P> - A PREFIX operator is one which signifies a function of one argument, which argument immediately follows an occurrence of the operator. PREFIX("x") is a syntax extension function to declare x to be a PREFIX operator. Do DESCRIBE(SYNTAX); for more details. </P> <H2><A NAME="SEC17" HREF="maxima_toc.html#TOC17">Definitions for Operators</A></H2> <P> <DL> <DT><U>operator:</U> <B>"!"</B> <DD><A NAME="IDX37"></A> The factorial operator, which is the product of all the integers from 1 up to its argument. Thus 5! = 1*2*3*4*5 = 120. The value of /the option FACTLIM (default: [-1]) gives the highest factorial which is automatically expanded. If it is -1 then all integers are expanded. See also the FACTORIAL, MINFACTORIAL, and FACTCOMB commands. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"!!"</B> <DD><A NAME="IDX38"></A> Stands for double factorial which is defined as the product of all the consecutive odd (or even) integers from 1 (or 2) to the odd (or even) argument. Thus 8!! is 2*4*6*8 = 384. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"#"</B> <DD><A NAME="IDX39"></A> The logical operator "Not equals". </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"."</B> <DD><A NAME="IDX40"></A> The dot operator, for matrix (non-commutative) multiplication. When "." is used in this way, spaces should be left on both sides of it, e.g. A . B. This distinguishes it plainly from a decimal point in a floating point number. Do APROPOS(DOT); for a list of the switches which affect the dot operator. DESCRIBE(switch-name); will explain them. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>":"</B> <DD><A NAME="IDX41"></A> The assignment operator. E.g. A:3 sets the variable A to 3. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"::"</B> <DD><A NAME="IDX42"></A> Assignment operator. :: assigns the value of the expression on its right to the value of the quantity on its left, which must evaluate to an atomic variable or subscripted variable. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"::="</B> <DD><A NAME="IDX43"></A> The "::=" is used instead of ":=" to indicate that what follows is a macro definition, rather than an ordinary functional definition. See DESCRIBE(MACROS). </P> </DL> <P> <DL> <DT><U>operator:</U> <B>":="</B> <DD><A NAME="IDX44"></A> The function definition operator. E.g. F(X):=SIN(X) defines a function F. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>"="</B> <DD><A NAME="IDX45"></A> denotes an equation to MACSYMA. To the pattern matcher in MACSYMA it denotes a total relation that holds between two expressions if and only if the expressions are syntactically identical. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ABS</B> <I>(exp)</I> <DD><A NAME="IDX46"></A> returns the absolute value exp. If exp is complex, returns the complex modulus of exp. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>ADDITIVE</B> <DD><A NAME="IDX47"></A> - If DECLARE(F,ADDITIVE) has been executed, then: (1) If F is univariate, whenever the simplifier encounters F applied to a sum, F will be distributed over that sum. I.e. F(Y+X); will simplify to F(Y)+F(X). (2) If F is a function of 2 or more arguments, additivity is defined as additivity in the first argument to F, as in the case of 'SUM or 'INTEGRATE, i.e. F(H(X)+G(X),X); will simplify to F(H(X),X)+F(G(X),X). This simplification does not occur when F is applied to expressions of the form SUM(X[I],I,lower-limit,upper-limit). </P> </DL> <P> <DL> <DT><U>keyword:</U> <B>ALLBUT</B> <DD><A NAME="IDX48"></A> works with the PART commands (i.e. PART, INPART, SUBSTPART, SUBSTINPART, DPART, and LPART). For example, </P> <PRE> if EXPR is E+D+C+B+A, then PART(EXPR,[2,5]); ==> D+A </PRE> <P> while <PRE> PART(EXPR,ALLBUT(2,5))==>E+C+B </PRE> <P> It also works with the KILL command, <PRE> KILL(ALLBUT(name1,...,namek)) </PRE> <P> will do a KILL(ALL) except it will not KILL the names specified. Note: namei means a name such as function name such as U, F, FOO, or G, not an infolist such as FUNCTIONS. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>ANTISYMMETRIC</B> <DD><A NAME="IDX49"></A> - If DECLARE(H,ANTISYMMETRIC); is done, this tells the simplifier that H is antisymmetric. E.g. H(X,Z,Y) will simplify to - H(X, Y, Z). That is, it will give (-1)^n times the result given by SYMMETRIC or COMMUTATIVE, where n is the number of interchanges of two arguments necessary to convert it to that form. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CABS</B> <I>(exp)</I> <DD><A NAME="IDX50"></A> returns the complex absolute value (the complex modulus) of exp. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>COMMUTATIVE</B> <DD><A NAME="IDX51"></A> - If DECLARE(H,COMMUTATIVE); is done, this tells the simplifier that H is a commutative function. E.g. H(X,Z,Y) will simplify to H(X, Y, Z). This is the same as SYMMETRIC. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ENTIER</B> <I>(X)</I> <DD><A NAME="IDX52"></A> largest integer <= X where X is numeric. FIX (as in FIXnum) is a synonym for this, so FIX(X); is precisely the same. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EQUAL</B> <I>(expr1,expr2)</I> <DD><A NAME="IDX53"></A> used with an "IS", returns TRUE (or FALSE) if and only if expr1 and expr2 are equal (or not equal) for all possible values of their variables (as determined by RATSIMP). Thus IS(EQUAL((X+1)**2,X**2+2*X+1)) returns TRUE whereas if X is unbound IS((X+1)**2=X**2+2*X+1) returns FALSE. Note also that IS(RAT(0)=0) gives FALSE but IS(EQUAL(RAT(0),0)) gives TRUE. If a determination can't be made with EQUAL then a simplified but equivalent form is returned whereas = always causes either TRUE or FALSE to be returned. All variables occurring in exp are presumed to be real valued. EV(exp,PRED) is equivalent to IS(exp). <PRE> (C1) IS(X**2 >= 2*X-1); (D1) TRUE (C2) ASSUME(A>1); (D2) DONE (C3) IS(LOG(LOG(A+1)+1)>0 AND A^2+1>2*A); (D3) TRUE </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>EVAL</B> <DD><A NAME="IDX54"></A> causes an extra post-evaluation of exp to occur. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EVENP</B> <I>(exp)</I> <DD><A NAME="IDX55"></A> is TRUE if exp is an even integer. FALSE is returned in all other cases. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FIX</B> <I>(x)</I> <DD><A NAME="IDX56"></A> a synonym for ENTIER(X) - largest integer <= X where X is numeric. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FULLMAP</B> <I>(fn, exp1, ...)</I> <DD><A NAME="IDX57"></A> is similar to MAP but it will keep mapping down all subexpressions until the main operators are no longer the same. The user should be aware that FULLMAP is used by the MACSYMA simplifier for certain matrix manipulations; thus, the user might see an error message concerning FULLMAP even though FULLMAP was not explicitly called by the user. <PRE> (C1) A+B*C$ (C2) FULLMAP(G,%); (D2) G(B) G(C) + G(A) (C3) MAP(G,D1); (D3) G(B C) + G(A) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>FULLMAPL</B> <I>(fn, list1, ...)</I> <DD><A NAME="IDX58"></A> is similar to FULLMAP but it only maps onto lists and matrices <PRE> (C1) FULLMAPL("+",[3,[4,5]],[[A,1],[0,-1.5]]); (D1) [[A + 3, 4], [4, 3.5]] </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>IS</B> <I>(exp)</I> <DD><A NAME="IDX59"></A> attempts to determine whether exp (which must evaluate to a predicate) is provable from the facts in the current data base. IS returns TRUE if the predicate is true for all values of its variables consistent with the data base and returns FALSE if it is false for all such values. Otherwise, its action depends on the setting of the switch PREDERROR (default: TRUE). IS errs out if the value of PREDERROR is TRUE and returns UNKNOWN if PREDERROR is FALSE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ISQRT</B> <I>(X)</I> <DD><A NAME="IDX60"></A> takes one integer argument and returns the "integer SQRT" of its absolute value. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MAX</B> <I>(X1, X2, ...)</I> <DD><A NAME="IDX61"></A> yields the maximum of its arguments (or returns a simplified form if some of its arguments are non-numeric). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MIN</B> <I>(X1, X2, ...)</I> <DD><A NAME="IDX62"></A> yields the minimum of its arguments (or returns a simplified form if some of its arguments are non-numeric). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>MOD</B> <I>(poly)</I> <DD><A NAME="IDX63"></A> converts the polynomial poly to a modular representation with respect to the current modulus which is the value of the variable MODULUS. MOD(poly,m) specifies a MODULUS m to be used for converting poly, if it is desired to override the current global value of MODULUS. See DESCRIBE(MODULUS); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ODDP</B> <I>(exp)</I> <DD><A NAME="IDX64"></A> is TRUE if exp is an odd integer. FALSE is returned in all other cases. </P> </DL> <P> <DL> <DT><U>operator:</U> <B>PRED</B> <DD><A NAME="IDX65"></A> (EVFLAG) causes predicates (expressions which evaluate to TRUE or FALSE) to be evaluated. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RANDOM</B> <I>(X)</I> <DD><A NAME="IDX66"></A> returns a random integer between 0 and X-1. If no argument is given then a random integer between -2^(29) and 2^(29) -1 is returned. If X is FALSE then the random sequence is restarted from the beginning. Note that the range of the returned result when no argument is given differs in NIL MACSYMA from that of PDP-10 and Multics MACSYMA, which is -2^(35) to 2^(35) -1. This range is the range of the FIXNUM datatype of the underlying LISP. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SIGN</B> <I>(exp)</I> <DD><A NAME="IDX67"></A> attempts to determine the sign of its specified expression on the basis of the facts in the current data base. It returns one of the following answers: POS (positive), NEG (negative), ZERO, PZ (positive or zero), NZ (negative or zero), PN (positive or negative), or PNZ (positive, negative, or zero, i.e. nothing known). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SIGNUM</B> <I>(X)</I> <DD><A NAME="IDX68"></A> if X<0 then -1 else if X>0 then 1 else 0. If X is not numeric then a simplified but equivalent form is returned. For example, SIGNUM(-X) gives -SIGNUM(X). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SORT</B> <I>(list,optional-predicate)</I> <DD><A NAME="IDX69"></A> sorts the list using a suitable optional-predicate of two arguments (such as "<" or ORDERLESSP). If the optional-predicate is not given, then MACSYMA's built-in ordering predicate is used. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SQRT</B> <I>(X)</I> <DD><A NAME="IDX70"></A> the square root of X. It is represented internally by X^(1/2). Also see ROOTSCONTRACT. RADEXPAND[TRUE] - if TRUE will cause nth roots of factors of a product which are powers of n to be pulled outside of the radical, e.g. SQRT(16*X^2) will become 4*X only if RADEXPAND is TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SQRTDISPFLAG</B> <DD><A NAME="IDX71"></A> default: [TRUE] - if FALSE causes SQRT to display with exponent 1/2. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBLIS</B> <I>(list,expr)</I> <DD><A NAME="IDX72"></A> allows multiple substitutions into an expression in parallel. Sample syntax: <PRE> SUBLIS([A=B,B=A],SIN(A)+COS(B)); => SIN(B) + COS(A) </PRE> <P> The variable SUBLIS_APPLY_LAMBDA[TRUE] controls simplification after SUBLIS. For full documentation, see the file SHARE2;SUBLIS INFO. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBLIST</B> <I>(L,F)</I> <DD><A NAME="IDX73"></A> returns the list of elements of the list L for which the function F returns TRUE. E.g., SUBLIST([1,2,3,4],EVENP); returns [2,4]. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SUBLIS_APPLY_LAMBDA</B> <DD><A NAME="IDX74"></A> default:[TRUE] - controls whether LAMBDA's substituted are applied in simplification after SUBLIS is used or whether you have to do an EV to get things to apply. TRUE means do the application. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBST</B> <I>(a, b, c)</I> <DD><A NAME="IDX75"></A> substitutes a for b in c. b must be an atom, or a complete subexpression of c. For example, X+Y+Z is a complete subexpression of 2*(X+Y+Z)/W while X+Y is not. When b does not have these characteristics, one may sometimes use SUBSTPART or RATSUBST (see below). Alternatively, if b is of the form e/f then one could use SUBST(a*f,e,c) while if b is of the form e**(1/f) then one could use SUBST(a**f,e,c). The SUBST command also discerns the X^Y in X^-Y so that SUBST(A,SQRT(X),1/SQRT(X)) yields 1/A. a and b may also be operators of an expression enclosed in "s or they may be function names. If one wishes to substitute for the independent variable in derivative forms then the AT function (see below) should be used. Note: SUBST is an alias for SUBSTITUTE. SUBST(eq1,exp) or SUBST([eq1,...,eqk],exp) are other permissible forms. The eqi are equations indicating substitutions to be made. For each equation, the right side will be substituted for the left in the expression exp. EXPTSUBST[FALSE] if TRUE permits substitutions like Y for %E**X in %E**(A*X) to take place. OPSUBST[TRUE] if FALSE, SUBST will not attempt to substitute into the operator of an expression. E.g. (OPSUBST:FALSE, SUBST(X^2,R,R+R[0])); will work. <PRE> (C1) SUBST(A,X+Y,X+(X+Y)**2+Y); 2 (D1) Y + X + A (C2) SUBST(-%I,%I,A+B*%I); (D2) A - %I B </PRE> <P> (Note that C2 is one way of obtaining the complex conjugate of an analytic expression.) For further examples, do EXAMPLE(SUBST); </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBSTINPART</B> <I>(x, exp, n1, ...)</I> <DD><A NAME="IDX76"></A> is like SUBSTPART but works on the internal representation of exp. <PRE> (C1) X.'DIFF(F(X),X,2); 2 d (D1) X . (--- F(X)) 2 dX (C2) SUBSTINPART(D**2,%,2); 2 (D2) X . D (C3) SUBSTINPART(F1,F[1](X+1),0); (D3) F1(X + 1) Additional Information If the last argument to a part function is a list of indices then several subexpressions are picked out, each one corresponding to an index of the list. Thus <PRE> (C1) PART(X+Y+Z,[1,3]); (D1) Z+X </PRE> PIECE holds the value of the last expression selected when using the part functions. It is set during the execution of the function and thus may be referred to in the function itself as shown below. If PARTSWITCH[FALSE] is set to TRUE then END is returned when a selected part of an expression doesn't exist, otherwise an error message is given. (C1) 27*Y**3+54*X*Y**2+36*X**2*Y+Y+8*X**3+X+1; 3 2 2 3 (D1) 27 Y + 54 X Y + 36 X Y + Y + 8 X + X + 1 (C2) PART(D1,2,[1,3]); 2 (D2) 54 Y (C3) SQRT(PIECE/54); (D3) Y (C4) SUBSTPART(FACTOR(PIECE),D1,[1,2,3,5]); 3 (D4) (3 Y + 2 X) + Y + X + 1 (C5) 1/X+Y/X-1/Z; 1 Y 1 (D5) - - + - + - Z X X (C6) SUBSTPART(XTHRU(PIECE),%,[2,3]); Y + 1 1 (D6) ----- - - X Z </PRE> <P> Also, setting the option INFLAG to TRUE and calling PART/SUBSTPART is the same as calling INPART/SUBSTINPART. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBSTPART</B> <I>(x, exp, n1, ..., nk)</I> <DD><A NAME="IDX77"></A> substitutes x for the subexpression picked out by the rest of the arguments as in PART. It returns the new value of exp. x may be some operator to be substituted for an operator of exp. In some cases it needs to be enclosed in "s (e.g. SUBSTPART("+",A*B,0); -> B + A ). <PRE> (C1) 1/(X**2+2); 1 (D1) ------ 2 X + 2 (C2) SUBSTPART(3/2,%,2,1,2); 1 (D2) -------- 3/2 X + 2 (C3) A*X+F(B,Y); (D3) A X + F(B, Y) (C4) SUBSTPART("+",%,1,0); (D4) X + F(B, Y) + A </PRE> <P> Also, setting the option INFLAG to TRUE and calling PART/SUBSTPART is the same as calling INPART/SUBSTINPART. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUBVARP</B> <I>(exp)</I> <DD><A NAME="IDX78"></A> is TRUE if exp is a subscripted variable, for example A[I]. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SYMBOLP</B> <I>(exp)</I> <DD><A NAME="IDX79"></A> returns TRUE if "exp" is a "symbol" or "name", else FALSE. I.e., in effect, SYMBOLP(X):=ATOM(X) AND NOT NUMBERP(X)$ . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNORDER</B> <I>()</I> <DD><A NAME="IDX80"></A> stops the aliasing created by the last use of the ordering commands ORDERGREAT and ORDERLESS. ORDERGREAT and ORDERLESS may not be used more than one time each without calling UNORDER. Do DESCRIBE(ORDERGREAT); and DESCRIBE(ORDERLESS);, and also do EXAMPLE(UNORDER); for specifics. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>VECTORPOTENTIAL</B> <I>(givencurl)</I> <DD><A NAME="IDX81"></A> Returns the vector potential of a given curl vector, in the current coordinate system. POTENTIALZEROLOC has a similar role as for POTENTIAL, but the order of the left-hand sides of the equations must be a cyclic permutation of the coordinate variables. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>XTHRU</B> <I>(exp)</I> <DD><A NAME="IDX82"></A> combines all terms of exp (which should be a sum) over a common denominator without expanding products and exponentiated sums as RATSIMP does. XTHRU cancels common factors in the numerator and denominator of rational expressions but only if the factors are explicit. Sometimes it is better to use XTHRU before RATSIMPing an expression in order to cause explicit factors of the gcd of the numerator and denominator to be canceled thus simplifying the expression to be RATSIMPed. <PRE> (C1) ((X+2)**20-2*Y)/(X+Y)**20+(X+Y)**-19-X/(X+Y)**20; 20 1 X (X + 2) - 2 Y (D1) --------- - --------- + --------------- 19 20 20 (Y + X) (Y + X) (Y + X) (C2) XTHRU(%); 20 (X + 2) - Y (D2) ------------- 20 (Y + X) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>ZEROEQUIV</B> <I>(exp,var)</I> <DD><A NAME="IDX83"></A> tests whether the expression exp in the variable var is equivalent to zero. It returns either TRUE, FALSE, or DONTKNOW. For example ZEROEQUIV(SIN(2*X) - 2*SIN(X)*COS(X),X) returns TRUE and ZEROEQUIV(%E^X+X,X) returns FALSE. On the other hand ZEROEQUIV(LOG(A*B) - LOG(A) - LOG(B),A) will return DONTKNOW because of the presence of an extra parameter. The restrictions are: (1) Do not use functions that MACSYMA does not know how to differentiate and evaluate. (2) If the expression has poles on the real line, there may be errors in the result (but this is unlikely to occur). (3) If the expression contains functions which are not solutions to first order differential equations (e.g. Bessel functions) there may be incorrect results. (4) The algorithm uses evaluation at randomly chosen points for carefully selected subexpressions. This is always a somewhat hazardous business, although the algorithm tries to minimize the potential for error. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_3.html">previous</A>, <A HREF="maxima_5.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_40.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Debugging</TITLE> <link href="maxima_41.html" rel=Next> <link href="maxima_39.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_39.html">previous</A>, <A HREF="maxima_41.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC129" HREF="maxima_toc.html#TOC129">Debugging</A></H1> <H2><A NAME="SEC130" HREF="maxima_toc.html#TOC130">Source Level Debugging</A></H2> <P> Maxima has source level capabilities. A user can set a breakpoint at a line in a file, and then step line by line from there. The call stack may be examined, together with the variables bound at that level. If the user is running the code under GNU emacs in a shell window (dbl shell), or is running <CODE>xmaxima</CODE> the graphical interface version, then if he stops at a break point, he will see his current position in the source file which will be displayed in the other half of the window, either highlighted in red, or with a little arrow pointing at the right line. He can advance single lines at a time by typing M-n (Alt-n) or alternately by entering <CODE>:n</CODE>. To see the names of the keyword commands type :help (or :h). In general commands may be abbreviated if the abbreviation is unique. If not unique the alternatives will be listed. </P> <P> Under Emacs you should run in a <CODE>dbl</CODE> shell, which requires the dbl.el file in the elisp directory. Make sure you install the elisp files or add the maxima elisp directory to your path: eg add the following to your <TT>`.emacs'</TT> file or the <CODE>site-init.el</CODE> </P> <PRE> (setq load-path (cons "/usr/local/maxima-5.5/elisp" load-path)) (autoload 'dbl "dbl") </PRE> <P> then in emacs <PRE> M-x dbl </PRE> <P> should start a shell window in which you can run programs, for example maxima, gcl, gdb etc. This shell window also knows about source level debugging, and display of source code in the other window. </P> <PRE> maxima Maxima 5.5 Wed Apr 18 19:02:00 CDT 2001 (with enhancements by W. Schelter). Licensed under the GNU Public License (see file COPYING) (C1) batchload("/tmp/joe.mac"); (D1) /tmp/joe.mac (C2) :br joe Turning on debugging debugmode(true) Bkpt 0 for joe (in /tmp/joe.mac line 8) (C2) foo(2,3); Bkpt 0:(joe.mac 8) (dbm:1) :bt <-- :bt typed here gives a backtrace #0: joe(y=5)(joe.mac line 8) #1: foo(x=2,y=3)(joe.mac line 5) (joe.mac 9) <-- Here type M-n to advance line (joe.mac 10) <-- Here type M-n to advance line In the other buffer the source code appears with an arrow. (dbm:1) u; Investigate value of 'u 28 (dbm:1) u:33; Alter it to be 33 (dbm:1) :r :r Resumes the computation (D3) 1094 </PRE> <P> The actual file /tmp/joe.mac is the following: <PRE> foo(x,y):=( x:x+2, y:y+2, x:joe(y), x+y); joe(y):=block([u:y^2], u:u+3, u:u^2, u); </PRE> <P> If you are running in Gnu Emacs then if you are looking at the file joe.mac, you may set a break point at a certain line of that file by typing <CODE>C-x space</CODE>. This figures out which function your cursor is in, and then it sees which line of that function you are on. If you are on say line 2 of joe, then it will insert in the other window <CODE>:br joe 2</CODE> the command to break joe at its second line. To have this enabled you must have maxima-mode.el on in the window in which the file joe.mac is visiting. There are additional commands available in that file window, such as evaluating the function into the maxima, by typing <CODE>Alt-Control-x</CODE> </P> <H2><A NAME="SEC131" HREF="maxima_toc.html#TOC131">Keyword Commands</A></H2> <P> Break commands start with ':'. Thus to evaluate a lisp form you may type <CODE>:lisp </CODE> followed by the argument which is the form to be evaluated. <PRE> (C3) :lisp (+ 2 3) 5 </PRE> <P> The number of arguments taken depends on the particular command. Also you need not type the whole command, just enough to be unique among the keyword commands. Thus <CODE>:br</CODE> would suffice for <CODE>:break</CODE>. The current commands are: </P> <DL COMPACT> <DT><CODE>:break</CODE> <DD> Set a breakpoint in the specified FUNCTION at the specified LINE offset from the beginning of the function. If FUNCTION is given as a string, then it is presumed to be a FILE and LINE is the offset from the beginning of the file. <DT><CODE>:bt</CODE> <DD> Undocumented <DT><CODE>:continue</CODE> <DD> Continue the computation. <DT><CODE>:delete</CODE> <DD> Delete all breakpoints, or if arguments are supplied delete the specified breakpoints <DT><CODE>:disable</CODE> <DD> Disable the specified breakpoints, or all if none are specified <DT><CODE>:enable</CODE> <DD> Enable the specified breakpoints, or all if none are specified <DT><CODE>:frame</CODE> <DD> With an argument print the selected stack frame. Otherwise the current frame. <DT><CODE>:help</CODE> <DD> Print help on a break command or with no arguments on all break commands <DT><CODE>:info</CODE> <DD> Undocumented <DT><CODE>:lisp</CODE> <DD> Evaluate the lisp form following on the line <DT><CODE>:lisp-quiet</CODE> <DD> Evaluate its arg as a lisp form without printing a prompt. <DT><CODE>:next Like :step, except that subroutine calls are stepped over</CODE> <DD> <DT><CODE>:quit</CODE> <DD> Quit this level <DT><CODE>:resume</CODE> <DD> Continue the computation. <DT><CODE>:step</CODE> <DD> Step program until it reaches a new source line <DT><CODE>:top</CODE> <DD> Throw to top level </DL> <H2><A NAME="SEC132" HREF="maxima_toc.html#TOC132">Definitions for Debugging</A></H2> <P> <DL> <DT><U>Variable:</U> <B>REFCHECK</B> <DD><A NAME="IDX1010"></A> default: [FALSE] - if TRUE causes a message to be printed each time a bound variable is used for the first time in a computation. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>REMTRACE</B> <I>()</I> <DD><A NAME="IDX1011"></A> This function is no longer used with the new TRACE package. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SETCHECK</B> <DD><A NAME="IDX1012"></A> default: [FALSE] - if set to a list of variables (which can be subscripted) will cause a printout whenever the variables, or subscripted occurrences of them, are bound (with : or :: or function argument binding). The printout consists of the variable and the value it is bound to. SETCHECK may be set to ALL or TRUE thereby including all variables. Note: No printout is generated when a SETCHECKed variable is set to itself, e.g. X:'X. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SETCHECKBREAK</B> <DD><A NAME="IDX1013"></A> default: [FALSE] - if set to TRUE will cause a (MACSYMA-BREAK) to occur whenever the variables on the SETCHECK list are bound. The break occurs before the binding is done. At this point, SETVAL holds the value to which the variable is about to be set. Hence, one may change this value by resetting SETVAL. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SETVAL</B> <DD><A NAME="IDX1014"></A> - holds the value to which a variable is about to be set when a SETCHECKBREAK occurs. Hence, one may change this value by resetting SETVAL. (See SETCHECKBREAK). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TIMER</B> <I>(F)</I> <DD><A NAME="IDX1015"></A> will put a timer-wrapper on the function F, within the TRACE package, i.e. it will print out the time spent in computing F. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>TIMER_DEVALUE</B> <DD><A NAME="IDX1016"></A> default: [FALSE] - when set to TRUE then the time charged against a function is the time spent dynamically inside the function devalued by the time spent inside other TIMED functions. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TIMER_INFO</B> <I>(F)</I> <DD><A NAME="IDX1017"></A> will print the information on timing which is stored also as GET('F,'CALLS); GET('F,'RUNTIME); and GET('F,'GCTIME); . This is a TRACE package function. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRACE</B> <I>(name1, name2, ...)</I> <DD><A NAME="IDX1018"></A> gives a trace printout whenever the functions mentioned are called. TRACE() prints a list of the functions currently under TRACE. On MC see MACDOC;TRACE USAGE for more information. Also, DEMO("trace.dem"); . To remove tracing, see UNTRACE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>TRACE_OPTIONS</B> <I>(F,option1,option2,...)</I> <DD><A NAME="IDX1019"></A> gives the function F the options indicated. An option is either a keyword or an expression. The possible Keywords are: Keyword Meaning of return value ---------------------------------------- NOPRINT If TRUE do no printing. BREAK If TRUE give a breakpoint. LISP_PRINT If TRUE use lisp printing. INFO Extra info to print. ERRORCATCH If TRUE errors are caught. A keyword means that the option is in effect. Using a keyword as an expression, e.g. NOPRINT(predicate_function) means to apply the predicate_function (which is user-defined) to some arguments to determine if the option is in effect. The argument list to this predicate_function is always [LEVEL, DIRECTION, FUNCTION, ITEM] where LEVEL is the recursion level for the function. DIRECTION is either ENTER or EXIT. FUNCTION is the name of the function. ITEM is either the argument list or the return value. On MC see DEMO("trace.dem"); for more details. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNTRACE</B> <I>(name1, ...)</I> <DD><A NAME="IDX1020"></A> removes tracing invoked by the TRACE function. UNTRACE() removes tracing from all functions. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_39.html">previous</A>, <A HREF="maxima_41.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_41.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Indices</TITLE> <link href="maxima_42.html" rel=Next> <link href="maxima_40.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_40.html">previous</A>, <A HREF="maxima_42.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC133" HREF="maxima_toc.html#TOC133">Indices</A></H1> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_40.html">previous</A>, <A HREF="maxima_42.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_42.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Function and Variable Index</TITLE> <link href="maxima_41.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_41.html">previous</A>, next, last section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC134" HREF="maxima_toc.html#TOC134">Function and Variable Index</A></H1> <P> <H2></H2> [...1084 lines suppressed...] <LI><A HREF="maxima_4.html#IDX82">XTHRU</A> </DIR> <H2>z</H2> <DIR> <LI><A HREF="maxima_31.html#IDX809">ZEROBERN</A> <LI><A HREF="maxima_4.html#IDX83">ZEROEQUIV</A> <LI><A HREF="maxima_26.html#IDX697">ZEROMATRIX</A> <LI><A HREF="maxima_31.html#IDX810">ZETA</A> <LI><A HREF="maxima_31.html#IDX811">ZETA%PI</A> <LI><A HREF="maxima_21.html#IDX593">ZRPOLY</A> <LI><A HREF="maxima_21.html#IDX594">ZSOLVE</A> <LI><A HREF="maxima_9.html#IDX302">ZUNDERFLOW</A> </DIR> </P> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_41.html">previous</A>, next, last section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_5.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Expressions</TITLE> <link href="maxima_6.html" rel=Next> <link href="maxima_4.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_4.html">previous</A>, <A HREF="maxima_6.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC18" HREF="maxima_toc.html#TOC18">Expressions</A></H1> [...1036 lines suppressed...] INTEGRATE integrates a function, unless it is DECLAREd to be a "noun", in which case it represents the INTEGRAL of the function. See NOUN, NOUNIFY, and VERBIFY. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>VERBIFY</B> <I>(f)</I> <DD><A NAME="IDX137"></A> returns the function name f in its verb form (See also VERB, NOUN, and NOUNIFY). </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_4.html">previous</A>, <A HREF="maxima_6.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_6.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Simplification</TITLE> <link href="maxima_7.html" rel=Next> <link href="maxima_5.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_5.html">previous</A>, <A HREF="maxima_7.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC25" HREF="maxima_toc.html#TOC25">Simplification</A></H1> <H2><A NAME="SEC26" HREF="maxima_toc.html#TOC26">Definitions for Simplification</A></H2> <P> <DL> <DT><U>Function:</U> <B>APPLY_NOUNS</B> <I>(exp)</I> <DD><A NAME="IDX138"></A> causes the application of noun forms in an expression. E.g. EXP:'DIFF(X^2/2,X); APPLY_NOUNS(EXP); gives X. This gives the same result as EV(EXP,NOUNS); except that it can be faster and use less storage. It also can be used in translated code, where EV may cause problems. Note that it is called APPLY_NOUNS, not EV_NOUNS, because what it does is to APPLY the rules corresponding to the noun-form operators, which is not evaluation. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>ASKEXP</B> <DD><A NAME="IDX139"></A> default: [] contains the expression upon which ASKSIGN is called. A user may enter a MACSYMA break with ^A and inspect this expression in order to answer questions asked by ASKSIGN. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>ASKINTEGER</B> <I>(exp,<optional-arg>)</I> <DD><A NAME="IDX140"></A> exp is any valid macsyma expression and optional-arg is EVEN,ODD,INTEGER and defaults to INTEGER if not given. This function attempts to determine from the data-base whether exp is EVEN, ODD or just an INTEGER. It will ask the user if it cannot tell otherwise and attempt to install the information in the data-base if possible. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>ASKSIGN</B> <I>(exp)</I> <DD><A NAME="IDX141"></A> first attempts to determine whether the specified expression is positive, negative, or zero. If it cannot, it asks the user the necessary questions to complete its deduction. The user's answer is recorded in the data base for the duration of the current computation (one "C-line"). The value of ASKSIGN is one of POS, NEG, or ZERO. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DEMOIVRE</B> <DD><A NAME="IDX142"></A> default: [FALSE] if TRUE will cause <PRE> %E^(A+B*%I) ==> %E^A*(COS(B)+%I*SIN(B)) </PRE> <P> if B is free of %I. A and B are not expanded. DEMOIVRE:TRUE; is the way to reverse the effect of EXPONENTIALIZE:TRUE; </P> <P> DEMOIVRE(exp) will cause the conversion without setting the switch or having to re-evaluate the expression with EV. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>DOMAIN</B> <DD><A NAME="IDX143"></A> default: [REAL] - if set to COMPLEX, SQRT(X^2) will remain SQRT(X^2) instead of returning ABS(X). The notion of a "domain" of simplification is still in its infancy, and controls little more than this at the moment. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EXPAND</B> <I>(exp)</I> <DD><A NAME="IDX144"></A> will cause products of sums and exponentiated sums to be multiplied out, numerators of rational expressions which are sums to be split into their respective terms, and multiplication (commutative and non-commutative) to be distributed over addition at all levels of exp. For polynomials one should usually use RATEXPAND which uses a more efficient algorithm (see DESCRIBE(RATEXPAND);). MAXNEGEX[1000] and MAXPOSEX[1000] control the maximum negative and positive exponents, respectively, which will expand. EXPAND(exp,p,n) expands exp, using p for MAXPOSEX and n for MAXNEGEX. This is useful in order to expand part but not all of an expression. EXPON[0] - the exponent of the largest negative power which is automatically expanded (independent of calls to EXPAND). For example if EXPON is 4 then (X+1)^(-5) will not be automatically expanded. EXPOP[0] - the highest positive exponent which is automatically expanded. Thus (X+1)^3, when typed, will be automatically expanded only if EXPOP is greater than or equal to 3. If it is desired to have (X+1)^N expanded where N is greater than EXPOP then executing EXPAND((X+1)^N) will work only if MAXPOSEX is not less than N. The EXPAND flag used with EV (see EV) causes expansion. </P> <P> <A NAME="IDX145"></A> <A NAME="IDX146"></A> <A NAME="IDX147"></A> <A NAME="IDX148"></A> <A NAME="IDX149"></A> The file <TT>`simplification/facexp.mac'</TT> contains several related functions (in particular FACSUM, FACTORFACSUM and COLLECTTERMS, which are autoloaded) and variables (NEXTLAYERFACTOR and FACSUM_COMBINE) that provide the user with the ability to structure expressions by controlled expansion. Brief function descriptions are available in <TT>`simplification/facexp.usg'</TT>. A demo is available by doing <CODE>demo("facexp")$</CODE>. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EXPANDWRT</B> <I>(exp,var1,var2,...)</I> <DD><A NAME="IDX150"></A> expands exp with respect to the vari. All products involving the vari appear explicitly. The form returned will be free of products of sums of expressions that are not free of the vari. The vari may be variables, operators, or expressions. By default, denominators are not expanded, but this can be controlled by means of the switch EXPANDWRT_DENOM. This function is autoloaded from <TT>`simplification/stopex.mac'</TT>. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>EXPANDWRT_DENOM</B> <DD><A NAME="IDX151"></A> default:[FALSE] controls the treatment of rational expressions by EXPANDWRT. If TRUE, then both the numerator and denominator of the expression will be expanded according to the arguments of EXPANDWRT, but if EXPANDWRT_DENOM is FALSE, then only the numerator will be expanded in that way. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>EXPANDWRT_FACTORED</B> <I>(exp, var1, var2, ..., varN)</I> <DD><A NAME="IDX152"></A> is similar to EXPANDWRT, but treats expressions that are products somewhat differently. EXPANDWRT_FACTORED will perform the required expansion only on those factors of exp that contain the variables in its argument list argument list. This function is autoloaded from <TT>`simplification/stopex.mac'</TT>. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>EXPON</B> <DD><A NAME="IDX153"></A> default: [0] - the exponent of the largest negative power which is automatically expanded (independent of calls to EXPAND). For example if EXPON is 4 then (X+1)^(-5) will not be automatically expanded. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>EXPONENTIALIZE</B> <DD><A NAME="IDX154"></A> default: [FALSE] if TRUE will cause all circular and hyperbolic functions to be converted to exponential form. (Setting DEMOIVRE:TRUE; will reverse the effect.) EXPONENTIALIZE(exp) will cause the conversion to exponential form of an expression without setting the switch or having to re-evaluate the expression with EV. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>EXPOP</B> <DD><A NAME="IDX155"></A> default: [0] - the highest positive exponent which is automatically expanded. Thus (X+1)^3, when typed, will be automatically expanded only if EXPOP is greater than or equal to 3. If it is desired to have (X+1)^n expanded where n is greater than EXPOP then executing EXPAND((X+1)^n) will work only if MAXPOSEX is not less than n. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FACTLIM</B> <DD><A NAME="IDX156"></A> default: [-1] gives the highest factorial which is automatically expanded. If it is -1 then all integers are expanded. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>INTOSUM</B> <I>(expr)</I> <DD><A NAME="IDX157"></A> 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. In some cases, a SCANMAP(MULTTHRU,expr) may be necessary before the INTOSUM. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>LASSOCIATIVE</B> <DD><A NAME="IDX158"></A> - If DECLARE(G,LASSOCIATIVE); is done, this tells the simplifier that G is left-associative. E.g. G(G(A,B),G(C,D)) will simplify to G(G(G(A,B),C),D). </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>LINEAR</B> <DD><A NAME="IDX159"></A> - One of MACSYMA's OPPROPERTIES. For univariate f so declared, "expansion" F(X+Y) -> F(X)+F(Y), F(A*X) -> A*F(X) takes place where A is a "constant". For functions F of >=2 args, "linearity" is defined to be as in the case of 'SUM or 'INTEGRATE, i.e. F(A*X+B,X) -> A*F(X,X)+B*F(1,X) for A,B FREEOF X. (LINEAR is just ADDITIVE + OUTATIVE.) </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>MAINVAR</B> <DD><A NAME="IDX160"></A> - You may DECLARE variables to be MAINVAR. The ordering scale for atoms is essentially: numbers < constants (e.g. %E,%PI) < scalars < other variables < mainvars. E.g. compare EXPAND((X+Y)^4); with (DECLARE(X,MAINVAR), EXPAND((X+Y)^4)); . (Note: Care should be taken if you elect to use the above feature. E.g. if you subtract an expression in which X is a MAINVAR from one in which X isn't a MAINVAR, resimplification e.g. with EV(expression,SIMP) may be necessary if cancellation is to occur. Also, if you SAVE an expression in which X is a MAINVAR, you probably should also SAVE X.) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAXAPPLYDEPTH</B> <DD><A NAME="IDX161"></A> default: [10000] - the maximum depth to which APPLY1 and APPLY2 will delve. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAXAPPLYHEIGHT</B> <DD><A NAME="IDX162"></A> default: [10000] - the maximum height to which APPLYB1 will reach before giving up. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAXNEGEX</B> <DD><A NAME="IDX163"></A> default: [1000] - the largest negative exponent which will be expanded by the EXPAND command (see also MAXPOSEX). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>MAXPOSEX</B> <DD><A NAME="IDX164"></A> default: [1000] - the largest exponent which will be expanded with the EXPAND command (see also MAXNEGEX). </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>MULTIPLICATIVE</B> <DD><A NAME="IDX165"></A> - If DECLARE(F,MULTIPLICATIVE) has been executed, then: (1) If F is univariate, whenever the simplifier encounters F applied to a product, F will be distributed over that product. I.e. F(X*Y); will simplify to F(X)*F(Y). (2) If F is a function of 2 or more arguments, multiplicativity is defined as multiplicativity in the first argument to F, i.e. F(G(X)*H(X),X); will simplify to F(G(X),X)*F(H(X),X). This simplification does not occur when F is applied to expressions of the form PRODUCT(X[I],I,lower-limit,upper-limit). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>NEGDISTRIB</B> <DD><A NAME="IDX166"></A> default: [TRUE] - when TRUE allows -1 to be distributed over an expression. E.g. -(X+Y) becomes -Y-X. Setting it to FALSE will allow -(X+Y) to be displayed like that. This is sometimes useful but be very careful: like the SIMP flag, this is one flag you do not want to set to FALSE as a matter of course or necessarily for other than local use in your MACSYMA. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>NEGSUMDISPFLAG</B> <DD><A NAME="IDX167"></A> default: [TRUE] - when TRUE, X-Y displays as X-Y instead of as -Y+X. Setting it to FALSE causes the special check in display for the difference of two expressions to not be done. One application is that thus A+%I*B and A-%I*B may both be displayed the same way. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>NOEVAL</B> <DD><A NAME="IDX168"></A> - suppresses the evaluation phase of EV. This is useful in conjunction with other switches and in causing expressions to be resimplified without being reevaluated. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>NOUN</B> <DD><A NAME="IDX169"></A> - One of the options of the DECLARE command. It makes a function so DECLAREd a "noun", meaning that it won't be evaluated automatically. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>NOUNDISP</B> <DD><A NAME="IDX170"></A> default: [FALSE] - if TRUE will cause NOUNs to display with a single quote. This switch is always TRUE when displaying function definitions. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>NOUNS</B> <DD><A NAME="IDX171"></A> (EVFLAG) when used as an option to the EV command, converts all "noun" forms occurring in the expression being EV'd to "verbs", i.e. evaluates them. See also NOUN, NOUNIFY, VERB, and VERBIFY. </P> </DL> <P> <DL> <DT><U>special symbol:</U> <B>NUMER</B> <DD><A NAME="IDX172"></A> causes some mathematical functions (including exponentiation) with numerical arguments to be evaluated in floating point. It causes variables in exp which have been given numervals to be replaced by their values. It also sets the FLOAT switch on. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>NUMERVAL</B> <I>(var1, exp1, var2, exp2, ...)</I> <DD><A NAME="IDX173"></A> declares vari to have a numerval of expi which is evaluated and substituted for the variable in any expressions in which the variable occurs if the NUMER flag is TRUE. (see the EV function). </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>OPPROPERTIES</B> <DD><A NAME="IDX174"></A> - the list of the special operator-properties handled by the MACSYMA simplifier: LINEAR, ADDITIVE, MULTIPLICATIVE, OUTATIVE, EVENFUN, ODDFUN, COMMUTATIVE, SYMMETRIC, ANTISYMMETRIC, NARY, LASSOCIATIVE, and RASSOCIATIVE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>OPSUBST</B> <DD><A NAME="IDX175"></A> default:[TRUE] - if FALSE, SUBST will not attempt to substitute into the operator of an expression. E.g. (OPSUBST:FALSE, SUBST(X^2,R,R+R[0])); will work. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>OUTATIVE</B> <DD><A NAME="IDX176"></A> - If DECLARE(F,OUTATIVE) has been executed, then: (1) If F is univariate, whenever the simplifier encounters F applied to a product, that product will be partitioned into factors that are constant and factors that are not and the constant factors will be pulled out. I.e. F(A*X); will simplify to A*F(X) where A is a constant. Non-atomic constant factors will not be pulled out. (2) If F is a function of 2 or more arguments, outativity is defined as in the case of 'SUM or 'INTEGRATE, i.e. F(A*G(X),X); will simplify to A*F(G(X),X) for A free-of X. Initially, 'SUM, 'INTEGRATE, and 'LIMIT are declared to be OUTATIVE. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>POSFUN</B> <DD><A NAME="IDX177"></A> - POSitive FUNction, e.g. DECLARE(F,POSFUN); IS(F(X)>0); -> TRUE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>PRODHACK</B> <DD><A NAME="IDX178"></A> default: [FALSE] - if set to TRUE then PRODUCT(F(I),I,3,1); will yield 1/F(2), by the identity PRODUCT(F(I),I,A,B) = 1/PRODUCT(F(I),I,B+1,A-1) when A>B. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>RADCAN</B> <I>(exp)</I> <DD><A NAME="IDX179"></A> simplifies exp, which can contain logs, exponentials, and radicals, by converting it into a form which is canonical over a large class of expressions and a given ordering of variables; that is, all functionally equivalent forms are mapped into a unique form. For a somewhat larger class of expressions, RADCAN produces a regular form. Two equivalent expressions in this class will not necessarily have the same appearance, but their difference will be simplified by RADCAN to zero. For some expressions RADCAN can be quite time consuming. This is the cost of exploring certain relationships among the components of the expression for simplifications based on factoring and partial-fraction expansions of exponents. %E_TO_NUMLOG (default: [FALSE]) - when set to TRUE, for "r" some rational number, and "x" some expression, %E^(r*LOG(x)) will be simplified into x^r . RADEXPAND[TRUE] when set to FALSE will inhibit certain transformations: RADCAN(SQRT(1-X)) will remain SQRT(1-X) and will not become %I SQRT(X-1). RADCAN(SQRT(X^2-2*X+1)) will remain SQRT(X^2-2*X + 1) and will not be transformed to X- 1. Do EXAMPLE(RADCAN); for examples. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RADEXPAND</B> <DD><A NAME="IDX180"></A> default: [TRUE] - if set to ALL will cause nth roots of factors of a product which are powers of n to be pulled outside of the radical. E.g. if RADEXPAND is ALL, SQRT(16*X^2) will become 4*X . More particularly, consider SQRT(X^2). (a) If RADEXPAND is ALL or ASSUME(X>0) has been done, SQRT(X^2) will become X. (b) If RADEXPAND is TRUE and DOMAIN is REAL (its default), SQRT(X^2) will become ABS(X). (c) If RADEXPAND is FALSE, or RADEXPAND is TRUE and DOMAIN is COMPLEX, SQRT(X^2) will be returned. (The notion of DOMAIN with settings of REAL or COMPLEX is still in its infancy. Note that its setting here only matters when RADEXPAND is TRUE.) </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RADPRODEXPAND</B> <DD><A NAME="IDX181"></A> - this switch has been renamed RADEXPAND. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>RADSUBSTFLAG</B> <DD><A NAME="IDX182"></A> default: [FALSE] - if TRUE permits RATSUBST to make substitutions such as U for SQRT(X) in X. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>RASSOCIATIVE</B> <DD><A NAME="IDX183"></A> - If DECLARE(G,RASSOCIATIVE); is done, this tells the simplifier that G is right-associative. E.g. G(G(A,B),G(C,D)) will simplify to G(A,G(B,G(C,D))). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SCSIMP</B> <I>(exp,rule1, rule2,...,rulen)</I> <DD><A NAME="IDX184"></A> Sequential Comparative Simplification [Stoute]) takes an expression (its first argument) and a set of identities, or rules (its other arguments) and tries simplifying. If a smaller expression is obtained, the process repeats. Otherwise after all simplifications are tried, it returns the original answer. For examples, try EXAMPLE(SCSIMP); . </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SIMP</B> <DD><A NAME="IDX185"></A> causes exp to be simplified regardless of the setting of the switch SIMP which inhibits simplification if FALSE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SIMPSUM</B> <DD><A NAME="IDX186"></A> default: [FALSE] - if TRUE, the result of a SUM is simplified. This simplification may sometimes be able to produce a closed form. If SIMPSUM is FALSE or if 'SUM is used, the value is a sum noun form which is a representation of the sigma notation used in mathematics. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>SUMCONTRACT</B> <I>(expr)</I> <DD><A NAME="IDX187"></A> 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. SUMCONTRACT will combine all compatible sums and use one of the indices from one of the sums if it can, and then try to form a reasonable index if it cannot use any supplied. It may be necessary to do an INTOSUM(expr) before the SUMCONTRACT. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SUMEXPAND</B> <DD><A NAME="IDX188"></A> default: [FALSE] if TRUE, products of sums and exponentiated sums are converted into nested sums. For example: <PRE> SUMEXPAND:TRUE$ SUM(F(I),I,0,M)*SUM(G(J),J,0,N); -> 'SUM('SUM(F(I1)*G(I2),I2,0,N),I1,0,M) SUM(F(I),I,0,M)^2; -> 'SUM('SUM(F(I3)*F(I4),I4,0,M),I3,0,M) </PRE> <P> If FALSE, they are left alone. See also CAUCHYSUM. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SUMHACK</B> <DD><A NAME="IDX189"></A> default: [FALSE] - if set to TRUE then SUM(F(I),I,3,1); will yield -F(2), by the identity SUM(F(I),I,A,B) = - SUM(F(I),I,B+1,A-1) when A>B. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>SUMSPLITFACT</B> <DD><A NAME="IDX190"></A> default: [TRUE] - if set to FALSE will cause MINFACTORIAL to be applied after a FACTCOMB. </P> </DL> <P> <DL> <DT><U>declaration:</U> <B>SYMMETRIC</B> <DD><A NAME="IDX191"></A> - If DECLARE(H,SYMMETRIC); is done, this tells the simplifier that H is a symmetric function. E.g. H(X,Z,Y) will simplify to H(X, Y, Z). This is the same as COMMUTATIVE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>UNKNOWN</B> <I>(exp)</I> <DD><A NAME="IDX192"></A> returns TRUE iff exp contains an operator or function not known to the built-in simplifier. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_5.html">previous</A>, <A HREF="maxima_7.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_7.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Plotting</TITLE> <link href="maxima_8.html" rel=Next> <link href="maxima_6.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_6.html">previous</A>, <A HREF="maxima_8.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC27" HREF="maxima_toc.html#TOC27">Plotting</A></H1> <H2><A NAME="SEC28" HREF="maxima_toc.html#TOC28">Definitions for Plotting</A></H2> <P> <DL> <DT><U>Variable:</U> <B>IN_NETMATH</B> <I>[FALSE]</I> <DD><A NAME="IDX193"></A> If not nil, then plot2d will output a representation of the plot which is suitable for openplot functions. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>OPENPLOT_CURVES</B> <I>list rest-options</I> <DD><A NAME="IDX194"></A> Takes a list of curves such as <PRE> [[x1,y1,x2,y2,...],[u1,v1,u2,v2,...],..] or [[[x1,y1],[x2,y2],...],.. ] </PRE> <P> and plots them. This is similar to xgraph_curves, but uses the open plot routines. Addtional symbol arguments may be given such as <CODE> "{xrange -3 4}" </CODE> The following plots two curves, using big points, labeling the first one <CODE>jim</CODE> and the second one <CODE>jane</CODE>. <PRE> openplot_curves([["{plotpoints 1} {pointsize 6} {label jim} {text {xaxislabel {joe is nice}}}"] , [1,2,3,4,5,6,7,8], ["{label jane} {color pink } "], [3,1,4,2,5,7]]); </PRE> <P> Some other special keywords are xfun, color, plotpoints, linecolors, pointsize, nolines, bargraph, labelposition, xaxislabel, and yaxislabel. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PLOT2D</B> <I>(expr,range,...,options,..)</I> <DD><A NAME="IDX195"></A> <DT><U>Function:</U> <B>PLOT2D</B> <I>([expr1,expr2,..,exprn],xrange,...,options,..)</I> <DD><A NAME="IDX196"></A> <DT><U>Function:</U> <B>PLOT2D</B> <I>(parametric_expr)</I> <DD><A NAME="IDX197"></A> <DT><U>Function:</U> <B>PLOT2D</B> <I>([..,expr,..,parametric_expr,..],xrange,...,options)</I> <DD><A NAME="IDX198"></A> </P> <P> EXPR is an expression to be plotted on y axis as a function of 1 variable. RANGE is of the form [var,min,max] and expr is assumed to be an expression to be plotted against VAR. In the second form of the function a list of expressions may be given to plot against VAR. Truncation in the y direction will be performed, for the default y range. It may be specified as an option or using SET_PLOT_OPTION. </P> <PRE> (C1) plot2d(sin(x),[x,-5,5]); (C2) plot2d(sec(x),[x,-2,2],[y,-20,20],[nticks,200]); </PRE> <P> Anywhere there may be an EXPR you may also use a parametric expression: PARAMETRIC_EXPR is a Maxima list of the form <CODE>[parametric, xexpr, yexpr, trange, ..options]</CODE> Here XEXPR and YEXPR are functions of 1 variable VAR which is the first element of the range TRANGE. The plot is of the path traced out by the pair <CODE>[XEXPR, YEXPR]</CODE> as VAR varies in TRANGE. In the following example, we plot a circle, then we do the plot with only a few points used, so that we get a star, and finally we plot this together with an ordinary function of X. </P> <PRE> (C1) plot2d([parametric,cos(t),sin(t),[t,-%pi*2,%pi*2]]); (C2) plot2d([parametric,cos(t),sin(t),[t,-%pi*2,%pi*2], [nticks,8]]); (C3) plot2d([x^3+2,[parametric,cos(t),sin(t),[t,-5,5]]], [x,-3,3]); </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>xgraph_curves</B> <I>(list)</I> <DD><A NAME="IDX199"></A> graphs the list of `point sets' given in list by using xgraph. </P> <P> A point set may be of the form </P> <PRE> [x0,y0,x1,y1,x2,y2,...] or [[x0,y0],[x1,y1],....] </PRE> <P> A point set may also contain symbols which give labels or other information. </P> <PRE> xgraph_curves([pt_set1,pt_set2,pt_set3]); </PRE> <P> would graph the three point sets as three curves. </P> <PRE> pt_set:append(["NoLines: True","LargePixels: true"], [x0,y0,x1,y1,...]) </PRE> <P> would make the point set [and subsequent ones], have no lines between points, and to use large pixels. See the man page on xgraph for more options to specify. </P> <PRE> pt_set:append([concat("\"","x^2+y")],[x0,y0,x1,y1,...]) </PRE> <P> would make there be a "label" of "x^2+y" for this particular point set. The <CODE>"</CODE> at the beginning is what tells xgraph this is a label. </P> <PRE> pt_set:append([concat("TitleText: Sample Data")],[x0,...]) </PRE> <P> would make the main title of the plot be "Sample Data" instead of "Maxima PLot". </P> <P> To make a bar graph with bars which are .2 units wide, and to plot two possibly different such bar graphs: <PRE> xgraph_curves( [append(["BarGraph: true","NoLines: true","BarWidth: .2"], create_list([i-.2,i^2],i,1,3)), append(["BarGraph: true","NoLines: true","BarWidth: .2"], create_list([i+.2,.7*i^2],i,1,3)) ]); </PRE> <P> </P> <P> A temporary file <TT>`xgraph-out'</TT> is used. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>PLOT_OPTIONS</B> <DD><A NAME="IDX200"></A> Members of this list indicate defaults for plotting. They may be altered using SET_PLOT_OPTION </P> <PRE> [X, - 3, 3] [Y, - 3, 3] </PRE> <P> are the x range and y range respectively. </P> <P> [TRANSFORM_XY, FALSE] if not false, should be the output of </P> <PRE> make_transform([x,y,z], [f1(x,y,z),f2(x,y,z),f3(x,y,z)]) </PRE> <P> which produces a transformation from 3 space to 3 space, which will be applied to the graph. A built in one is polar_xy which gives the same as </P> <PRE> make_transform([r,th,z],[r*cos(th),r*sin(th),z]) </PRE> <P> [RUN_VIEWER,TRUE] if not false, means run the viewer software - don't just output a data file. </P> <P> [GRID,30,30] means plot3d should divide the x range into 30 intervals and similarly the y range. </P> <P> [COLOUR_Z,false] applies to colouring done with plot_format ps. </P> <P> [PLOT_FORMAT,OPENMATH] is for plot3d and currently OPENMATH, GNUPLOT, PS, and GEOMVIEW are supported. </P> <P> There are good quality public domain viewers for these formats. They are openmath, izic, gnuplot, ghostview, and geomview. </P> <P> The Openmath viewer is in the distribution, and is based on tcl/tk. The executable is <TT>`maxima/bin/omplotdata'</TT>. The viewer lets you zoom in, slide around, and rotate (if 3 dimensional). This format is also the one used by netmath, for making plots with Netmath. (see <TT>`http://www.ma.utexas.edu/users/wfs/netmath.html'</TT>;) </P> <P> geomview is from the Geometry Center at the University of Minnesota, and is available from <TT>`http://www.geom.umn.edu/software/download/geomview.html'</TT>; or by anonymous ftp from <TT>`ftp://ftp.geom.umn.edu/pub/software/geomview/'</TT>;. It is currently not quite as pretty as izic, but provides excellent support for multiple objects and multiple lights. </P> <P> gnuplot is everywhere as is ghostview. We also provide mgnuplot, a tcl interface for gnuplot, which lets you rotate the plots using the mouse and a scale. </P> <P> izic is available by ftp from zenon.inria.fr. Contact one of </P> <P> {fournier,kajler,mourrain}@sophia.inria.fr. </P> <P> It has beautiful colour gouraud shading, and very fast wireframe. It runs on X windows. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>PLOT3D</B> <I>(expr,xrange,yrange,...,options,..)</I> <DD><A NAME="IDX201"></A> <DT><U>Function:</U> <B>PLOT3D</B> <I>([expr1,expr2,expr3],xrange,yrange,...,options,..)</I> <DD><A NAME="IDX202"></A> </P> <PRE> plot3d(2^(-u^2+v^2),[u,-5,5],[v,-7,7]); </PRE> <P> would plot z = 2^(-u^2+v^2) with u and v varying in [-5,5] and [-7,7] respectively, and with u on the x axis, and v on the y axis. </P> <P> An example of the second pattern of arguments is <PRE> plot3d([cos(x)*(3+y*cos(x/2)),sin(x)*(3+y*cos(x/2)),y*sin(x/2)], [x,-%pi,%pi],[y,-1,1],['grid,50,15]) </PRE> <P> which will plot a moebius band, parametrized by the 3 expressions given as the first argument to plot3d. An additional optional argument [grid,50,15] gives the grid number of rectangles in the x direction and y direction. </P> <PRE> /* REal part of z ^ 1/3 */ plot3d(r^.33*cos(th/3),[r,0,1],[th,0,6*%pi], ['grid,12,80],['PLOT_FORMAT,ps], ['TRANSFORM_XY,POLAR_TO_XY],['VIEW_DIRECTION,1,1,1.4], ['COLOUR_Z,true]) </PRE> <P> Here the View_direction indicates the direction from which we take a projection. We actually do this from infinitely far away, but parallel to the line from view_direction to the origin. This is currently only used in 'ps' plot_format, since the other viewers allow interactive rotating of the object. </P> <P> Another example is a moebius band: <PRE> plot3d([cos(x)*(3+y*cos(x/2)), sin(x)*(3+y*cos(x/2)),y*sin(x/2)], [x,-%pi,%pi],[y,-1,1],['grid,50,15]); </PRE> <P> or a klein bottle: </P> <PRE> plot3d([5*cos(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0) - 10.0, -5*sin(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0), 5*(-sin(x/2)*cos(y)+cos(x/2)*sin(2*y))], [x,-%pi,%pi],[y,-%pi,%pi],['grid,40,40]) </PRE> <P> or a torus <PRE> plot3d([cos(y)*(10.0+6*cos(x)), sin(y)*(10.0+6*cos(x)), -6*sin(x)], [x,0,2*%pi],[y,0,2*%pi], ['grid,40,40]) </PRE> <P> We can output to gnplot too: </P> <PRE> plot3d(2^(x^2-y^2),[x,-1,1],[y,-2,2],[plot_format,gnuplot]) </PRE> <P> Sometimes you may need to define a function to plot the expression. All the arguments to plot3d are evaluated before being passed to plot3d, and so trying to make an expression which does just what you want may be difficult, and it is just easier to make a function. <PRE> M:MATRIX([1,2,3,4],[1,2,3,2],[1,2,3,4],[1,2,3,3])$ f(x,y):=float(M[?round(x),?round(y)]); plot3d(f,[x,1,4],[y,1,4],['grid,4,4]); </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>PLOT2D_PS</B> <I>(expr,range)</I> <DD><A NAME="IDX203"></A> writes to pstream a sequence of postscript commands which plot EXPR for RANGE. EXPR should be an expression of 1 variable. RANGE should be of the form [variable,min,max] over which to plot expr. see CLOSEPS. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CLOSEPS</B> <I>()</I> <DD><A NAME="IDX204"></A> This should usually becalled at the end of a sequence of plotting commands. It closes the current output stream PSTREAM, and sets it to nil. It also may be called at the start of a plot, to ensure pstream is closed if it was open. All commands which write to pstream, open it if necessary. CLOSEPS is separate from the other plotting commands, since we may want to plot 2 ranges or superimpose several plots, and so must keep the stream open. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>SET_PLOT_OPTION</B> <I>(option)</I> <DD><A NAME="IDX205"></A> option is of the format of one of the elements of the PLOT_OPTIONS list. Thus <PRE> SET_PLOT_OPTION([grid,30,40]) </PRE> <P> would change the default grid used by plot3d. Note that if the symbol grid has a value, then you should quote it here: <PRE> SET_PLOT_OPTION(['grid,30,40]) </PRE> <P> so that the value will not be substituted. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>PSDRAW_CURVE</B> <I>(ptlist)</I> <DD><A NAME="IDX206"></A> </P> <P> Draws a curve connecting the points in PTLIST. The latter may be of the form [x0,y0,x1,y1,...] or [[x0,y0],[x1,y1],...] The function JOIN is handy for taking a list of x's and a list of y's and splicing them together. PSDRAW_CURVE simply invokes the more primitive function PSCURVE. Here is the definition: </P> <PRE> (defun $psdraw_curve (lis) (p "newpath") ($pscurve lis) (p "stroke")) </PRE> <P> ?DRAW2D may also be used to produce a list <PRE> points1:?draw2d(1/x,[.05,10],.03) </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>PSCOM</B> <I>(com)</I> <DD><A NAME="IDX207"></A> </P> <P> COM will be inserted in the poscript file eg <PRE> pscom("4.5 72 mul 5.5 72 mul translate 14 14 scale"); </PRE> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_6.html">previous</A>, <A HREF="maxima_8.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_8.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Input and Output</TITLE> <link href="maxima_9.html" rel=Next> <link href="maxima_7.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_7.html">previous</A>, <A HREF="maxima_9.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC29" HREF="maxima_toc.html#TOC29">Input and Output</A></H1> [...1177 lines suppressed...] </DL> <P> <DL> <DT><U>Function:</U> <B>WRITEFILE</B> <I>(DSK, directory)</I> <DD><A NAME="IDX285"></A> opens up a file for writing. On a Lisp Machine one uses WRITEFILE("filename"). All interaction between the user and MACSYMA is then recorded in this file, just as it is on the console. Such a file is a transcript of the session, and is not reloadable or batchable into MACSYMA again. (See also CLOSEFILE.) </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_7.html">previous</A>, <A HREF="maxima_9.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_9.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Floating Point</TITLE> <link href="maxima_10.html" rel=Next> <link href="maxima_8.html" rel=Previous> <link href="maxima_toc.html" rel=ToC> </HEAD> <BODY> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_8.html">previous</A>, <A HREF="maxima_10.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC34" HREF="maxima_toc.html#TOC34">Floating Point</A></H1> <H2><A NAME="SEC35" HREF="maxima_toc.html#TOC35">Definitions for Floating Point</A></H2> <P> <DL> <DT><U>Function:</U> <B>BFFAC</B> <I>(exp,n)</I> <DD><A NAME="IDX286"></A> BFLOAT version of the Factorial (shifted Gamma) function. The 2nd argument is how many digits to retain and return, it's a good idea to request a couple of extra. This function is available by doing LOAD(BFFAC); . </DL> </P> <P> <DL> <DT><U>Variable:</U> <B>ALGEPSILON</B> <DD><A NAME="IDX287"></A> The default value is 10^-8. The value of ALGEPSILON is used by ALGSYS. </DL> </P> <P> <DL> <DT><U>Function:</U> <B>BFLOAT</B> <I>(X)</I> <DD><A NAME="IDX288"></A> converts all numbers and functions of numbers to bigfloat numbers. Setting FPPREC[16] to N, sets the bigfloat precision to N digits. If FLOAT2BF[FALSE] is FALSE a warning message is printed when a floating point number is converted into a bigfloat number (since this may lead to loss of precision). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BFLOATP</B> <I>(exp)</I> <DD><A NAME="IDX289"></A> is TRUE if exp is a bigfloat number else FALSE. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>BFPSI</B> <I>(n,z,fpprec)</I> <DD><A NAME="IDX290"></A> gives polygammas of real arg and integer order. For digamma, BFPSI0(z,fpprec) is more direct. Note -BFPSI0(1,fpprec) provides BFLOATed %GAMMA. To use this do LOAD(BFFAC); </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>BFTORAT</B> <DD><A NAME="IDX291"></A> default: [FALSE] controls the conversion of bfloats to rational numbers. If <PRE> BFTORAT:FALSE </PRE> <P> RATEPSILON will be used to control the conversion (this results in relatively small rational numbers). If <PRE> BFTORAT:TRUE </PRE> <P> , the rational number generated will accurately represent the bfloat. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>BFTRUNC</B> <DD><A NAME="IDX292"></A> default: [TRUE] causes trailing zeroes in non-zero bigfloat numbers not to be displayed. Thus, if BFTRUNC:FALSE, BFLOAT(1); displays as 1.000000000000000B0. Otherwise, this is displayed as 1.0B0. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>CBFAC</B> <I>(z,fpprec)</I> <DD><A NAME="IDX293"></A> a factorial for complex bfloats. It may be used by doing LOAD(BFAC); For more details see share2/bfac.usg. </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLOAT</B> <I>(exp)</I> <DD><A NAME="IDX294"></A> converts integers, rational numbers and bigfloats in exp to floating point numbers. It is also an EVFLAG, FLOAT causes non-integral rational numbers and bigfloat numbers to be converted to floating point. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FLOAT2BF</B> <DD><A NAME="IDX295"></A> default: [FALSE] if FALSE, a warning message is printed when a floating point number is converted into a bigfloat number (since this may lead to loss of precision). </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLOATDEFUNK</B> <DD><A NAME="IDX296"></A> - is a utility for making floating point functions from mathematical expression. It will take the input expression and FLOAT it, then OPTIMIZE it, and then insert MODE_DECLAREations for all the variables. This is THE way to use ROMBERG, PLOT2, INTERPOLATE, etc. e.g. EXP:some-hairy-macsyma-expression; </P> <PRE> FLOATDEFUNK('F,['X],EXP); </PRE> <P> will define the function F(X) for you. (Do PRINTFILE(MCOMPI,DOC,MAXDOC); for more details.) </P> </DL> <P> <DL> <DT><U>Function:</U> <B>FLOATNUMP</B> <I>(exp)</I> <DD><A NAME="IDX297"></A> is TRUE if exp is a floating point number else FALSE. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FPPREC</B> <DD><A NAME="IDX298"></A> default: [16] - Floating Point PRECision. Can be set to an integer representing the desired precision. </P> </DL> <P> <DL> <DT><U>Variable:</U> <B>FPPRINTPREC</B> <DD><A NAME="IDX299"></A> default: [0] - The number of digits to print when printing a bigfloat number, making it possible to compute with a large number of digits of precision, but have the answer printed out with a smaller number of digits. If FPPRINTPREC is 0 (the default), or >= FPPREC, then the value of FPPREC controls the number of digits used for printing. However, if FPPRINTPREC has a value between 2 and FPPREC-1, then it controls the number of digits used. (The minimal number of digits used is 2, one to the left of the point and one to the right. The value 1 for FPPRINTPREC is illegal.) </DL> </P> <P> <DL> <DT><U>Function:</U> <B>?ROUND</B> <I>(x,&optional-divisor)</I> <DD><A NAME="IDX300"></A> round the floating point X to the nearest integer. The argument must be a regular system float, not a bigfloat. The ? beginning the name indicates this is normal common lisp function. </P> <PRE> (C3) ?round(-2.8); (D3) - 3 </PRE> </DL> <P> <DL> <DT><U>Function:</U> <B>?TRUNCATE</B> <I>(x,&optional-divisor)</I> <DD><A NAME="IDX301"></A> truncate the floating point X towards 0, to become an integer. The argument must be a regular system float, not a bigfloat. The ? beginning the name indicates this is normal common lisp function. </DL> <PRE> (C4) ?truncate(-2.8); (D4) - 2 (C5) ?truncate(2.4); (D5) 2 (C6) ?truncate(2.8); (D6) 2 </PRE> <P> <DL> <DT><U>Variable:</U> <B>ZUNDERFLOW</B> <DD><A NAME="IDX302"></A> default: [TRUE] - if FALSE, an error will be signaled if floating point underflow occurs. Currently in NIL Macsyma, all floating-point underflow, floating-point overflow, and division-by-zero errors signal errors, and this switch is ignored. </P> </DL> <P><HR><P> <p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_8.html">previous</A>, <A HREF="maxima_10.html">next</A>, <A HREF="maxima_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>. </BODY> </HTML> --- NEW FILE: maxima_toc.html --- <HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.52 from maxima.texi on 11 April 2003 --> <TITLE>Maxima Manual - Table of Contents</TITLE> </HEAD> <BODY> <H1>Maxima Manual</H1> <P> <P><HR><P> <P> MAXIMA is a fairly complete computer algebra system. </P> <P> This system MAXIMA is a COMMON LISP implementation due to William F. Schelter, and is based on the original implementation of Macsyma at MIT, as distributed by the Department of Energy. I now have permission from DOE to make derivative copies, and in particular to distribute it under the GNU public license. See the file COPYING included in the distribution. Thus these files may now be redistributed under the terms of GNU public license. </P> <UL> <LI><A NAME="TOC1" HREF="maxima_1.html#SEC1">Introduction to MAXIMA</A> <LI><A NAME="TOC2" HREF="maxima_2.html#SEC2">Help</A> <UL> <LI><A NAME="TOC3" HREF="maxima_2.html#SEC3">Introduction to Help</A> <LI><A NAME="TOC4" HREF="maxima_2.html#SEC4">Lisp and Maxima</A> <LI><A NAME="TOC5" HREF="maxima_2.html#SEC5">Garbage Collection</A> <LI><A NAME="TOC6" HREF="maxima_2.html#SEC6">Documentation</A> <LI><A NAME="TOC7" HREF="maxima_2.html#SEC7">Definitions for Help</A> </UL> <LI><A NAME="TOC8" HREF="maxima_3.html#SEC8">Command Line</A> <UL> <LI><A NAME="TOC9" HREF="maxima_3.html#SEC9">Introduction to Command Line</A> <LI><A NAME="TOC10" HREF="maxima_3.html#SEC10">Definitions for Command Line</A> </UL> <LI><A NAME="TOC11" HREF="maxima_4.html#SEC11">Operators</A> <UL> <LI><A NAME="TOC12" HREF="maxima_4.html#SEC12">NARY</A> <LI><A NAME="TOC13" HREF="maxima_4.html#SEC13">NOFIX</A> <LI><A NAME="TOC14" HREF="maxima_4.html#SEC14">OPERATOR</A> <LI><A NAME="TOC15" HREF="maxima_4.html#SEC15">POSTFIX</A> <LI><A NAME="TOC16" HREF="maxima_4.html#SEC16">PREFIX</A> <LI><A NAME="TOC17" HREF="maxima_4.html#SEC17">Definitions for Operators</A> </UL> <LI><A NAME="TOC18" HREF="maxima_5.html#SEC18">Expressions</A> <UL> <LI><A NAME="TOC19" HREF="maxima_5.html#SEC19">Introduction to Expressions</A> <LI><A NAME="TOC20" HREF="maxima_5.html#SEC20">ASSIGNMENT</A> <LI><A NAME="TOC21" HREF="maxima_5.html#SEC21">COMPLEX</A> <LI><A NAME="TOC22" HREF="maxima_5.html#SEC22">INEQUALITY</A> <LI><A NAME="TOC23" HREF="maxima_5.html#SEC23">SYNTAX</A> <LI><A NAME="TOC24" HREF="maxima_5.html#SEC24">Definitions for Expressions</A> </UL> <LI><A NAME="TOC25" HREF="maxima_6.html#SEC25">Simplification</A> <UL> <LI><A NAME="TOC26" HREF="maxima_6.html#SEC26">Definitions for Simplification</A> </UL> <LI><A NAME="TOC27" HREF="maxima_7.html#SEC27">Plotting</A> <UL> <LI><A NAME="TOC28" HREF="maxima_7.html#SEC28">Definitions for Plotting</A> </UL> <LI><A NAME="TOC29" HREF="maxima_8.html#SEC29">Input and Output</A> <UL> <LI><A NAME="TOC30" HREF="maxima_8.html#SEC30">Introduction to Input and Output</A> <LI><A NAME="TOC31" HREF="maxima_8.html#SEC31">FILES</A> <LI><A NAME="TOC32" HREF="maxima_8.html#SEC32">PLAYBACK</A> <LI><A NAME="TOC33" HREF="maxima_8.html#SEC33">Definitions for Input and Output</A> </UL> <LI><A NAME="TOC34" HREF="maxima_9.html#SEC34">Floating Point</A> <UL> <LI><A NAME="TOC35" HREF="maxima_9.html#SEC35">Definitions for Floating Point</A> </UL> <LI><A NAME="TOC36" HREF="maxima_10.html#SEC36">Contexts</A> <UL> <LI><A NAME="TOC37" HREF="maxima_10.html#SEC37">Definitions for Contexts</A> </UL> <LI><A NAME="TOC38" HREF="maxima_11.html#SEC38">Polynomials</A> <UL> <LI><A NAME="TOC39" HREF="maxima_11.html#SEC39">Introduction to Polynomials</A> <LI><A NAME="TOC40" HREF="maxima_11.html#SEC40">Definitions for Polynomials</A> </UL> <LI><A NAME="TOC41" HREF="maxima_12.html#SEC41">Constants</A> <UL> <LI><A NAME="TOC42" HREF="maxima_12.html#SEC42">Definitions for Constants</A> </UL> <LI><A NAME="TOC43" HREF="maxima_13.html#SEC43">Logarithms</A> <UL> <LI><A NAME="TOC44" HREF="maxima_13.html#SEC44">Definitions for Logarithms</A> </UL> <LI><A NAME="TOC45" HREF="maxima_14.html#SEC45">Trigonometric</A> <UL> <LI><A NAME="TOC46" HREF="maxima_14.html#SEC46">Introduction to Trigonometric</A> <LI><A NAME="TOC47" HREF="maxima_14.html#SEC47">Definitions for Trigonometric</A> </UL> <LI><A NAME="TOC48" HREF="maxima_15.html#SEC48">Special Functions</A> <UL> <LI><A NAME="TOC49" HREF="maxima_15.html#SEC49">Introduction to Special Functions</A> <LI><A NAME="TOC50" HREF="maxima_15.html#SEC50">GAMALG</A> <LI><A NAME="TOC51" HREF="maxima_15.html#SEC51">SPECINT</A> <LI><A NAME="TOC52" HREF="maxima_15.html#SEC52">Definitions for Special Functions</A> </UL> <LI><A NAME="TOC53" HREF="maxima_16.html#SEC53">Orthogonal Polynomials</A> <UL> <LI><A NAME="TOC54" HREF="maxima_16.html#SEC54">Introduction to Orthogonal Polynomials</A> <LI><A NAME="TOC55" HREF="maxima_16.html#SEC55">Definitions for Orthogonal Polynomials</A> </UL> <LI><A NAME="TOC56" HREF="maxima_17.html#SEC56">Elliptic Functions</A> <UL> <LI><A NAME="TOC57" HREF="maxima_17.html#SEC57">Introduction to Elliptic Functions and Integrals</A> <LI><A NAME="TOC58" HREF="maxima_17.html#SEC58">Definitions for Elliptic Functions</A> <LI><A NAME="TOC59" HREF="maxima_17.html#SEC59">Definitions for Elliptic Integrals</A> </UL> <LI><A NAME="TOC60" HREF="maxima_18.html#SEC60">Limits</A> <UL> <LI><A NAME="TOC61" HREF="maxima_18.html#SEC61">Definitions for Limits</A> </UL> <LI><A NAME="TOC62" HREF="maxima_19.html#SEC62">Differentiation</A> <UL> <LI><A NAME="TOC63" HREF="maxima_19.html#SEC63">Definitions for Differentiation</A> </UL> <LI><A NAME="TOC64" HREF="maxima_20.html#SEC64">Integration</A> <UL> <LI><A NAME="TOC65" HREF="maxima_20.html#SEC65">Introduction to Integration</A> <LI><A NAME="TOC66" HREF="maxima_20.html#SEC66">Definitions for Integration</A> </UL> <LI><A NAME="TOC67" HREF="maxima_21.html#SEC67">Equations</A> <UL> <LI><A NAME="TOC68" HREF="maxima_21.html#SEC68">Definitions for Equations</A> </UL> <LI><A NAME="TOC69" HREF="maxima_22.html#SEC69">Differential Equations</A> <UL> <LI><A NAME="TOC70" HREF="maxima_22.html#SEC70">Definitions for Differential Equations</A> </UL> <LI><A NAME="TOC71" HREF="maxima_23.html#SEC71">Numerical</A> <UL> <LI><A NAME="TOC72" HREF="maxima_23.html#SEC72">Introduction to Numerical</A> <LI><A NAME="TOC73" HREF="maxima_23.html#SEC73">DCADRE</A> <LI><A NAME="TOC74" HREF="maxima_23.html#SEC74">ELLIPT</A> <LI><A NAME="TOC75" HREF="maxima_23.html#SEC75">FOURIER</A> <LI><A NAME="TOC76" HREF="maxima_23.html#SEC76">NDIFFQ</A> <LI><A NAME="TOC77" HREF="maxima_23.html#SEC77">Definitions for Numerical</A> </UL> <LI><A NAME="TOC78" HREF="maxima_24.html#SEC78">Statistics</A> <UL> <LI><A NAME="TOC79" HREF="maxima_24.html#SEC79">Definitions for Statistics</A> </UL> <LI><A NAME="TOC80" HREF="maxima_25.html#SEC80">Arrays and Tables</A> <UL> <LI><A NAME="TOC81" HREF="maxima_25.html#SEC81">Definitions for Arrays and Tables</A> </UL> <LI><A NAME="TOC82" HREF="maxima_26.html#SEC82">Matrices and Linear Algebra</A> <UL> <LI><A NAME="TOC83" HREF="maxima_26.html#SEC83">Introduction to Matrices and Linear Algebra</A> <UL> <LI><A NAME="TOC84" HREF="maxima_26.html#SEC84">DOT</A> <LI><A NAME="TOC85" HREF="maxima_26.html#SEC85">VECTORS</A> </UL> <LI><A NAME="TOC86" HREF="maxima_26.html#SEC86">Definitions for Matrices and Linear Algebra</A> </UL> <LI><A NAME="TOC87" HREF="maxima_27.html#SEC87">Affine</A> <UL> <LI><A NAME="TOC88" HREF="maxima_27.html#SEC88">Definitions for Affine</A> </UL> <LI><A NAME="TOC89" HREF="maxima_28.html#SEC89">Tensor</A> <UL> <LI><A NAME="TOC90" HREF="maxima_28.html#SEC90">Introduction to Tensor</A> <LI><A NAME="TOC91" HREF="maxima_28.html#SEC91">Definitions for Tensor</A> </UL> <LI><A NAME="TOC92" HREF="maxima_29.html#SEC92">Ctensor</A> <UL> <LI><A NAME="TOC93" HREF="maxima_29.html#SEC93">Introduction to Ctensor</A> <LI><A NAME="TOC94" HREF="maxima_29.html#SEC94">Definitions for Ctensor</A> </UL> <LI><A NAME="TOC95" HREF="maxima_30.html#SEC95">Series</A> <UL> <LI><A NAME="TOC96" HREF="maxima_30.html#SEC96">Introduction to Series</A> <LI><A NAME="TOC97" HREF="maxima_30.html#SEC97">Definitions for Series</A> </UL> <LI><A NAME="TOC98" HREF="maxima_31.html#SEC98">Number Theory</A> <UL> <LI><A NAME="TOC99" HREF="maxima_31.html#SEC99">Definitions for Number Theory</A> </UL> <LI><A NAME="TOC100" HREF="maxima_32.html#SEC100">Symmetries</A> <UL> <LI><A NAME="TOC101" HREF="maxima_32.html#SEC101">Definitions for Symmetries</A> </UL> <LI><A NAME="TOC102" HREF="maxima_33.html#SEC102">Groups</A> <UL> <LI><A NAME="TOC103" HREF="maxima_33.html#SEC103">Definitions for Groups</A> </UL> <LI><A NAME="TOC104" HREF="maxima_34.html#SEC104">Runtime Environment</A> <UL> <LI><A NAME="TOC105" HREF="maxima_34.html#SEC105">Introduction for Runtime Environment</A> <LI><A NAME="TOC106" HREF="maxima_34.html#SEC106">INTERRUPTS</A> <LI><A NAME="TOC107" HREF="maxima_34.html#SEC107">Definitions for Runtime Environment</A> </UL> <LI><A NAME="TOC108" HREF="maxima_35.html#SEC108">Miscellaneous Options</A> <UL> <LI><A NAME="TOC109" HREF="maxima_35.html#SEC109">Introduction to Miscellaneous Options</A> <LI><A NAME="TOC110" HREF="maxima_35.html#SEC110">SHARE</A> <LI><A NAME="TOC111" HREF="maxima_35.html#SEC111">Definitions for Miscellaneous Options</A> </UL> <LI><A NAME="TOC112" HREF="maxima_36.html#SEC112">Rules and Patterns</A> <UL> <LI><A NAME="TOC113" HREF="maxima_36.html#SEC113">Introduction to Rules and Patterns</A> <LI><A NAME="TOC114" HREF="maxima_36.html#SEC114">Definitions for Rules and Patterns</A> </UL> <LI><A NAME="TOC115" HREF="maxima_37.html#SEC115">Lists</A> <UL> <LI><A NAME="TOC116" HREF="maxima_37.html#SEC116">Introduction to Lists</A> <LI><A NAME="TOC117" HREF="maxima_37.html#SEC117">Definitions for Lists</A> </UL> <LI><A NAME="TOC118" HREF="maxima_38.html#SEC118">Function Definition</A> <UL> <LI><A NAME="TOC119" HREF="maxima_38.html#SEC119">Introduction to Function Definition</A> <LI><A NAME="TOC120" HREF="maxima_38.html#SEC120">FUNCTION</A> <LI><A NAME="TOC121" HREF="maxima_38.html#SEC121">MACROS</A> <UL> <LI><A NAME="TOC122" HREF="maxima_38.html#SEC122">Semantics</A> <LI><A NAME="TOC123" HREF="maxima_38.html#SEC123">SIMPLIFICATION</A> </UL> <LI><A NAME="TOC124" HREF="maxima_38.html#SEC124">OPTIMIZATION</A> <LI><A NAME="TOC125" HREF="maxima_38.html#SEC125">Definitions for Function Definition</A> </UL> <LI><A NAME="TOC126" HREF="maxima_39.html#SEC126">Program Flow</A> <UL> <LI><A NAME="TOC127" HREF="maxima_39.html#SEC127">Introduction to Program Flow</A> <LI><A NAME="TOC128" HREF="maxima_39.html#SEC128">Definitions for Program Flow</A> </UL> <LI><A NAME="TOC129" HREF="maxima_40.html#SEC129">Debugging</A> <UL> <LI><A NAME="TOC130" HREF="maxima_40.html#SEC130">Source Level Debugging</A> <LI><A NAME="TOC131" HREF="maxima_40.html#SEC131">Keyword Commands</A> <LI><A NAME="TOC132" HREF="maxima_40.html#SEC132">Definitions for Debugging</A> </UL> <LI><A NAME="TOC133" HREF="maxima_41.html#SEC133">Indices</A> <LI><A NAME="TOC134" HREF="maxima_42.html#SEC134">Function and Variable Index</A> </UL> <P><HR><P> This document was generated on 11 April 2003 using the <A HREF="http://wwwcn.cern.ch/dci/texi2html/">texi2html</A>; translator version 1.51a.</P> </BODY> </HTML> --- NEW FILE: maximareforig.pdf --- %PDF-1.2 2 0 obj << /S /GoTo /D (1@) >> endobj 4 0 obj () endobj 6 0 obj << /S /GoTo /D (3@) >> endobj 8 0 obj (Introduction to MAXIMA) endobj 10 0 obj << /S /GoTo /D (7@) >> endobj 12 0 obj (Help) endobj [...15682 lines suppressed...] 0000802017 00000 n 0000802143 00000 n 0000802260 00000 n 0000802387 00000 n 0000802477 00000 n 0000802551 00000 n 0000815091 00000 n 0000823781 00000 n 0000823822 00000 n 0000823862 00000 n 0000823975 00000 n trailer << /Size 2145 /Root 2143 0 R /Info 2144 0 R >> startxref 824072 %%EOF |