The discriminant of a homogeneous polynomial is defined, up to a scalar factor, as the resultant of its partial derivatives. For the general theory, see one of the following: Using Algebraic Geometry, by David A. Cox, John Little, Donal O'shea; Discriminants, Resultants, and Multidimensional Determinants, by Israel M. Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky.
i1 : ZZ[a,b,c][x,y]; F = a*x^2+b*x*y+c*y^2 2 2 o2 = a*x + b*x*y + c*y o2 : ZZ[a..c][x..y] |
i3 : time discriminant F -- used 0.0125404 seconds 2 o3 = - b + 4a*c o3 : ZZ[a..c] |
i4 : ZZ[a,b,c,d][x,y]; F = a*x^3+b*x^2*y+c*x*y^2+d*y^3 3 2 2 3 o5 = a*x + b*x y + c*x*y + d*y o5 : ZZ[a..d][x..y] |
i6 : time discriminant F -- used 0.0324636 seconds 2 2 3 3 2 2 o6 = - b c + 4a*c + 4b d - 18a*b*c*d + 27a d o6 : ZZ[a..d] |
The next example illustrates how computing the intersection of a pencil generated by two degree $d$ forms $F(x_0,\ldots,x_n), G(x_0,\ldots,x_n)$ with the discriminant hypersurface in the space of forms of degree $d$ on $\mathbb{P}^n$
i7 : x=symbol x; R=ZZ/331[x_0..x_3] o8 = R o8 : PolynomialRing |
i9 : F=x_0^4+x_1^4+x_2^4+x_3^4 4 4 4 4 o9 = x + x + x + x 0 1 2 3 o9 : R |
i10 : G=x_0^4-x_0*x_1^3-x_2^4+x_2*x_3^3 4 3 4 3 o10 = x - x x - x + x x 0 0 1 2 2 3 o10 : R |
i11 : R'=ZZ/331[t_0,t_1][x_0..x_3]; |
i12 : pencil=t_0*sub(F,R')+t_1*sub(G,R') 4 3 4 4 3 4 o12 = (t + t )x - t x x + t x + (t - t )x + t x x + t x 0 1 0 1 0 1 0 1 0 1 2 1 2 3 0 3 o12 : R' |
i13 : time D=discriminant pencil -- used 0.753106 seconds 108 106 2 102 6 100 8 98 10 96 12 94 14 92 16 90 18 88 20 86 22 o13 = - 62t + 19t t + 160t t + 91t t + 129t t + 117t t + 161t t + 124t t - 82t t - 21t t - 49t t 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 --------------------------------------------------------------------------------------------------------------------------- 84 24 82 26 80 28 78 30 76 32 74 34 72 36 70 38 68 40 66 42 64 44 - 123t t + 5t t - 4t t + 75t t + 103t t + 47t t + 108t t - 62t t - 97t t - 131t t + 71t t 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 --------------------------------------------------------------------------------------------------------------------------- 62 46 60 48 58 50 56 52 54 54 52 56 50 58 48 60 46 62 44 64 42 66 - 68t t - 144t t - 163t t + 10t t - 35t t + 105t t + 7t t + 10t t - 3t t + 76t t - 152t t 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 --------------------------------------------------------------------------------------------------------------------------- 40 68 38 70 36 72 34 74 32 76 30 78 28 80 26 82 24 84 22 86 20 88 - 81t t + 106t t - 11t t - 13t t + 17t t + 18t t + 88t t + 9t t + 58t t - 73t t + 113t t - 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 --------------------------------------------------------------------------------------------------------------------------- 18 90 16 92 14 94 12 96 10 98 8 100 6 102 4 104 2 106 108 154t t - 102t t - 161t t + 33t t - 130t t - 21t t + 157t t + 105t t + 82t t + 69t 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 ZZ o13 : ---[t ..t ] 331 0 1 |
i14 : factor D 9 9 9 9 18 18 2 2 9 2 2 9 o14 = (128t - t ) (128t + t ) (11t - t ) (11t + t ) (t - t ) (t + t ) (39t - 139t t + t ) (39t + 139t t + t ) (69) 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 o14 : Expression of class Product |
The object discriminant is a method function with options.