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.
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 useSymmetricPolynomial[]
. $\endgroup$x1
andx2
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? $\endgroup$SolveAlways[a x^2 + b x + c == (x - x1) (x - x2), x]
does not give the correct solutions forx1
andx2
$\endgroup$b
,c
,x1
, andx2
from it, which you can then feed toSolve[]
? $\endgroup$