go to www.bildungsgueter.de table of contents

First Steps with Axiom


To start Axiom, open a terminal window and enter this command:

axiom -noht

Now, the termial window acts as the Axiom dialog window.

Now that you have a dialog window, try to type in a simple formula, let's say a sum with five elements:

The most elementary simplifications are always performed. When possible, the elements of a sum are collected:

-> 2*x + 5*y - x + 2*z + 2*y
   2z + 7y + x
       Type: Polynomial(Integer)

Note that the variables are now alphabetically sorted. This does not seem to be a simplification, but it improves the readability of complicated formulae.

Note also that Axiom answers not only the simplified expression, but also its type. Types play a crucial role in Axiom, their importance will be discussed in a separate chapter later on.

The coloring of the input and the type information shown here follows the usage of the Texmacs frontend. When used in a terminal window, Axiom does not use text coloring.

If you do not want to see the type information, you can turn it off with this command:

-> )set messages type off

To turn the type information on again, enter

-> )set messages type on

The collection of similar elements of a sum works also when functions occur in a sum:

-> 2*sin(x) + cos(x) - sin(x)
   sin(x) + cos(x)
        Type: Expression(Integer)

Square roots are simplified by factoring of perfect squares

-> sqrt(150)
   

  5
  
  
    6
  

        AlgebraicNumber

Polynomial Arithmetic with Remainders

(1) -> poly := x**6 + 19*x**5 + x**4 - 14*x**3 - x**2 - 3*x + 1
(1) -> 
         6      5    4      3    2
   (1)  x  + 19x  + x  - 14x  - x  - 3x + 1
                                                    Type: Polynomial(Integer)

(2) -> polym := poly :: Polynomial(PrimeField(11))
(2) -> 
         6     5    4     3      2
   (2)  x  + 8x  + x  + 8x  + 10x  + 8x + 1
                                             Type: Polynomial(PrimeField(11))
(3) -> factor(%)
(3) -> 
                 2            3     2
   (3)  (x + 1)(x  + 5x + 3)(x  + 2x  + 3x + 4)
                                   Type: Factored(Polynomial(PrimeField(11)))
(4) -> expand(%)
(4) -> 
         6     5    4     3      2
   (4)  x  + 8x  + x  + 8x  + 10x  + 8x + 1
                                             Type: Polynomial(PrimeField(11))
(5) ->

table of contents