next | previous | forward | backward | up | index | toc

# discriminant(RingElement,RingElement)

## Synopsis

• Function: discriminant
• Usage:
discriminant(f,x)
• Inputs:
• f, , a polynomial
• x, , a variable in the same ring
• Optional inputs:
• Algorithm (missing documentation) => ..., default value null,
• Outputs:
• , the discriminant of f with respect to x

## Description

 i1 : R = ZZ/101[x,a,b,c,d] o1 = R o1 : PolynomialRing i2 : f = x^2+a*x+b 2 o2 = x + x*a + b o2 : R i3 : g = x^2+c*x+d 2 o3 = x + x*c + d o3 : R i4 : time eliminate(x,ideal(f,g)) -- used 0.004006s (cpu); 0.00439996s (thread); 0s (gc) 2 2 2 2 o4 = ideal(a*b*c - b*c - a d + a*c*d - b + 2b*d - d ) o4 : Ideal of R i5 : time ideal resultant(f,g,x) -- used 0.00248876s (cpu); 0.0024715s (thread); 0s (gc) 2 2 2 2 o5 = ideal(- a*b*c + b*c + a d - a*c*d + b - 2b*d + d ) o5 : Ideal of R i6 : sylvesterMatrix(f,g,x) o6 = {-3} | 1 a b 0 | {-2} | 0 1 a b | {-3} | 1 c d 0 | {-2} | 0 1 c d | 4 4 o6 : Matrix R <-- R i7 : discriminant(f,x) 2 o7 = - a + 4b o7 : R