diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/input/tutchap2.input.pamphlet | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/input/tutchap2.input.pamphlet')
-rw-r--r-- | src/input/tutchap2.input.pamphlet | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/src/input/tutchap2.input.pamphlet b/src/input/tutchap2.input.pamphlet new file mode 100644 index 00000000..ae81f5f3 --- /dev/null +++ b/src/input/tutchap2.input.pamphlet @@ -0,0 +1,113 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/input tutChap2.input} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\section{License} +<<license>>= +--Copyright The Numerical Algorithms Group Limited 1996. +@ +<<*>>= +<<license>> +solve(3*x=x+2) +x +solve(3*x - 1 = 0) +solve(3*x - 1) +solve(3*x^2 - 7*x + 2) +solve(x^2 - 2) +solve(x^4 - 8*x^3 + 23*x^2 - 28*x + 12) +factor(x^4 - 8*x^3 + 23*x^2 - 28*x + 12) +radicalSolve(x^2 - 2) +radicalSolve(x^5+x^2+1) +solve(x^2 - 2, 0.00001) +outputGeneral 6 +%%(11) +solve(x^2 - 2, 1/100000) +solve(x^2-2*x+3,0.00001) +complexSolve(x^2-2*x+3,0.00001) +solve((x^2 - 1.21) :: Polynomial Fraction Integer,0.00001) +radicalSolve(a*x^2 + b*x + c, x) +qs := %; -- the semicolon (;) inhibits AXIOM's output display +qs1 := qs.1 +x1 := rhs % +numeric rhs %%(9).1 +xs := map(rhs, qs) +xs.1 + xs.2 +xs.1 * xs.2 +solve [x + 2*y + z = 5, 2*x - y - z = 6, x + y + 2*z = 0] +solve [x^2 + y + 1, x + y^2 - 1] +solve([x^2 + y + 1, x + y^2 - 1], 0.00001) +complexSolve([x^2 + y + 1, x + y^2 - 1], 0.00001) +solve([x^2-y^2, (x^2 -1)/(x+y)]) +a := (x + y)/2 +a :: Fraction Polynomial Integer +a +a := a :: Fraction Polynomial Integer +a +a := (x + y)/2; +b : Fraction Polynomial Integer := a +a : Fraction Polynomial Integer := a +y := x^2 + 3*x + 2 +y := y :: Factored Polynomial Integer +)clear p y -- since y has a value +P := (y + z)*x^2 + z*x + c +P :: UP(x, POLY INT) +P :: UP(x, UP(y, POLY INT)) +P := P :: UP(x, UP(y, UP(z, UP(c, INT)))) +)clear p all +sum(1/((3*r-2)*(3*r+1)*(3*r+4)), r=1..n) +limit(%, n=%plusInfinity) +SA := sum(a + (r-1)*b, r = 1..n) +SA :: UP(a, Polynomial Fraction Integer) +SA :: UP(a, UP(b, FRAC FR POLY INT)) +SG := sum(a*b^(r-1), r=1..n) +)set stream calculate 5 +series((1 + x)^n, x=0) +taylor((1 + x)^n, x=0) +%.6 +xPositive? == (x :: Float > 0) +x := 17-sqrt(300); +xPositive? +x := 18-sqrt(300); +xPositive? +)clear p x +x +xPositive? +halfSum(x, y) == (x + y)/2 +halfSum(1, 3) +halfSum(1.5, 2.5) +halfSum(2, 4) +f(n)==#((2^n)::String) +f(20) +f(n) == (local length; length := #((2^n)::String); _ + if length > 120 then "Too long!" else length) +f 100 +f 1000 +f(n : PositiveInteger) : Any == _ + (local length; length := #((2^n)::String); _ + if length > 120 then "Too long!" else length) +f 0 +g1(x) == 2*x +g2(x) == % +G := 2*x +g3(x) == G +g1(1) +g2(2) +g3(3) +l1 := [1,2,3,4,5] +l2 := map(x +-> x^2,l1) +BE(n) == taylor((1+x)^n, x=0) +BE(5) +BE(6) +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} |