# Solving for Polynomial roots

This simple Solve gives the roots of a quadratic:

Solve[a x^2 + b x + c == 0, x]


However, if I factor the polynomial in terms of its "unknown" roots x1 and x2, this code does not work

Solve[a x^2 + b x + c == (x - x1) (x - x2), {x1, x2}]


to solve for x1 and x2 (which in this case, we know, they are the roots found by the first code. Why not? How can I code a solution in this spirit in mathematica?

I need to find a way to employ a solution which is in the spirit of the second code, however, for the following reason.

In my real problem, I seek the roots of a degree 5 polynomial. Indeed, this general problem cannot be solved (see: Galois). However, in my case, several of the roots are given by known functions of the other roots. I plan to insert this information into the factored form on the RHS of code in the form of my second code above.

• You are solving 2 variables with 1 equation; and Mathematica did give a correct answer. What answer do you expect? – vapor May 23 '16 at 17:46
• Consider SolveAlways[a x^2 + b x + c == (x - x1) (x - x2), x]. But you do know the Vieta formulae, no? In that case, you can then use SymmetricPolynomial[]. – J. M.'s technical difficulties May 23 '16 at 17:48
• I understand it is fewer equations than variables, yes. But we know what the solutions x1 and x2 are, as they are given by the "quadratic formula" or the first code. How does this work? How is mma able to solve for both roots with only 1 equation in the first code but not in the second? – Steve May 23 '16 at 17:48
• SolveAlways[a x^2 + b x + c == (x - x1) (x - x2), x] does not give the correct solutions for x1 and x2 – Steve May 23 '16 at 17:50
• It was intended as a starting point; did you notice that you can get equations entirely in terms of b, c, x1, and x2 from it, which you can then feed to Solve[]? – J. M.'s technical difficulties May 23 '16 at 17:53

Reduce[ForAll[x, a x^2 + b x + c == a (x - x1) ( x - x2)], {x1, x2},Backsubstitution -> True]

• Indeed it does, as I've posed it here. However, unfortunately this solution breaks already for degree 3, despite the Cubic Formula existing in general. Reduce[ForAll[x, x^3 + a x^2 + b x + c == (x - x1) (x - x2) (x - x3)], {x1, x2, x3}, Backsubstitution -> True] doe not work. – Steve May 23 '16 at 18:16
• Great work happy fish, you are right, that fixed it. Unfortunately, since no "Quintics->True" Option exists in mathematica, I still won't be able to employ this method for my problem... – Steve May 23 '16 at 18:23
• @Steve, I don't know what you mean by "does not work"; by default, Mathematica uses Root[] to denote roots of polynomials. This is because, as you mention, not all roots admit explicit radical expressions. – J. M.'s technical difficulties May 23 '16 at 18:30