aboutsummaryrefslogtreecommitdiff
path: root/src/input/tutchap2.input.pamphlet
blob: 83fd148ad2d82a3b6d995264b6d2c5775a51ddc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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)==#(string(2^n))   
f(20)
f(n) == (local length; length := #(string(2^n));     _
                 if length > 120 then "Too long!" else length)
f 100
f 1000
f(n : PositiveInteger) : Any ==                   _
          (local length; length := #(string(2^n));      _
           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}