polylib::discrim -- discriminant
of a polynomial
Introductionpolylib::discrim(p, x) returns the
discriminant of the polynomial p with respect to the
variable x.
Call(s)polylib::discrim(p,x)
Parametersx |
- | indeterminante |
p |
- | polynomial or polynomial expression |
Returnspolylib::discrim returns an element of the coefficient
ring of p. If the coefficient ring is Expr or
IntMod(n), an expression is returned.
p
Related
Functions
Detailsnormal
is applied to the discriminant before returning it.
Example
1We compute the discriminant of the general quadratic equation:
>> polylib::discrim(a*x^2 + b*x + c, x);
2
b - 4 a c
BackgroundThe discriminant of p with respect to the variable
x is defined as:
(-1)^(d * (d-1) / 2) * resultant(p, diff(p, x), x) / cwhere d is the degree and c is the leading coefficient of p.
discrim