Rechnen mit Polynomen
> restart;
Beispiel eines Polynoms: pol = 27x3 + 14x2 + x5 − 10x4 − 128x + 96:
> pol:= 27*x^3 + 14*x^2 + x^5 - 10*x^4 - 128*x + 96;
Hinschreiben des Polynoms pol in Normalform:
> pol:= sort(pol);
Berechnung eines einzelnen Koeffizienten von pol:
> a[3]:= coeff(pol, x, 3);
Zerlegen von pol in Einzelterme; Berechnung bestimmter Einzelterme:
> op(pol); op(1, pol); op(3, pol);
Der Grad des Polynoms pol:
> grad:= degree(pol);
Faktorisieren des Polynoms pol:
> factor(pol);
Das Polynom pol im Horner-Schema:
> convert(pol, horner, x);
Berechnen der Nullstellen des Polynoms pol:
> solve(pol, x);
Division des Polynoms pol durch das Polynom pol1 (Polynomdivision
ohne Rest),
Division des Polynoms pol durch das Polynom pol2
(Polynomdivision mit Rest):
r1;
pol2:= x + 5:
divide(pol, pol2, r2);
r2;
pol/pol2;
true
false
> convert(%, parfrac, x);