\documentclass{article} \usepackage{../../mnt/linux/bin/tex/axiom} \usepackage{graphicx} \makeindex \begin{document} \title{\$SPAD/src/cats CATS} \author{Nicolas Bourbaki} \maketitle \begin{abstract} The Computer Algebra Test Suite (CATS) is a set of mathematicial tests cases shared across many different computer algebra systems. The motivations are that we can combine our efforts and raise the quality of all of the systems. These tests are organized by a classification similar to the AMS standard. Each section explains the general mathematics of the area, subsections explain the specific issues, and subsubsections specify the tests. There are facilities for extracting tests specific to each computer algebra system. \end{abstract} \eject \tableofcontents \eject \section{The Computer Algebra Test Suite} \subsection{Overview} This is CATS\index{CATS}, the Computer Algebra Test Suite. CATS is designed to contain a range of symbolic and numeric problems that can be solved by current computer algebra systems. This material has been guided by the existing test suites and other source materials listed in the bibliography. We have tried to cover the subject in breadth as well as depth but clearly we are most interested in boundary conditions and corner cases. These tests are not intended for general user consumption or education. They are intended to provide a useful set of regression test, a standard for correct answers, and a common effort to eliminate duplicate work and waste of mathematical talent. Hopefully there will also be a convergence and expansion of capabilities of these systems as they grow to cover more tests. Each area is broken down into a set of tests. Each test has a mathematical statement of the problem and the expected solution. Systems can have valid answers that differ from the expected solution due things like branch cuts. Differences that are not errors should be clearly explained in each test. It would also be useful to have documentation of particular algorithms or special cases of algorithms. This would provide implementations with further information about the possible solutions to problems. CATS is also not intended to be a competition. We simply don't care about the number of tests that a given system can pass. The spirit of this effort is mutual cooperation rather than competition. \subsection{Test Cases by System} Each test area adds tests for a given system. Developers can freely add or skip tests as they see fit. \subsubsection{How to add tests} In each test area you can add a test by writing a test chunk with a stylized name. For example, to add a test chunk\index{test chunk, add} for Axiom\index{Axiom} we use a name of the form: [[<>=]] \noindent the commands to perform this test in Axiom\index{Axiom}. This chunk name [[<>]] is added to the general [[<>]] test chunk. The [[testname]] is generally a concatenation of the subsection and subsubsection titles separated by periods. The [[testnumber]] is optional and used in the case that there are multiple tests. \subsubsection{How to skip tests} If the chunk name is not added to the general [[<>]] test chunk the particular test will never be output and thus will be skipped. \subsubsection{How to extract tests} You can extract all of the tests for a given system by typing: \begin{verbatim} notangle -Raxiom CATS.pamphlet >axiom.input \end{verbatim} This will expand the general [[<>]] stanza and output it to standard output which we redirect to the file [[axiom.input]]. \section{Boolean Logic and Quantifier Elimination} \section{Set Theory} \section{Numbers} Computer Algebra systems have a wide range of number representations. \subsection{Single Integer} \axiom\index{Axiom} The domain [[SingleInteger]]\index{axiom, SingleInteger}\index{axiom, SI} is intended to provide support for machine integer arithmetic. It is generally much faster than bignum Integer arithmetic but suffers from a limited range of values. Since Axiom can be implemented on top of various dialects of Lisp the actual representation of small integers may not correspond exactly to the host machines integer representation. \index{axiom.Numbers.SingleInteger} <>= -- axiom/Numbers/SingleInteger min()$SingleInteger max()$SingleInteger a := 1234 :: SingleInteger b := 123$SingleInteger gcd(a,b) lcm(a,b) mulmod(5,6,13)$SingleInteger positiveRemainder(37,13)$SingleInteger And(3,4)$SingleInteger shift(1,4)$SingleInteger shift(31,-1)$SingleInteger @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \subsection{Double Float} \axiom\index{Axiom} The domain [[DoubleFloat]]\index{axiom, DoubleFloat}\index{axiom, DFLOAT} is intended to make available hardware floating point arithmetic in Axiom. \index{axiom.Numbers.DoubleFloat} <>= -- axiom/Numbers/DoubleFloat 2.71828@DoubleFloat 2.71828::DoubleFloat eApprox : DoubleFloat := 2.71828 avg : List DoubleFloat -> DoubleFloat avg l == empty? l => 0 :: DoubleFloat reduce(_+,1) / #l avg [3.4, 9.7, -6.8] cos(3.1415926)$DoubleFloat cos(3.1415926 :: DoubleFloat) @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \section{Numerical Analysis} \section{Statistics} \section{Combinatorial Theory} \section{Number Theory} \section{Algebra} \section{Trigonometry} \section{Special Functions} \section{The Complex Domain} \section{Determining Zero Equivalence} \section{Expressions} \section{Equations} \section{Inequalities} \section{Vector Analysis} \section{Matrix Theory} \section{Linear Algebra} explain \begin{list}{} \item transpose \item vertConcat \item horizConcat \item subMatrix \item matrix \item diagonalMatrix \item nrows \item new \item setColumn! \item column \item setRow! \item row \item inverse \item nullSpace \item rowEchelon \item determinant \item factor \item trace \item vector \item orthonormalBasis \item eigenMatrix \item radicalEigenvectors \item eigenvector \item eigenvalues \item setsubMatrix! \end{list} \subsection{Matrices} \subsubsection{Matrix Operations} \axiom\index{Axiom} \index{axiom.Matrices.MatrixOperations} <>= -- axiom/Matrices/MatrixOperations )clear all )set break resume m1 := matrix([[1,-2,1],[4,2,-4]]) m2 := matrix([[0,1,2],[2,3,4],[3,4,5]]) m3 := matrix([[1,2,3],[2,4,6]]) m1 + m3 100 * m1 m1 * m2 -m1 + m3 * m2 m2 * m1 v := vector([1,0,1]) m3 * v m5 : MATRIX POLY INT := new(4,4,1) vars : LIST POLY INT := [x,y,z,u] for i in 1..4 repeat for j in 1..3 repeat m5(i,j + 1) := (vars.i)**j m5 trace(m5) det := determinant(m5) factor(det) m6 := matrix([[1,2,1],[-2,3,4],[-1,5,6]]) m6inv := inverse(m6) m6 * m6inv m7 := matrix([[1,2,1],[-2,3,4],[-1,5,5]]) inverse(m7) determinant(m7) m8 : SQMATRIX(2,INT) := matrix([[1,2],[2,3]]) m9 : SQMATRIX(2,INT) := matrix([[1,1],[0,1]]) m8 ** 2 m9 ** 3 mm : SQMATRIX(2,SQMATRIX(2,INT)) := matrix([[1,m8],[m9,0]]) 100 * mm m8 * mm mm * mm p : POLY SQMATRIX(2,INT) := m8 * x**2 + m9 * x + m8 * m9 100 * p m8 * p p * p -- Input for page MatrixCanonicalFormsPage )clear all m1 := matrix([[0,4,1],[5,3,-7],[-5,5,9]]) rank(m1) rowEchelon(m1) nullSpace(m1) t := eigenMatrix(m1) inverse(t) * m1 * t -- Input for page MatrixBasicFunctionsPage )clear all m1 := matrix([[1,2,3,4],[2,3,4,5],[3,4,5,6],[4,5,6,7]]) m2 := matrix([[1,0,2],[20,30,10],[0,200,100]]) (m3,m4) : MATRIX PF 7 m3 := matrix([[1,0,1],[5,0,1]]) m4 := matrix([[1],[2],[5],[6]]) m2(1,1) m2(1,1) := 99 m2 row(m2,2) setRow!(m2,2,vector [66,77,88]) r := column(m2,1) setColumn!(m2,2,r) nrows(m1) m5 : MATRIX INT := new(12,12,0) for i in 2..nrows(m5) repeat m5(i-1,i):= 1 m5 d : MATRIX INT := diagonalMatrix([1,2,3,2,1]) m6 := matrix([[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14]]) m7 := subMatrix(m6,1,3,2,4) horizConcat(m6,m7) vertConcat(m6,subMatrix(m6,1,1,1,5)) transpose(m6) setsubMatrix!(m6,1,3,1,3,transpose(subMatrix(m6,1,3,1,3))) m6 m8 := matrix([[1,2],[3,4]]) m9 := m8 m10 := copy(m8) m8(1,1) := 1000000 m8 m9 m10 -- Input for page EigenPage )clear all m1 : MATRIX FRAC INT := [[1,2,1],[2,1,-2],[1,-2,4]] leig := eigenvalues(m1) eigenvector(first(leig),m1) eigenvectors(m1) radicalEigenvectors(m1) eigenMatrix(m1) m2 : MATRIX FRAC INT := [[-5,-2],[18,7]] eigenMatrix(m2) m3 : MATRIX FRAC INT := [[1,2],[2,1]] orthonormalBasis(m3) @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \section{Tensor Analysis} \section{Sums} \section{Products} \section{Limits} \section{Calculus} \section{Indefinite Integrals} \section{Definite Integrals} \section{Series} \section{Transforms} \section{Ordinary Difference Equations} \section{Differential Equations} \axiom\index{Axiom} \index{axiom.DifferentialEquations} <>= -- axiom/DifferentialEquations )clear all )set break resume y:=operator 'y deq := D(y x, x, 2) + D(y x, x) + y x = 0 solve(deq,y,x) @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \section{Partial Differential Equations} \section{Operators} \axiom\index{Axiom} Axiom can create operators. The [[operator]]\index{axiom, operator} function will, by default, create a function expression with an arbitrary number of arguments. The [[nary?]]\index{axiom, nary?} function is true if the operator expects an arbitrary number of arguments. The [[unary?]]\index{axiom, unary?} function is true if the operator expects only a single argument. The [[arity]]\index{axiom, arity} function shows the number of arguments expected (or false if arbitrary). The [[is?]]\index{axiom, is?} checks whether the operator has a particular name. Operators have an associated table which can hold arbitrary properties. The [[properties]]\index{axiom, properties} function returns this table. The [[setProperty]]\index{axiom, setProperty} function sets properties (which are stored as values of type [[NONE]]). The [[property]]\index{axiom, property} function can be used to test the value of a particular property. The [[deleteProperty!]]\index{axiom, deleteProperty!} function can be used to remove a property. \index{axiom.Operators} <>= -- axiom/Operators )clear all )set break resume y:=operator 'y nary? y unary? y arity y properties y setProperty(y, "use", "unknown function"::None) properties y property(y,"use")::None pretend String deleteProperty!(y,"use") opOne := operator('opOne, 1) nary? opOne unary? opOne arity opOne name opOne is?(opOne, 'z2) is?(opOne, "opOne") @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \section{Group Theory} \section{Data Structures} \subsection{Aggregates} \subsection{Sets} \axiom\index{Axiom} \index{axiom.DataStructures.Sets} <>= -- axiom/DataStructures/Sets )clear all )set break resume l := [1,4,2,-6,0,3,5,4,2,3] m := [4,2,3,6,5,7,-9,1,2,3,2] sl:SET(INT) := brace l sm:SET(INT) := brace m difference(sl, sm) intersect(sl,sm) union(sl,sm) @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \subsection{Bags} \subsection{Stacks} \subsection{Queues} \subsection{Deques} \subsection{Trees} \subsection{Lattices} \subsection{Graphs} \subsection{Lists} \axiom\index{Axiom} \index{axiom.DataStructures.Lists} <>= -- axiom/DataStructures/Lists )clear all )set break resume -- lists are constructed explicitly by using square brackets l := [1,4,2,-6,0,3,5,4,2,3] -- "listify" an element by using the "list" function m := list 555555 -- use "concat" to add an item to the front of a list concat(5,l) -- "concat" concatenates 2 lists concat(m,l) -- to remove all duplicates, issue removeDuplicates l -- use "first" to get the first element, and "rest" to get the -- list of remaining elements first l rest l -- "last" extracts the last element last l -- to find the number of elements, use "#" #l -- "first" and "rest" extract or remove leading or trailing -- parts of the list l first(l,3) rest(l,3) -- individual elements may be extracted as follows -- notice that list indexing goes from 1 to the size of the list l.1 l.2 l.(#l) -- individual elements may be set (destructively) in a similar manner l.1 := 1000000000 l -- "insert" is used to add an element to a specific position in the list insert(10,l,4) insert(2,l,1) -- "position" determines the first index of an element in a list -- if the element is not in the list, 0 is returned. position(-6,l) -- to reverse a list reverse l -- the following functions demonstrate some functions on sets l @ <>= <> @ \maxima\index{Maxima} \yacas\index{Yacas} \subsubsection{Singly Linked Lists} \subsubsection{Doubly Linked Lists} \subsection{Arrays} \subsubsection{Bit Arrays} \subsection{Vectors} \subsection{Matricies} \subsection{Hash Tables} \subsection{Streams} \subsection{Tables} \subsection{Strings} \section{Computer Science} \section{Programming} \section{Proofs} \section{Graphics} Guidance in this section is taken from the CRC Standard Curves and Surfaces\cite{SEGGERN92}. \subsection{Random Curves} \subsubsection{Fractal} \subsubsection{Gaussian} \subsubsection{Non-Gaussian} \subsection{Determinate} \subsubsection{Algebraic Irrational} \subsubsection{Algebraic Rational Polynomial} \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.1.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} Closing the viewport after use tends to hang the viewport manager. It is unclear why this happens but it is a bug. As a result we don't close the viewports. <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.1.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(a+b*x,x=-1..1,title=="2.2.1 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(a+b*x,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(a+b*x,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y4:=draw(y-b*x-a=0,x,y,range==[-1..1,-1..1],title=="2.2.1 implicit") g4:=getGraph(y4,1) pointLists g4 b:=1 y5:=draw(y-b*x-a=0,x,y,range==[-1..1,-1..1]) g5:=getGraph(y5,1) pointLists g5 putGraph(y4,g5,2) b:=2 y6:=draw(y-b*x-a=0,x,y,range==[-1..1,-1..1]) g6:=getGraph(y6,1) pointLists g6 putGraph(y4,g6,3) vp2:=makeViewport2D(y4) --close(y6) --close(y5) --close(y4) --close(vp2) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.2.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.2.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw((a+b*x)^2,x=-1..1,title=="2.2.2 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw((a+b*x)^2,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw((a+b*x)^2,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^2*x^2-2*a*b*x-a^2=0,x,y,range==[-1..1,-1..1],title=="2.2.2 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^2*x^2-2*a*b*x-a^2=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^2*x^2-2*a*b*x-a^2=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.3.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.3.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw((a+b*x)^3,x=-1..1,title=="2.2.3 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw((a+b*x)^3,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw((a+b*x)^3,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^3*x^3-3*a*b^2*x^2-3*a^2*b*x-a^3=0,x,y,range==[-1..1,-1..1],title=="2.2.3 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^3*x^3-3*a*b^2*x^2-3*a^2*b*x-a^3=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^3*x^3-3*a*b^2*x^2-3*a^2*b*x-a^3=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.4.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.4.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x*(a+b*x),x=-1..1,title=="2.2.4 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x*(a+b*x),x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x*(a+b*x),x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b*x^2-a*x=0,x,y,range==[-1..1,-1..1],title=="2.2.4 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b*x^2-a*x=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b*x^2-a*x=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.5.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.5.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x*(a+b*x)^2,x=-1..1,title=="2.2.5 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x*(a+b*x)^2,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x*(a+b*x)^2,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^2*x^3-2*a*b*x^2-a^2*x=0,x,y,range==[-1..1,-1..1],title=="2.2.5 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^2*x^3-2*a*b*x^2-a^2*x=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^2*x^3-2*a*b*x^2-a^2*x=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.6.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.6.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x*(a+b*x)^3,x=-1..1,title=="2.2.6 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x*(a+b*x)^3,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x*(a+b*x)^3,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^3*x^4-3*a*b^2*x^3-3*a^2*b*x^2-a^3*x=0,x,y,range==[-1..1,-1..1],title=="2.2.6 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^3*x^4-3*a*b^2*x^3-3*a^2*b*x^2-a^3*x=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^3*x^4-3*a*b^2*x^3-3*a^2*b*x^2-a^3*x=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) putGraph(y1,g3,3) pointLists g3 vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.7.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.7.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x^2*(a+b*x),x=-1..1,title=="2.2.7 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x^2*(a+b*x),x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x^2*(a+b*x),x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b*x^3-a*x^2=0,x,y,range==[-1..1,-1..1],title=="2.2.7 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b*x^3-a*x^2=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b*x^3-a*x^2=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.8.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.8.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x^2*(a+b*x)^2,x=-1..1,title=="2.2.8 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x^2*(a+b*x)^2,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x^2*(a+b*x)^2,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^2*x^4-2*a*b*x^3-a^2*x^2=0,x,y,range==[-1..1,-1..1],title=="2.2.8 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^2*x^4-2*a*b*x^3-a^2*x^2=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^2*x^4-2*a*b*x^3-a^2*x^2=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.9.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.9.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x^2*(a+b*x)^3,x=-1..1,title=="2.2.9 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x^2*(a+b*x)^3,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x^2*(a+b*x)^3,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^3*x^5-3*a*b^2*x^4-3*a^2*b*x^3-a^3*x^2=0,x,y,range==[-1..1,-1..1],title=="2.2.9 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^3*x^5-3*a*b^2*x^4-3*a^2*b*x^3-a^3*x^2=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^3*x^5-3*a*b^2*x^4-3*a^2*b*x^3-a^3*x^2=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.10.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.10.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x^3*(a+b*x),x=-1..1,title=="2.2.10 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x^3*(a+b*x),x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x^3*(a+b*x),x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b*x^4-a*x^3=0,x,y,range==[-1..1,-1..1],title=="2.2.10 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b*x^4-a*x^3=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b*x^4-a*x^3=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.11.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.11.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x^3*(a+b*x)^2,x=-1..1,title=="2.2.11 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x^3*(a+b*x)^2,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x^3*(a+b*x)^2,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^2*x^5-2*a*b*x^4-a^2*x^3=0,x,y,range==[-1..1,-1..1],title=="2.2.11 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^2*x^5-2*a*b*x^4-a^2*x^3=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^2*x^5-2*a*b*x^4-a^2*x^3=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.12.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.12.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=0.5 y1:=draw(x^3*(a+b*x)^3,x=-1..1,title=="2.2.12 explicit") g1:=getGraph(y1,1) pointLists g1 b:=1.0 y2:=draw(x^3*(a+b*x)^3,x=-1..1) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2.0 y3:=draw(x^3*(a+b*x)^3,x=-1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 y1:=draw(y-b^3*x^6-3*a*b^2*x^5-3*a^2*b*x^4-a^3*x^3=0,x,y,range==[-1..1,-1..1],title=="2.2.12 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(y-b^3*x^6-3*a*b^2*x^5-3*a^2*b*x^4-a^3*x^3=0,x,y,range==[-1..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(y-b^3*x^6-3*a*b^2*x^5-3*a^2*b*x^4-a^3*x^3=0,x,y,range==[-1..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \axiom\index{Axiom} \includegraphics{axiom/Graphics/Algebraic/Rational/Polynomial/2.2.13.ps} \index{axiom.Graphics.Algebraic.Rational.Polynomial} There is a division by zero in the path of the curve tracing. When $x = -1$ then $c/(a+b*x)$ which reduces to $c/(a-b)$ but since $a = b$ then we get $c/0$. In some instances we do not evaluate the curve at the zero point. However, for the first example the zero point gets evaluated. In order to handle this we create two subgraphs, labeled [[y1left]] which approaches the point from the left and [[y1right]] which approaches the point from the right. In order to get the graph to balance when drawn we graph the second equation first and then add the additional graphs to this viewport. Ideally the drawing routines would be more adaptive to the zero point and try to step around it. <>= -- axiom/Graphics/Algebraic/Rational/Polynomial/2.2.13.tex -- test explicit equations )clear all )set break resume a:=0.5 b:=1.0 c:=0.02 y2:=draw(c/(a+b*x),x=-.999..1,title=="2.2.13 explicit") g2:=getGraph(y2,1) pointLists g2 b:=0.5 y1left:=draw(c/(a+b*x),x=-2.1..-1.001) g1left:=getGraph(y1left,1) pointLists g1left putGraph(y2,g1left,2) y1right:=draw(c/(a+b*x),x=-.999..1) g1right:=getGraph(y1right,1) pointLists g1right putGraph(y2,g1right,3) b:=2.0 y3:=draw(c/(a+b*x),x=-2.1..1) g3:=getGraph(y3,1) pointLists g3 putGraph(y2,g3,4) vp:=makeViewport2D(y2) --close(y3) --close(y1right) --close(y1left) --close(y2) --close(vp) @ <>= -- test implicit equations )clear all )set break resume a:=1/2 b:=1/2 c:=2/100 y1:=draw(a*y+b*x*y-c=0,x,y,range==[-2..1,-1..1],title=="2.2.13 implicit") g1:=getGraph(y1,1) pointLists g1 b:=1 y2:=draw(a*y+b*x*y-c=0,x,y,range==[-2..1,-1..1]) g2:=getGraph(y2,1) pointLists g2 putGraph(y1,g2,2) b:=2 y3:=draw(a*y+b*x*y-c=0,x,y,range==[-2..1,-1..1]) g3:=getGraph(y3,1) pointLists g3 putGraph(y1,g3,3) vp:=makeViewport2D(y1) --close(y3) --close(y2) --close(y1) --close(vp) @ <>= <> <> @ \subsubsection{Algebraic Rational Non-Polynomial} \subsubsection{Interval} \subsubsection{Transcendental Exponential} \subsubsection{Transcendental Logarithmic} \subsubsection{Transcendental Trigonometric} \subsubsection{Piecewise Continuous Periodic} \subsubsection{Piecewise Continuous Non-Periodic} \subsubsection{Piecewise Continuous Polygonal Regular} \subsubsection{Piecewise Continuous Polygonal Irregular} \subsubsection{Piecewise Continuous Polygonal Fractal} \section{Miscellaneous} \section{Disciplines} \subsection{Physics} \subsubsection{Quantum Computation} We can define the Dirac symbols $$|0> == [ 0, 1 ]$$ and $$|1> == [ 1 , 0 ]$$ \subsection{Mechanics} \subsection{Chemistry} \section{Digital Library of Mathematical Functions} The Digital Library of Mathematical Functions (DLMF \cite{DLMF03}) is an effort by the National Institute of Standards and Technology (NIST \cite{NIST03}) to update the Handbook of Mathematical Functions \cite{ABRA64}. This Handbook is widely used but increasingly out-of-date. \subsection{ Mathematical \& Physical Constants} \subsection{ Algebraic \& Analytical Methods} \subsection{ Asymptotic Approximations} \subsection{ Numerical Methods} \subsection{ Computer Algebra} \subsection{ Elementary Functions} \subsection{ Gamma Function} \subsection{ Exponential Integral, Logarithmic Integral, Sine \& Cosine Integrals} \subsection{ Error Functions, Dawson's Integral \& Fresnel Integrals} \subsection{ Incomplete Gamma \& Related Functions} \subsection{ Airy \& Related Functions} \subsection{ Bessel Functions} \subsection{ Struve Functions \& Related Functions} \subsection{ Confluent Hypergeometric Functions} \subsection{ Coulomb Functions} \subsection{ Parabolic Cylinder Functions} \subsection{ Legendre \& Associated Legendre Functions} \subsection{ 3j, 6j, 9j Symbols} \subsection{ Hypergeometric Functions} \subsection{ Generalized Hypergeometric Functions \& Meijer G-Function} \subsection{ Functions of Matrix Argument} \subsection{ q-Hypergeometric Functions} \subsection{ Classical Orthogonal Polynomials} \subsection{ Elliptic Integrals} \subsection{ Theta Functions} \subsection{ Multidimensional Theta Functions} \subsection{ Jacobian Elliptic Functions} \subsection{ Weierstrass Elliptic \& Modular Functions} \subsection{ Bernoulli \& Euler Numbers \& Polynomials} \subsection{ Zeta \& Related Functions} \subsection{ Combinatorial Analysis} \subsection{ Functions of Number Theory} \subsection{ Mathieu Functions \& Hill's Equation} \subsection{ Lam\'{e} Functions} \subsection{ Spheroidial Wave Functions} \subsection{ Heun Functions} \subsection{ Painlev\'{e} Transcendents} \subsection{ Integrals with Coalescing Saddles} \subsection{ Statistical Methods \& Distributions} \section{AXIOM} \section{MAXIMA} \section{YACAS} <<*>>= @ \eject \include{CATS.ind} \nocite{PLUM85} \nocite{AXIOM92} \eject \bibliography{CATS} \bibliographystyle{plain} \end{document}