next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Elimination :: discriminant(RingElement,RingElement)

discriminant(RingElement,RingElement)

Synopsis

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.00154309 seconds

                      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.000871073 seconds

                        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

See also