aboutsummaryrefslogtreecommitdiff
path: root/src/input/poly.input.pamphlet
blob: 37fdb61d23e8b662ea386c014e225147d74796f9 (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
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input poly.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
<<*>>=

-- Input for page PolynomialSingleRootPage
)clear all

a := rootOf(a**4+1,a)
definingPolynomial a
b := rootOf(b**2-a-1,b)
a + b
% ** 5
rootOf(c**2+c+1,c)
zeroOf(d**2+d+1,d)
rootOf(e**5-2,e)
zeroOf(f**5-2,f)

-- Input for page PolynomialGCDPage
)clear all

p := 3*x**8 + 2*x**7 + 6*x**2 + 7*x + 2
q := 2*x**13 + 9*x**7 + 2*x**6 + 10*x + 5
gcd(p,q)
resultant(p,q,x)

-- Input for page PolynomialSubstitutionPage
)clear all

p := x**2 + y**2
eval(p,x=5)
eval(p,[x = a + b,y = c + d])
q := x**3 + 5*x - y**4
eval(q,[x=y,y=x])
px := eval(p, y = sin(2.0))
eval(px, x = cos(2.0))

-- Input for page PolynomialFactorizationPage
)clear all

factor(x**3 - 3*x + 2)
factor(x**2/4 + x*y + y**2)
p := x**3 + x*y + 2*x**2*y**2 + 2*y**3 + 3*x**2*z + 6*x*y**2*z
factors := factor p
nthFactor(factors,1)
nthFactor(factors,2)

-- Input for page PolynomialBasicPage
)clear all

p := a*x**2 + b*x*y + c*y**2
q := 13*x**2 + 3*z
p + q
p - 3*q
p**2 + p*q
r := (p + q)**2
setVariableOrder [a,b,c,x,y,z]
p
q
r
resetVariableOrder()
p
coefficient(q,x,2)
coefficient(r,x,3)
c := coefficient(r,z,1)
coefficient(c,x,2)
coefficient(q**2, [x,z], [2,1])
coefficient(r, [x,y], [2,2])

-- Input for page PolynomialRootsPage
)clear all

l := rootsOf(x**4+1,x)
x0**5
definingPolynomial x0
definingPolynomial x1
definingPolynomial x2
x3 := last l
x0 + x1 + x2 + x3
x0 * x1 * x2 * x3
zerosOf(y**4+1,y)
definingPolynomial y1
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}