[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
17.1 Introduction to Polynomials | ||
17.2 Functions and Variables for Polynomials |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Polynome werden in einer allgemeinen Darstellung oder in einer kanonischen
Darstellung (CRE - Cannonical Rational Expressions) gespeichert. Die
CRE-Darstellung ist die Standardform für Operationen mit Polynomen und wird
intern von Funktionen wie factor
oder ratsimp
verwendet.
Ausdrücke in einer CRE-Form sind besonders für die Darstellung von Polynomen
und rationalen Funktionen geeignet. Die CRE-Form nimmt eine Ordnung der
Variablen an. Polynome werden rekursiv als eine Liste definiert, die als
ersten Eintrag den Namen der Variablen und als nächste Einträge die
Exponenten und Koeffizienten der Variablen enthalten. Der Koeffizient kann
eine Zahl oder wiederum ein Polynom sein. Zum Beispiel hat das Polynom
3*x^2-1
die Darstellung (X 2 3 0 -1)
und das Polynom
2*x*y+x-3
die Darstellung (Y 1 (X 1 2) 0 (X 1 1 0 -3))
, wenn
y
die Hauptvariable des Polynoms ist. Ist x die Hauptvariable des
Polynoms, dann ist die Darstellung (X 1 (Y 1 2 0 1) 0 -3)
.
Die Ordnung der Variablen ist in der Regel umgekehrt alphabetisch. Die
Variablen müssen keine Atome sein. Alle Ausdrücke, die nicht die Operatoren
+
, -
, *
, /
oder ^
enthalten, werden in einer
CRE-Darstellung als "Variable" angenommen. Zum Beispiel sind x
,
sqrt(x)
und sin(x+1)
die CRE-Variablen des Ausdrucks
x+sin(x+1)+2*SQRT(x)+1
. Wird vom Nutzer keine abweichende Ordnung der
Variablen mit der Funktion ratvars
definiert, nimmt Maxima eine
alphabetische Ordnung der Variablen an.
Im Allgemeinen werden rationale Funktionen in einer CRE-Form dargestellt, die
keinen gemeinsamen Faktor im Zähler und Nenner haben. Die interne Darstellung
ist ein Paar von Polynomen, die jeweils den Zähler und den Nenner darstellen.
Diesem Paar geht eine Liste mit der Ordnung der Variablen im Ausdruck voraus.
Ein Ausdruck in einer CRE-Form oder der CRE-Formen enthält, wird in der
Ausgabe mit dem Symbol /R/
gekennzeichnet. Mit der Funktion
rat
können allgemeine Ausdrücke in eine CRE-Form transformiert
werden.
Für die Darstellung von Taylor-Polynomen der Funktion taylor
wird eine
erweiterte CRE-Form verwendet. In dieser Darstellung können die Exponenten
von Polynomen auch rationale Zahlen sein. Weiterhin können die Koeffizienten
rationale Funktionen sein. Die erweiterte CRE-Form enthält auch Informationen
über den Grad des Polynoms. In der Ausgabe wird die erweiterte CRE-Form mit
dem Symbol /T/
bezeichnet.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Standardwert: false
algebraic
muss den Wert true
haben, damit algebraische ganze
Zahlen vereinfacht werden.
Standardwert: true
Hat berlefact
den Wert false
, dann wird der Kronecker-Algorithmus
für die Faktorisierung genutzt. Ansonsten wird der Berlekamp-Algorithmus
genutzt. Das ist der Standard.
Die Rückgabe ist die Sylvestermatrix der zwei Polynome p1 und p2
mit der unabhängigen Variablen x. Die Determinante der Sylvestermatrix
ist die Resultante der Polynome. Die Resultante kann auch sofort mit der
Funktion resultant
berechnet werden.
Beispiele:
(%i1) bezout(a*x+b, c*x^2+d, x); [ b c - a d ] (%o1) [ ] [ a b ] (%i2) determinant(%); 2 2 (%o2) a d + b c (%i3) resultant(a*x+b, c*x^2+d, x); 2 2 (%o3) a d + b c
Gibt eine Liste zurück, deren erstes Element der Koeffizient der Variablen
x im Ausdruck expr und deren zweites Element der verbleibende
Teil des Ausdrucks expr ist. Das Ergebnis ist also [A,B]
und es
gilt expr = A * x + B
.
Siehe auch die Funktion coeff
.
Beispiele:
(%i1) bothcoeff(a*x+2,x); (%o1) [a, 2] (%i2) bothcoeff(x^2+a*x+2,x); 2 (%o2) [a, x + 2]
Definition einer Funktion islinear
, die die Funktion bothcoeff
nutzt, um den linearen Anteil eines Ausdrucks zu ermitteln.
(%i1) islinear (expr, x) := block ([c], c: bothcoef (rat (expr, x), x), is (freeof (x, c) and c[1] # 0))$ (%i2) islinear ((r^2 - (x - r)^2)/x, x); (%o2) true
Gibt den Koeffizienten von x^n
im Ausdruck expr
zurück, wobei expr ein Polynom ist.
Das Kommando coeff(expr, x^n)
ist äquivalent zu
coeff(expr, x, n)
. Das Kommando
coeff(expr, x, 0)
gibt den Rest des Ausdrucks expr
zurück, der frei von der Variablen x ist. Wenn nicht angegeben, wird
n als 1 angenommen.
x kann auch eine indizierte Variable oder ein Teilausdruck von expr sein.
coeff
wendet weder die Funktion expand
noch die Funktion
factor
an, um einen Ausdruck zu expandieren oder zu faktorisieren. Daher
kann es zu anderen Ergebnissen kommen, wenn zuvor diese Funktionen angewendet
werden.
Wird coeff
auf Listen, Matrizen oder Gleichungen angewendet, wird die
Funktion auf die Elemente bzw. beide Seiten der Gleichung angewendet.
Siehe auch die Funktion bothcoef
.
Beispiele:
coeff
gibt den Koeffizient x^n
des Ausdruckes
expr zurück.
(%i1) coeff (b^3*a^3 + b^2*a^2 + b*a + 1, a^3); 3 (%o1) b
coeff(expr, x^n)
ist äquivalent zu
coeff(expr, x, n)
.
(%i1) coeff (c[4]*z^4 - c[3]*z^3 - c[2]*z^2 + c[1]*z, z, 3); (%o1) - c 3 (%i2) coeff (c[4]*z^4 - c[3]*z^3 - c[2]*z^2 + c[1]*z, z^3); (%o2) - c 3
coeff(expr, x, 0)
gibt den Rest des Ausdrucksw expr
zurück, der frei von der Variablen x ist.
(%i1) coeff (a*u + b^2*u^2 + c^3*u^3, b, 0); 3 3 (%o1) c u + a u
x kann eine einfache Variable, eine indizierte Variable oder ein Teilausdruck des Ausdrucks expr sein.
(%i1) coeff (h^4 - 2*%pi*h^2 + 1, h, 2); (%o1) - 2 %pi (%i2) coeff (v[1]^4 - 2*%pi*v[1]^2 + 1, v[1], 2); (%o2) - 2 %pi (%i3) coeff (sin(1+x)*sin(x) + sin(1+x)^3*sin(x)^3, sin(1+x)^3); 3 (%o3) sin (x) (%i4) coeff ((d - a)^2*(b + c)^3 + (a + b)^4*(c - d), a + b, 4); (%o4) c - d
coeff
wendet die Funktionen expand
und factor
nicht an.
(%i1) coeff (c*(a + b)^3, a); (%o1) 0 (%i2) expand (c*(a + b)^3); 3 2 2 3 (%o2) b c + 3 a b c + 3 a b c + a c (%i3) coeff (%, a); 2 (%o3) 3 b c (%i4) coeff (b^3*c + 3*a*b^2*c + 3*a^2*b*c + a^3*c, (a + b)^3); (%o4) 0 (%i5) factor (b^3*c + 3*a*b^2*c + 3*a^2*b*c + a^3*c); 3 (%o5) (b + a) c (%i6) coeff (%, (a + b)^3); (%o6) c
coeff
wird bei Listen und Matrizen auf die Elemente und bei Gleichungen
auf die beiden Seiten angewendet.
(%i1) coeff ([4*a, -3*a, 2*a], a); (%o1) [4, - 3, 2] (%i2) coeff (matrix ([a*x, b*x], [-c*x, -d*x]), x); [ a b ] (%o2) [ ] [ - c - d ] (%i3) coeff (a*u - b*v = 7*u + 3*v, u); (%o3) a = 7
Maxima kennt keine Funktion, um eine Liste der Koeffizienten eines Polynoms
zurückzugeben. Die folgende Definition der Funktion coeff_list
liefert
das gewünschte Ergebnis. Neben der Funktion coeff
kommt die
Funktion hipow
zum Einsatz, um den höchsten Koeffizienten zu ermitteln.
Die Funktionen cons
und reverse
werden verwendet, um die
Koeffizienten einer Liste hinzufügen und um die Liste zu invertieren.
coeff_list(a,x) := block([liste], liste:[], for i:0 thru hipow(a,x) do ( liste : cons(coeff(a,x,i),liste) ), reverse(liste) )$
(%i1) coeff_list(2*x^4+3*x^2+1,x); (%o1) [1, 0, 3, 0, 2]
Gibt eine Liste zurück, deren erstes Element der größte gemeinsame
Teiler der Koeffizienten des Polynoms p_1 in der Variablen x_n ist
und dessen zweites Element das durch den größten gemeinsamen Teiler
dividierte Polynom ist. Die anderen Variablen x_1, …, x_n-1
haben dieselbe Bedeutung wie für die Funktion ratvars
.
Beispiel:
(%i1) content (2*x*y + 4*x^2*y^2, y); 2 (%o1) [2 x, 2 x y + y]
Gibt den Nenner des rationalen Ausdrucks expr zurück.
Beispiel:
(%i1) denom(x^2/(x+1)); (%o1) x + 1
Berechnet den Quotienten und den Rest der Division des Polynom p_1 durch
das Polynom p_2 für die Variable x_n. Die anderen Variablen
x_1, …, x_n-1 haben dieselbe Bedeutung wie für die Funktion
ratvars
.
Das Ergebnis ist eine Liste, wobei das erste Element der
Quotient und das zweite Element der Rest ist.
Siehe auch die Funktionen quotient
und remainder
,
die jeweils
den Quotienten und den Rest der Polynomdivision zurückgegeben.
Beispiele:
Im zweiten Beispiel ist y
die Hauptvariable des Ausdrucks.
(%i1) divide (x + y, x - y, x); (%o1) [1, 2 y] (%i2) divide (x + y, x - y); (%o2) [- 1, 2 x]
Ein Beispiel für zwei Polynome in zwei Variablen.
(%i1) poly1 : sum(x^k*y^(6-k), k, 1, 5); 5 2 4 3 3 4 2 5 (%o1) x y + x y + x y + x y + x y (%i2) poly2 : sum(2*k*x^k*y^(3-k), k, 1, 3); 2 2 3 (%o2) 2 x y + 4 x y + 6 x (%i3) divide(poly1, poly2, x); 3 2 2 5 2 4 4 y + 3 x y + 9 x y 23 x y + 16 x y (%o3) [----------------------, ------------------] 54 27 (%i4) expand(first(%)*poly2 + second(%)); 5 2 4 3 3 4 2 5 (%o4) x y + x y + x y + x y + x y
Standardwert: []
Der Optionsvariablen dontfactor
kann eine Liste mit den Variablen
zugewiesen werden, bezüglich der ein Ausdruck nicht faktorisiert werden soll.
Weiterhin wird nicht bezüglich von Variablen faktorisiert, die gemäß
der kanonischen Ordnung der Variablen von geringerer Bedeutung sind, als die
Variablen in der Liste dontfactor
.
Wendet ein Subresultanten-Verfahren an, um die Variablen x_1, …,
x_k aus den Gleichungen eqn_1, …, eqn_n zu eliminieren.
Die Rückgabe ist ein Gleichungssystem mit n - k
Gleichungen, wobei die k-Variablen x_1, …, x_k
eliminiert sind.
Beispiel:
(%i1) eqn1: 2*x^2 + y*x + z; 2 (%o1) z + x y + 2 x (%i2) eqn2: 3*x + 5*y - z - 1; (%o2) - z + 5 y + 3 x - 1 (%i3) eqn3: z^2 + x - y^2 + 5; 2 2 (%o3) z - y + x + 5 (%i4) eliminate([eqn1, eqn2, eqn3], [y,z]); 2 4 3 2 (%o4) [x (45 x + 3 x + 11 x + 81 x + 124)]
Gibt eine Liste zurück, deren erstes Element der größte gemeinsame
Teiler der Polynome p_1, …, p_n ist und deren weitere Elemente
die durch den größten gemeinsamen Teiler dividierten Polynome sind. Der
größte gemeinsame Teiler wird immer mit dem ezgcd
-Algorithmus
bestimmt.
Siehe auch die Funktionen gcd
,
gcdex
und gcdivide
.
Beispiel:
(%i1) poly1 : 6*x^3-17*x^2+14*x-3; 3 2 (%o1) 6 x - 17 x + 14 x - 3 (%i2) poly2 : 4*x^4-14*x^3+12*x^2+2*x-3; 4 3 2 (%o2) 4 x - 14 x + 12 x + 2 x - 3 (%i3) poly3 : -8*x^3+14*x^2-x-3; 3 2 (%o3) - 8 x + 14 x - x - 3 (%i4) ezgcd(poly1, poly2, poly3); 2 3 2 2 (%o4) [2 x - 3, 3 x - 4 x + 1, 2 x - 4 x + 1, - 4 x + x + 1]
Standardwert: true
facexpand
kontrolliert, ob die irreduziblen Faktoren der Faktorisierung
mit factor
in einer expandierten oder in einer rekursiven (CRE-Form)
vorliegen. Der Standard ist, das die Faktoren expandiert werden.
Factors the expression expr, containing any number of variables or
functions, into factors irreducible over the integers.
factor (expr, p)
factors expr over the field of
rationals with an element adjoined whose minimum polynomial is p.
factor
uses ifactors
function for factoring integers.
factorflag
if false
suppresses the factoring of integer factors
of rational expressions.
dontfactor
may be set to a list of variables with respect to which
factoring is not to occur. (It is initially empty). Factoring also
will not take place with respect to any variables which are less
important (using the variable ordering assumed for CRE form) than
those on the dontfactor
list.
savefactors
if true
causes the factors of an expression which
is a product of factors to be saved by certain functions in order to
speed up later factorizations of expressions containing some of the
same factors.
berlefact
if false
then the Kronecker factoring algorithm will
be used otherwise the Berlekamp algorithm, which is the default, will
be used.
intfaclim
if true
maxima will give up factorization of
integers if no factor is found after trial divisions and Pollard's rho
method. If set to false
(this is the case when the user calls
factor
explicitly), complete factorization of the integer will be
attempted. The user's setting of intfaclim
is used for internal
calls to factor
. Thus, intfaclim
may be reset to prevent
Maxima from taking an inordinately long time factoring large integers.
Examples:
(%i1) factor (2^63 - 1); 2 (%o1) 7 73 127 337 92737 649657 (%i2) factor (-8*y - 4*x + z^2*(2*y + x)); (%o2) (2 y + x) (z - 2) (z + 2) (%i3) -1 - 2*x - x^2 + y^2 + 2*x*y^2 + x^2*y^2; 2 2 2 2 2 (%o3) x y + 2 x y + y - x - 2 x - 1 (%i4) block ([dontfactor: [x]], factor (%/36/(1 + 2*y + y^2))); 2 (x + 2 x + 1) (y - 1) (%o4) ---------------------- 36 (y + 1) (%i5) factor (1 + %e^(3*x)); x 2 x x (%o5) (%e + 1) (%e - %e + 1) (%i6) factor (1 + x^4, a^2 - 2); 2 2 (%o6) (x - a x + 1) (x + a x + 1) (%i7) factor (-y^2*z^2 - x*z^2 + x^2*y^2 + x^3); 2 (%o7) - (y + x) (z - x) (z + x) (%i8) (2 + x)/(3 + x)/(b + x)/(c + x)^2; x + 2 (%o8) ------------------------ 2 (x + 3) (x + b) (x + c) (%i9) ratsimp (%); 4 3 (%o9) (x + 2)/(x + (2 c + b + 3) x 2 2 2 2 + (c + (2 b + 6) c + 3 b) x + ((b + 3) c + 6 b c) x + 3 b c ) (%i10) partfrac (%, x); 2 4 3 (%o10) - (c - 4 c - b + 6)/((c + (- 2 b - 6) c 2 2 2 2 + (b + 12 b + 9) c + (- 6 b - 18 b) c + 9 b ) (x + c)) c - 2 - --------------------------------- 2 2 (c + (- b - 3) c + 3 b) (x + c) b - 2 + ------------------------------------------------- 2 2 3 2 ((b - 3) c + (6 b - 2 b ) c + b - 3 b ) (x + b) 1 - ---------------------------------------------- 2 ((b - 3) c + (18 - 6 b) c + 9 b - 27) (x + 3) (%i11) map ('factor, %); 2 c - 4 c - b + 6 c - 2 (%o11) - ------------------------- - ------------------------ 2 2 2 (c - 3) (c - b) (x + c) (c - 3) (c - b) (x + c) b - 2 1 + ------------------------ - ------------------------ 2 2 (b - 3) (c - b) (x + b) (b - 3) (c - 3) (x + 3) (%i12) ratsimp ((x^5 - 1)/(x - 1)); 4 3 2 (%o12) x + x + x + x + 1 (%i13) subst (a, x, %); 4 3 2 (%o13) a + a + a + a + 1 (%i14) factor (%th(2), %); 2 3 3 2 (%o14) (x - a) (x - a ) (x - a ) (x + a + a + a + 1) (%i15) factor (1 + x^12); 4 8 4 (%o15) (x + 1) (x - x + 1) (%i16) factor (1 + x^99); 2 6 3 (%o16) (x + 1) (x - x + 1) (x - x + 1) 10 9 8 7 6 5 4 3 2 (x - x + x - x + x - x + x - x + x - x + 1) 20 19 17 16 14 13 11 10 9 7 6 (x + x - x - x + x + x - x - x - x + x + x 4 3 60 57 51 48 42 39 33 - x - x + x + 1) (x + x - x - x + x + x - x 30 27 21 18 12 9 3 - x - x + x + x - x - x + x + 1)
Standardwert: false
Hat factorflag
den Wert false
, wird die Faktorisierung von ganzen
Zahlen unterdrückt, die im Nenner auftreten.
Beispiel:
(%i1) factorflag:false; (%o1) false (%i2) factor(1/6*(x^2+2*x+1)); 2 (x + 1) (%o2) -------- 6 (%i3) factorflag:true; (%o3) true (%i4) factor(1/6*(x^2+2*x+1)); 2 (x + 1) (%o4) -------- 2 3
Rearranges the sum expr into a sum of terms of the form
f (x_1, x_2, ...)*g
where g
is a product of
expressions not containing any x_i and f
is factored.
Tries to group terms in factors of expr which are sums into groups of
terms such that their sum is factorable. factorsum
can recover the
result of expand ((x + y)^2 + (z + w)^2)
but it can't recover
expand ((x + 1)^2 + (x + y)^2)
because the terms have variables in
common.
Example:
(%i1) expand ((x + 1)*((u + v)^2 + a*(w + z)^2)); 2 2 2 2 (%o1) a x z + a z + 2 a w x z + 2 a w z + a w x + v x 2 2 2 2 + 2 u v x + u x + a w + v + 2 u v + u (%i2) factorsum (%); 2 2 (%o2) (x + 1) (a (z + w) + (v + u) )
Returns the product of the polynomials p_1 and p_2 by using a
special algorithm for multiplication of polynomials. p_1
and
p_2
should be multivariate, dense, and nearly the same size.
Classical multiplication is of order n_1 n_2
where n_1
is the
degree of p_1
and n_2
is the degree of p_2
.
fasttimes
is of order max (n_1, n_2)^1.585
.
fullratsimp
repeatedly applies ratsimp
followed by non-rational
simplification to an expression until no further change occurs, and returns
the result.
When non-rational expressions are involved, one call to ratsimp
followed as is usual by non-rational ("general") simplification may not be
sufficient to return a simplified result. Sometimes, more than one such call
may be necessary. fullratsimp
makes this process convenient.
fullratsimp (expr, x_1, ..., x_n)
takes one or more
arguments similar to ratsimp
and rat
.
Example:
(%i1) expr: (x^(a/2) + 1)^2*(x^(a/2) - 1)^2/(x^a - 1); a/2 2 a/2 2 (x - 1) (x + 1) (%o1) ----------------------- a x - 1 (%i2) ratsimp (expr); 2 a a x - 2 x + 1 (%o2) --------------- a x - 1 (%i3) fullratsimp (expr); a (%o3) x - 1 (%i4) rat (expr); a/2 4 a/2 2 (x ) - 2 (x ) + 1 (%o4)/R/ ----------------------- a x - 1
is the same as ratsubst
except that it calls itself recursively on its
result until that result stops changing. This function is useful when the
replacement expression and the replaced expression have one or more variables
in common.
fullratsubst
will also accept its arguments in the format of
lratsubst
. That is, the first argument may be a single substitution
equation or a list of such equations, while the second argument is the
expression being processed.
load ("lrats")
loads fullratsubst
and lratsubst
.
Examples:
(%i1) load ("lrats")$
subst
can carry out multiple substitutions.
lratsubst
is analogous to subst
.
(%i2) subst ([a = b, c = d], a + c); (%o2) d + b (%i3) lratsubst ([a^2 = b, c^2 = d], (a + e)*c*(a + c)); (%o3) (d + a c) e + a d + b c
If only one substitution is desired, then a single equation may be given as first argument.
(%i4) lratsubst (a^2 = b, a^3); (%o4) a b
fullratsubst
is equivalent to ratsubst
except that it recurses until its result stops changing.
(%i5) ratsubst (b*a, a^2, a^3); 2 (%o5) a b (%i6) fullratsubst (b*a, a^2, a^3); 2 (%o6) a b
fullratsubst
also accepts a list of equations or a single
equation as first argument.
(%i7) fullratsubst ([a^2 = b, b^2 = c, c^2 = a], a^3*b*c); (%o7) b (%i8) fullratsubst (a^2 = b*a, a^3); 2 (%o8) a b
fullratsubst
may cause an indefinite recursion.
(%i9) errcatch (fullratsubst (b*a^2, a^2, a^3)); *** - Lisp stack overflow. RESET
Gibt den größten gemeinsamen Teiler der Polynome p_1 und p_2
zurück. Die Argumente x_1, … sind optional und haben dieselbe
Bedeutung wie für die Funktion ratvars
.
Die Optionsvariable
gcd
kontrolliert, welcher Algorithmus verwendet wird und kann die
folgenden Werte annehmen:
ez
ezgcd-Alogrithmus
subres
Subresultanten-Algorithmus
red
Reduzierter modularer Algorithmus
spmod
Modularer Algorithmus
false
kein Algorithmus, die Rückgabe ist immer 1
Wendet den erweiterten Euklidischen Algorithmus für die beiden Polynome
p_1 und p_2 an und gibt eine Liste [s, t, u]
mit den
Parametern u, s und t als Ergebnis zurück. Der Parameter
u ist der größte gemeinsame Teiler der Polynome. Die Parameter
s und t sind die Bezoutkoeffizienten, so dass gilt
u = s * p_1 + t * p_2
.
Die Rückgabe der Funktion gcdex
ist in der CRE-Form.
Siehe auch die Funktionen ezgcd
,
gcd
und gcdivide
.
Beispiel:
(%i1) gcdex (x^2 + 1, x^3 + 4); 2 x + 4 x - 1 x + 4 (%o1)/R/ [- ------------, -----, 1] 17 17 (%i2) % . [x^2 + 1, x^3 + 4, -1]; (%o2)/R/ 0
Im folgenden Beispiel ist die unabhängige Variable explizit als x angegeben. Ohne diese Angabe ist y die unabhängige Variable.
(%i1) gcdex (x*(y + 1), y^2 - 1, x); 1 (%o1)/R/ [0, ------, 1] 2 y - 1
Factors the Gaussian integer n over the Gaussian integers, i.e.,
numbers of the form a + b
where a and
b are rational integers (i.e., ordinary integers). Factors are
normalized by making a and b non-negative.
%i
Factors the polynomial expr over the Gaussian integers
(that is, the integers with the imaginary unit %i
adjoined).
This is like factor (expr, a^2+1)
where a is %i
.
Example:
(%i1) gfactor (x^4 - 1); (%o1) (x - 1) (x + 1) (x - %i) (x + %i)
is similar to factorsum
but applies gfactor
instead
of factor
.
Gibt den größten Exponenten des Arguments x zurück, der im
Ausdruck expr auftritt. Treten symbolische Exponenten auf, wird ein
Ausdruck mit max
zurückgegeben. Ist das Argument x nicht im
Ausdruck vorhanden, ist die Rückgabe 0.
Die Funktion hipow
betrachtet keine äquivalenten Ausdrücke. Daher
können die Ausdrücke expand(expr)
und expr ein
verschiedenes Ergebnis haben.
Siehe auch die Funktionen lopow
und coeff
.
Beispiele:
(%i1) hipow (y^3 * x^2 + x * y^4, x); (%o1) 2 (%i2) hipow ((x + y)^5, x); (%o2) 1 (%i3) hipow (expand ((x + y)^5), x); (%o3) 5 (%i4) hipow ((x + y)^5, x + y); (%o4) 5 (%i5) hipow (expand ((x + y)^5), x + y); (%o5) 0 (%i1) hipow ((x+y)^2 + (x+y)^a, x+y); (%o1) max(2, a)
Default value: true
If true
, maxima will give up factorization of
integers if no factor is found after trial divisions and Pollard's rho
method and factorization will not be complete.
When intfaclim
is false
(this is the case when the user
calls factor
explicitly), complete factorization will be
attempted. intfaclim
is set to false
when factors are
computed in divisors
, divsum
and totient
.
Internal calls to factor
respect the user-specified value of
intfaclim
. Setting intfaclim
to true
may reduce
the time spent factoring large integers.
Default value: false
When keepfloat
is true
, prevents floating
point numbers from being rationalized when expressions which contain
them are converted to canonical rational expression (CRE) form.
Note that the function solve
and those functions calling it
(eigenvalues
, for example) currently ignore this flag, converting
floating point numbers anyway.
Examples:
(%i1) rat(x/2.0); `rat' replaced 0.5 by 1/2 = 0.5 x (%o1)/R/ - 2 (%i2) rat(x/2.0), keepfloat; (%o2)/R/ 0.5 x
solve
ignores keepfloat
:
(%i3) solve(1.0-x,x), keepfloat; `rat' replaced 1.0 by 1/1 = 1.0 (%o3) [x = 1]
Gibt den kleinsten Exponenten von x zurück, der im Ausdruck expr
auftritt. Treten symbolische Exponententen auf, wird ein Ausdruck mit
min
zurückgegeben. Ist das Argument x nicht im
Ausdruck enthalten, ist die Rückgabe 0.
Die Funktion lopow
betrachtet keine äquivalenten Ausdrücke. Daher
können die Ausdrücke expand(expr)
und expr ein
verschiedenes Ergebnis haben.
Siehe auch die Funktionen hipow
und coeff
.
Beispiele:
(%i1) lopow ((x+y)^2 + (x+y)^a, x+y); (%o1) min(a, 2)
is analogous to subst (L, expr)
except that it uses ratsubst
instead of subst
.
The first argument of
lratsubst
is an equation or a list of equations identical in
format to that accepted by subst
. The
substitutions are made in the order given by the list of equations,
that is, from left to right.
load ("lrats")
loads fullratsubst
and lratsubst
.
Examples:
(%i1) load ("lrats")$
subst
can carry out multiple substitutions.
lratsubst
is analogous to subst
.
(%i2) subst ([a = b, c = d], a + c); (%o2) d + b (%i3) lratsubst ([a^2 = b, c^2 = d], (a + e)*c*(a + c)); (%o3) (d + a c) e + a d + b c
If only one substitution is desired, then a single equation may be given as first argument.
(%i4) lratsubst (a^2 = b, a^3); (%o4) a b
Default value: false
When modulus
is a positive number p,
operations on rational numbers (as returned by rat
and related functions)
are carried out modulo p,
using the so-called "balanced" modulus system
in which n modulo p
is defined as
an integer k in [-(p-1)/2, ..., 0, ..., (p-1)/2]
when p is odd, or [-(p/2 - 1), ..., 0, ...., p/2]
when p is even,
such that a p + k
equals n for some integer a.
If expr is already in canonical rational expression (CRE) form when modulus
is reset,
then you may need to re-rat expr, e.g., expr: rat (ratdisrep (expr))
,
in order to get correct results.
Typically modulus
is set to a prime number.
If modulus
is set to a positive non-prime integer,
this setting is accepted, but a warning message is displayed.
Maxima will allow zero or a negative integer to be assigned to modulus
,
although it is not clear if that has any useful consequences.
Returns the numerator of expr if it is a ratio. If expr is not a ratio, expr is returned.
num
evaluates its argument.
Expands the expression expr in partial fractions
with respect to the main variable var. partfrac
does a complete
partial fraction decomposition. The algorithm employed is based on
the fact that the denominators of the partial fraction expansion (the
factors of the original denominator) are relatively prime. The
numerators can be written as linear combinations of denominators, and
the expansion falls out.
(%i1) 1/(1+x)^2 - 2/(1+x) + 2/(2+x); 2 2 1 (%o1) ----- - ----- + -------- x + 2 x + 1 2 (x + 1) (%i2) ratsimp (%); x (%o2) - ------------------- 3 2 x + 4 x + 5 x + 2 (%i3) partfrac (%, x); 2 2 1 (%o3) ----- - ----- + -------- x + 2 x + 1 2 (x + 1)
Decomposes the polynomial p in the variable x
into the functional composition of polynomials in x.
polydecomp
returns a list [p_1, ..., p_n]
such that
lambda ([x], p_1) (lambda ([x], p_2) (... (lambda ([x], p_n) (x)) ...))
is equal to p. The degree of p_i is greater than 1 for i less than n.
Such a decomposition is not unique.
Examples:
(%i1) polydecomp (x^210, x); 7 5 3 2 (%o1) [x , x , x , x ] (%i2) p : expand (subst (x^3 - x - 1, x, x^2 - a)); 6 4 3 2 (%o2) x - 2 x - 2 x + x + 2 x - a + 1 (%i3) polydecomp (p, x); 2 3 (%o3) [x - a, x - x - 1]
The following function composes L = [e_1, ..., e_n]
as functions in x
;
it is the inverse of polydecomp:
compose (L, x) := block ([r : x], for e in L do r : subst (e, x, r), r) $
Re-express above example using compose
:
(%i3) polydecomp (compose ([x^2 - a, x^3 - x - 1], x), x); 2 3 (%o3) [x - a, x - x - 1]
Note that though compose (polydecomp (p, x), x)
always returns p (unexpanded),
polydecomp (compose ([p_1, ..., p_n], x), x)
does not
necessarily return [p_1, ..., p_n]
:
(%i4) polydecomp (compose ([x^2 + 2*x + 3, x^2], x), x); 2 2 (%o4) [x + 2, x + 1] (%i5) polydecomp (compose ([x^2 + x + 1, x^2 + x + 1], x), x); 2 2 x + 3 x + 5 (%o5) [------, ------, 2 x + 1] 4 2
Konvertiert das Polynom p in eine modulare Darstellung bezüglich dem
aktuellen Modul. Das Modul ist der Wert der Variablen modulus
.
polymod(p, m
konvertiert das Polynom bezüglich dem Modul
m, anstatt dem aktuellen Modul modulus
.
Siehe modulus
.
Gives the powers of x occuring in expr.
load (powers)
loads this function.
Berechnet den Quotienten der Polynome p_1 und p_2 für die Variable
x_n. Die anderen Variablen x_1, …, x_n-1 haben dieselbe
Bedeutung wie für die Funktion ratvars
.
quotient
gibt das erste Element des Ergebnisses der Funktion
divide
zurück.
Siehe auch die Funktion remainder
.
Beispiel:
(%i1) poly1 : x^3-2*x^2-5*x+7; 3 2 (%o1) x - 2 x - 5 x + 7 (%i2) poly2 : x-1; (%o2) x - 1 (%i3) quotient(poly1, poly2, x); 2 (%o3) x - x - 6
Converts expr to canonical rational expression (CRE) form by expanding and
combining all terms over a common denominator and cancelling out the
greatest common divisor of the numerator and denominator, as well as
converting floating point numbers to rational numbers within a
tolerance of ratepsilon
.
The variables are ordered according
to the x_1, ..., x_n, if specified, as in ratvars
.
rat
does not generally simplify functions other than
addition +
, subtraction -
, multiplication *
, division /
, and
exponentiation to an integer power,
whereas ratsimp
does handle those cases.
Note that atoms (numbers and variables) in CRE form are not the
same as they are in the general form.
For example, rat(x)- x
yields
rat(0)
which has a different internal representation than 0.
When ratfac
is true
, rat
yields a partially factored form for CRE.
During rational operations the expression is
maintained as fully factored as possible without an actual call to the
factor package. This should always save space and may save some time
in some computations. The numerator and denominator are still made
relatively prime
(e.g. rat ((x^2 - 1)^4/(x + 1)^2)
yields (x - 1)^4 (x + 1)^2)
,
but the factors within each part may not be relatively prime.
ratprint
if false
suppresses the printout of the message
informing the user of the conversion of floating point numbers to
rational numbers.
keepfloat
if true
prevents floating point numbers from being
converted to rational numbers.
See also ratexpand
and ratsimp
.
Examples:
(%i1) ((x - 2*y)^4/(x^2 - 4*y^2)^2 + 1)*(y + a)*(2*y + x) / (4*y^2 + x^2); 4 (x - 2 y) (y + a) (2 y + x) (------------ + 1) 2 2 2 (x - 4 y ) (%o1) ------------------------------------ 2 2 4 y + x (%i2) rat (%, y, a, x); 2 a + 2 y (%o2)/R/ --------- x + 2 y
Default value: true
When ratalgdenom
is true
, allows rationalization of
denominators with respect to radicals to take effect.
ratalgdenom
has an effect only when canonical rational expressions (CRE) are used in algebraic mode.
Returns the coefficient of the expression x^n
in the expression expr.
If omitted, n is assumed to be 1.
The return value is free (except possibly in a non-rational sense) of the variables in x. If no coefficient of this type exists, 0 is returned.
ratcoef
expands and rationally simplifies its first argument and thus it may
produce answers different from those of coeff
which is purely
syntactic.
Thus ratcoef ((x + 1)/y + x, x)
returns (y + 1)/y
whereas coeff
returns 1.
ratcoef (expr, x, 0)
, viewing expr as a sum,
returns a sum of those terms which do not contain x.
Therefore if x occurs to any negative powers, ratcoef
should not be used.
Since expr is rationally simplified before it is examined, coefficients may not appear quite the way they were envisioned.
Example:
(%i1) s: a*x + b*x + 5$ (%i2) ratcoef (s, a + b); (%o2) x
Returns the denominator of expr, after coercing expr to a canonical rational expression (CRE). The return value is a CRE.
expr is coerced to a CRE by rat
if it is not already a CRE.
This conversion may change the form of expr by putting all terms
over a common denominator.
denom
is similar, but returns an ordinary expression instead of a CRE.
Also, denom
does not attempt to place all terms over a common denominator,
and thus some expressions which are considered ratios by ratdenom
are not considered ratios by denom
.
Default value: true
When ratdenomdivide
is true
,
ratexpand
expands a ratio in which the numerator is a sum
into a sum of ratios,
all having a common denominator.
Otherwise, ratexpand
collapses a sum of ratios into a single ratio,
the numerator of which is the sum of the numerators of each ratio.
Examples:
(%i1) expr: (x^2 + x + 1)/(y^2 + 7); 2 x + x + 1 (%o1) ---------- 2 y + 7 (%i2) ratdenomdivide: true$ (%i3) ratexpand (expr); 2 x x 1 (%o3) ------ + ------ + ------ 2 2 2 y + 7 y + 7 y + 7 (%i4) ratdenomdivide: false$ (%i5) ratexpand (expr); 2 x + x + 1 (%o5) ---------- 2 y + 7 (%i6) expr2: a^2/(b^2 + 3) + b/(b^2 + 3); 2 b a (%o6) ------ + ------ 2 2 b + 3 b + 3 (%i7) ratexpand (expr2); 2 b + a (%o7) ------ 2 b + 3
Differentiates the rational expression expr with respect to x. expr must be a ratio of polynomials or a polynomial in x. The argument x may be a variable or a subexpression of expr.
The result is equivalent to diff
, although perhaps in a different form.
ratdiff
may be faster than diff
, for rational expressions.
ratdiff
returns a canonical rational expression (CRE) if expr
is a CRE.
Otherwise, ratdiff
returns a general expression.
ratdiff
considers only the dependence of expr on x,
and ignores any dependencies established by depends
.
Example:
(%i1) expr: (4*x^3 + 10*x - 11)/(x^5 + 5); 3 4 x + 10 x - 11 (%o1) ---------------- 5 x + 5 (%i2) ratdiff (expr, x); 7 5 4 2 8 x + 40 x - 55 x - 60 x - 50 (%o2) - --------------------------------- 10 5 x + 10 x + 25 (%i3) expr: f(x)^3 - f(x)^2 + 7; 3 2 (%o3) f (x) - f (x) + 7 (%i4) ratdiff (expr, f(x)); 2 (%o4) 3 f (x) - 2 f(x) (%i5) expr: (a + b)^3 + (a + b)^2; 3 2 (%o5) (b + a) + (b + a) (%i6) ratdiff (expr, a + b); 2 2 (%o6) 3 b + (6 a + 2) b + 3 a + 2 a
Returns its argument as a general expression. If expr is a general expression, it is returned unchanged.
Typically ratdisrep
is called to convert a canonical rational expression (CRE)
into a general expression.
This is sometimes convenient if one wishes to stop the "contagion", or
use rational functions in non-rational contexts.
See also totaldisrep
.
Expands expr by multiplying out products of sums and exponentiated sums, combining fractions over a common denominator, cancelling the greatest common divisor of the numerator and denominator, then splitting the numerator (if a sum) into its respective terms divided by the denominator.
The return value of ratexpand
is a general expression,
even if expr is a canonical rational expression (CRE).
The switch ratexpand
if true
will cause CRE
expressions to be fully expanded when they are converted back to
general form or displayed, while if it is false
then they will be put
into a recursive form.
See also ratsimp
.
When ratdenomdivide
is true
,
ratexpand
expands a ratio in which the numerator is a sum
into a sum of ratios,
all having a common denominator.
Otherwise, ratexpand
collapses a sum of ratios into a single ratio,
the numerator of which is the sum of the numerators of each ratio.
When keepfloat
is true
, prevents floating
point numbers from being rationalized when expressions which contain
them are converted to canonical rational expression (CRE) form.
Examples:
(%i1) ratexpand ((2*x - 3*y)^3); 3 2 2 3 (%o1) - 27 y + 54 x y - 36 x y + 8 x (%i2) expr: (x - 1)/(x + 1)^2 + 1/(x - 1); x - 1 1 (%o2) -------- + ----- 2 x - 1 (x + 1) (%i3) expand (expr); x 1 1 (%o3) ------------ - ------------ + ----- 2 2 x - 1 x + 2 x + 1 x + 2 x + 1 (%i4) ratexpand (expr); 2 2 x 2 (%o4) --------------- + --------------- 3 2 3 2 x + x - x - 1 x + x - x - 1
Default value: false
When ratfac
is true
,
canonical rational expressions (CRE) are manipulated in a partially factored form.
During rational operations the
expression is maintained as fully factored as possible without calling factor
.
This should always save space and may save time in some computations.
The numerator and denominator are made relatively prime, for example
rat ((x^2 - 1)^4/(x + 1)^2)
yields (x - 1)^4 (x + 1)^2)
,
but the factors within each part may not be relatively prime.
In the ctensr
(Component Tensor Manipulation) package,
Ricci, Einstein, Riemann, and Weyl tensors and the scalar curvature
are factored automatically when ratfac
is true
.
ratfac
should only be
set for cases where the tensorial components are known to consist of
few terms.
The ratfac
and ratweight
schemes are incompatible and may not
both be used at the same time.
Returns the numerator of expr, after coercing expr to a canonical rational expression (CRE). The return value is a CRE.
expr is coerced to a CRE by rat
if it is not already a CRE.
This conversion may change the form of expr by putting all terms
over a common denominator.
num
is similar, but returns an ordinary expression instead of a CRE.
Also, num
does not attempt to place all terms over a common denominator,
and thus some expressions which are considered ratios by ratnumer
are not considered ratios by num
.
Returns true
if expr is a canonical rational expression (CRE) or extended CRE,
otherwise false
.
CRE are created by rat
and related functions.
Extended CRE are created by taylor
and related functions.
Default value: true
When ratprint
is true
,
a message informing the user of the conversion of floating point numbers
to rational numbers is displayed.
Simplifies the expression expr and all of its subexpressions,
including the arguments to non-rational functions.
The result is returned as the quotient of two polynomials in a recursive form,
that is, the coefficients of the main variable are polynomials in the other variables.
Variables may include non-rational functions (e.g., sin (x^2 + 1)
)
and the arguments to any such functions are also rationally simplified.
ratsimp (expr, x_1, ..., x_n)
enables rational simplification with the
specification of variable ordering as in ratvars
.
When ratsimpexpons
is true
,
ratsimp
is applied to the exponents of expressions during simplification.
See also ratexpand
.
Note that ratsimp
is affected by some of the
flags which affect ratexpand
.
Examples:
(%i1) sin (x/(x^2 + x)) = exp ((log(x) + 1)^2 - log(x)^2); 2 2 x (log(x) + 1) - log (x) (%o1) sin(------) = %e 2 x + x (%i2) ratsimp (%); 1 2 (%o2) sin(-----) = %e x x + 1 (%i3) ((x - 1)^(3/2) - (x + 1)*sqrt(x - 1))/sqrt((x - 1)*(x + 1)); 3/2 (x - 1) - sqrt(x - 1) (x + 1) (%o3) -------------------------------- sqrt((x - 1) (x + 1)) (%i4) ratsimp (%); 2 sqrt(x - 1) (%o4) - ------------- 2 sqrt(x - 1) (%i5) x^(a + 1/a), ratsimpexpons: true; 2 a + 1 ------ a (%o5) x
Default value: false
When ratsimpexpons
is true
,
ratsimp
is applied to the exponents of expressions during simplification.
Standardwert: false
Hat radsubstflag
den Wert true
, wird verhindert, dass die Funktion
ratsubst
zum Beispiel u
für sqrt(x)
in x
substituiert.
Substitutes a for b in c and returns the resulting expression. b may be a sum, product, power, etc.
ratsubst
knows something of the meaning of expressions
whereas subst
does a purely syntactic substitution.
Thus subst (a, x + y, x + y + z)
returns x + y + z
whereas ratsubst
returns z + a
.
When radsubstflag
is true
,
ratsubst
makes substitutions for radicals in expressions
which don't explicitly contain them.
Examples:
(%i1) ratsubst (a, x*y^2, x^4*y^3 + x^4*y^8); 3 4 (%o1) a x y + a (%i2) cos(x)^4 + cos(x)^3 + cos(x)^2 + cos(x) + 1; 4 3 2 (%o2) cos (x) + cos (x) + cos (x) + cos(x) + 1 (%i3) ratsubst (1 - sin(x)^2, cos(x)^2, %); 4 2 2 (%o3) sin (x) - 3 sin (x) + cos(x) (2 - sin (x)) + 3 (%i4) ratsubst (1 - cos(x)^2, sin(x)^2, sin(x)^4); 4 2 (%o4) cos (x) - 2 cos (x) + 1 (%i5) radsubstflag: false$ (%i6) ratsubst (u, sqrt(x), x); (%o6) x (%i7) radsubstflag: true$ (%i8) ratsubst (u, sqrt(x), x); 2 (%o8) u
Declares main variables x_1, ..., x_n for rational expressions. x_n, if present in a rational expression, is considered the main variable. Otherwise, x_[n-1] is considered the main variable if present, and so on through the preceding variables to x_1, which is considered the main variable only if none of the succeeding variables are present.
If a variable in a rational expression is not present in the ratvars
list,
it is given a lower priority than x_1.
The arguments to ratvars
can be either variables or non-rational functions
such as sin(x)
.
The variable ratvars
is a list of the arguments of
the function ratvars
when it was called most recently.
Each call to the function ratvars
resets the list.
ratvars ()
clears the list.
Assigns a weight w_i to the variable x_i.
This causes a term to be replaced by 0 if its weight exceeds the
value of the variable ratwtlvl
(default yields no truncation).
The weight of a term is the sum of the products of the
weight of a variable in the term times its power.
For example, the weight of 3 x_1^2 x_2
is 2 w_1 + w_2
.
Truncation according to ratwtlvl
is carried out only when multiplying
or exponentiating canonical rational expressions (CRE).
ratweight ()
returns the cumulative list of weight assignments.
Note: The ratfac
and ratweight
schemes are incompatible and may not
both be used at the same time.
Examples:
(%i1) ratweight (a, 1, b, 1); (%o1) [a, 1, b, 1] (%i2) expr1: rat(a + b + 1)$ (%i3) expr1^2; 2 2 (%o3)/R/ b + (2 a + 2) b + a + 2 a + 1 (%i4) ratwtlvl: 1$ (%i5) expr1^2; (%o5)/R/ 2 b + 2 a + 1
Default value: []
ratweights
is the list of weights assigned by ratweight
.
The list is cumulative:
each call to ratweight
places additional items in the list.
kill (ratweights)
and save (ratweights)
both work as expected.
Default value: false
ratwtlvl
is used in combination with the ratweight
function to control the truncation of canonical rational expressions (CRE).
For the default value of false
, no truncation occurs.
Berechnet den Rest der Polynomdivision von p_1 und p_2 für die
Variable x_n. Die anderen Variablen x_1, …, x_n-1 haben
dieselbe Bedeutung wie für die Funktion ratvars
.
remainder
gibt das zweite Element des Ergebnisses der Funktion
divide
zurück.
Siehe auch die Funktion quotient
.
Beispiel:
(%i1) poly1 : x^3-2*x^2-5*x+7; 3 2 (%o1) x - 2 x - 5 x + 7 (%i2) poly2 : x^2+1; 2 (%o2) x + 1 (%i3) remainder(poly1, poly2, x); (%o3) 9 - 6 x
Berechnet die Resultante der Polynome p_1 und p_2 und eliminiert die unabhängige Variable x. Die Resultante ist die Determinate der Sylvestermatrix für die beiden Polynome. Das Ergebnis ist Null, wenn die beiden Polynome p_1 und p_2 einen gemeinsamen Faktor haben.
Können die Polynome p_1 oder p_2 faktorisiert werden, kann es von Vorteil sein, die Faktorisierung zuvor auszuführen.
Die Optionsvariable resultant
kontrolliert, welcher Algorithmus für die
Berechnung der Resultante von Maxima genutzt wird. Die möglichen Werte sind:
subres
Subresultanten-Algorithmus
mod
Modularer Resultanten-Algorithmus
red
Reduzierter Subresultanten-Algorithmus
Die Funktion bezout
berechnet die Sylvestermatrix der Polynome
p_1 und p_2. Die Determinate der Sylvestermatrix ist die
Resultante.
Beispiele:
(%i1) resultant(2*x^2+3*x+1, 2*x^2+x+1, x); (%o1) 8 (%i2) resultant(x+1, x+1, x); (%o2) 0 (%i3) resultant((x+1)*x, (x+1), x); (%o3) 0 (%i4) resultant(a*x^2+b*x+1, c*x + 2, x); 2 (%o4) c - 2 b c + 4 a (%i5) bezout(a*x^2+b*x+1, c*x+2, x); [ 2 a 2 b - c ] (%o5) [ ] [ c 2 ] (%i6) determinant(%); (%o6) 4 a - (2 b - c) c
Default value: false
When savefactors
is true
, causes the factors of an
expression which is a product of factors to be saved by certain
functions in order to speed up later factorizations of expressions
containing some of the same factors.
Returns a list of the canonical rational expression (CRE) variables in
expression expr
.
See also ratvars
.
is similar to factor
except that the polynomial factors are "square-free."
That is, they have factors only of degree one.
This algorithm, which is also used by the first stage of factor
, utilizes
the fact that a polynomial has in common with its n'th derivative all
its factors of degree greater than n. Thus by taking greatest common divisors
with the polynomial of
the derivatives with respect to each variable in the polynomial, all
factors of degree greater than 1 can be found.
Example:
(%i1) sqfr (4*x^4 + 4*x^3 - 3*x^2 - 4*x - 1); 2 2 (%o1) (2 x + 1) (x - 1)
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
.
Beispiele:
(%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]
Konvertiert alle Teilausdrücke im Ausdruck expr von der CRE-Form in die
allgemeine Form und gibt das Ergebnis zurück. Ist expr selbst eine
CRE-Form, dann entspricht totaldisrep
der Funktion ratdisrep
.
totaldisrep
ist insbesondere hilfreich, wenn Gleichungen, Listen oder
Matrizen in eine allgmeine Form zu konvertieren sind.
Entfernt Eigenschaften von den Symbolen x_1, …, x_n, die mit
der Funktion tellrat
zugewiesen wurden.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Robert Dodier on April, 4 2011 using texi2html 1.76.