$SPAD/src/input tutChap2.input

The Axiom Team December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1996.

———-

— * —

\getchunk{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)
-- this takes too long to compute -- 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)  ———-

5

References^{[1] nothing}

6