|
From: Michel T. <ta...@lp...> - 2021-06-09 14:10:04
|
Le 08/06/2021 à 22:57, Karen Kharatian a écrit : > poly_discriminant(a*x^2+b*x+c, x) → b^2-4*a*c (correct) > > but > > poly_discriminant(x^2/2-x+3, x) → -20 (incorrect) > the right answer is ∆ = -5 > > So, Maxima's poly_discriminant and resultant functions work > incorrectly (see my previous message: > https://sourceforge.net/p/maxima/mailman/message/37298869/ > <https://sourceforge.net/p/maxima/mailman/message/37298869/>) > > I disagree. If you compute (%i1) poly_discriminant(x^2 - 2*x+6, x); (%o1) - 20 So you get what you call the correct result when your polynomial has been multiplied by 2, that is normalized. Indeed if you trace what maxima does when computing the discriminant, you will see that it is the normalized polynomial that is fed to the resultant computation: (%i6) :lisp(trace resultant) (RESULTANT) (%i6) poly_discriminant(x^2/2-x+3, x); 0: (MAXIMA::RESULTANT (#:X427 2 1 1 -2 0 6) (#:X427 1 2 0 -2)) 0: RESULTANT returned 20 (%o6) - 20 In this trace, (#:X427 2 1 1 -2 0 6) means x^2 -2*x +6 and (#:X427 1 2 0 -2) means 2*x-2. Generally a polynomial is represented as a list (n,a_n, ....,1,a_1,0,a_0) with the variable in front. At what point has the polynomial been normalized i don't know. Anyways, i don't think it is a good idea to do any form of quotienting, in particular because we may be dealing with several variables polynomials, then dividing by the leading coefficient may produce a big mess. It is precisely to avoid such divisions that one uses pseudo division instead of straight euclidean division in many computations, particularly in the subresultant business. In fact the real originality in the Brown and Traub algorithm is to find an "optimal" way of dealing with these leading coefficients problems. To get a grasp of the computational problem, you can look at https://en.wikipedia.org/wiki/Polynomial_greatest_common_divisor notably at the end, the section pseudo remainder sequences, which is very well done. Anyways in my opinion resultants and so on are defined up to a constant, and it makes no sense to say that the correct answer for the discriminant is this or that. For example the resultant(f,g) is defined as the condition for f and g to have a common root and this leads to the determinant formula you mention. But this is obviously up to a constant. -- Michel Talon |