The domain constructor UnivariatePolynomial (abbreviated UP) creates
domains of univariate polynomials in a specified variable. For example,
the domain UP(a1,POLY FRAC INT)
provides polynomials in the single
variable a1 whose coefficients are general polynomials with rational
number coefficients. UP(x,INT)
is the domain of polynomials in the
single variable x with integer coefficients.
Example operations on univariate polynomials
axiom
(p,q) : UP(x,INT)
Type: Void
axiom
p := (3*x-1)**2 * (2*x + 8)
axiom
q := (1 - 6*x + 9*x**2)**2
axiom
p**2 + p*q
axiom
D p
axiom
integrate p
axiom
p 2
axiom
subst(p,x=2)
Type: Expression(Integer)
axiom
2 p
axiom
p q
axiom
q p
axiom
y:Symbol
Type: Void
axiom
1 y
axiom
w
Type: Variable(w)
axiom
p w
Type: Fraction(Polynomial(Integer))
axiom
vectorise(p,5)
Type: Vector(Integer)
axiom
t : UP(a1,FRAC POLY INT)
Type: Void
axiom
t := a1**2 - a1/b2 + (b1**2-b1)/(b2+3)
axiom
u : FRAC POLY INT := t
Type: Fraction(Polynomial(Integer))
axiom
u :: UP(b1,?)