Maxima Function
tellrat (p_1, ..., p_n)
tellrat()
Adds to the ring of algebraic integers known to Maxima the elements which are the solutions of the polynomials p_1, ..., p_n. Each argument p_i is a polynomial with integer coefficients.
tellrat (x)
effectively means substitute 0 for x in rational
functions.
tellrat ()
returns a list of the current substitutions.
algebraic
must be set to true
in order for the simplification of
algebraic integers to take effect.
Maxima initially knows about the imaginary unit %i
and all roots of integers.
There is a command untellrat
which takes kernels and
removes tellrat
properties.
When tellrat
'ing a multivariate
polynomial, e.g., tellrat (x^2 - y^2)
, there would be an ambiguity as to
whether to substitute y^2
for x^2
or vice versa.
Maxima picks a particular ordering, but if the user wants to specify which, e.g.
tellrat (y^2 = x^2)
provides a syntax which says replace
y^2
by x^2
.
Examples:
(%i1) 10*(%i + 1)/(%i + 3^(1/3)); 10 (%i + 1) (%o1) ----------- 1/3 %i + 3 (%i2) ev (ratdisrep (rat(%)), algebraic); 2/3 1/3 2/3 1/3 (%o2) (4 3 - 2 3 - 4) %i + 2 3 + 4 3 - 2 (%i3) tellrat (1 + a + a^2); 2 (%o3) [a + a + 1] (%i4) 1/(a*sqrt(2) - 1) + a/(sqrt(3) + sqrt(2)); 1 a (%o4) ------------- + ----------------- sqrt(2) a - 1 sqrt(3) + sqrt(2) (%i5) ev (ratdisrep (rat(%)), algebraic); (7 sqrt(3) - 10 sqrt(2) + 2) a - 2 sqrt(2) - 1 (%o5) ---------------------------------------------- 7 (%i6) tellrat (y^2 = x^2); 2 2 2 (%o6) [y - x , a + a + 1]