Revision history [back]

How to calculate discriminant using symmetric polynomials?

I want to calculate discriminants using symmetric polynomials. I am working on the quadratic discriminant first. Here is my attempt:

P.<x1,x2>=PolynomialRing(QQ)
S=SymmetricFunctions(P.base_ring())
e = S.elementary()
e(S.from_polynomial((x1-x2)^2))


this produces

e[1, 1] - 4*e[2]


How can I convert this output to b^2 - 4 * a * c?

Thank you