I am solving a problem from Ukrainian school math competition in 14.1 on Windows: to simplify $\frac{2 x_1^2+3 x_1 x_2+2 x_2}{4 x_1^2 x_2+4 x_1x_2 ^2}$ if $x_1, x_2$ are the different roots of $2x^2+5x-7=0$. The simple-minded approach
FullSimplify[(2*x1^2 + 3*x1*x2 + 2*x2^2)/(4 x1^2*x2 + 4*x2^2*x1), Assumptions -> 2 x1^2 + 5 x1 - 7 == 0 && 2 x2^2 + 5 x2 - 7 == 0 && x1 < x2]
(14 - 5 x1 - 5 x2 + 3 x1 x2)/(4 x1^2 x2 + 4 x1 x2^2)
fails. Of course, I can succeed with a Vieta's formula
FullSimplify[(2*x1^2 + 3*x1*x2 + 2*x2^2)/(4 x1^2*x2 + 4*x2^2*x1), Assumptions ->2 x1^2 + 5 x1 - 7 == 0 && 2 x2^2 + 5 x2 - 7 == 0 && x1 < x2 && x1 + x2 == -5/2]
16/35
The question is how to make that simplification without any usage of Vieta's formulas and the explicit formulas for the roots. I find the following tricky way only.
Maximize[{(2*x1^2 + 3*x1*x2 + 2*x2^2)/(4 x1^2*x2 + 4*x2^2*x1), 2 x1^2 + 5 x1 - 7 == 0 && 2 x2^2 + 5 x2 - 7 == 0 && x1 < x2}, {x1, x2}]
{16/35, {x1 -> -(7/2), x2 -> 1}}
The same is produced by
Minimize[{(2*x1^2 + 3*x1*x2 + 2*x2^2)/(4 x1^2*x2 + 4*x2^2*x1), 2 x1^2 + 5 x1 - 7 == 0 && 2 x2^2 + 5 x2 - 7 == 0 && x1 < x2}, {x1, x2}] , doing the job. Are there other ways to this end?
Edit. The question is precised by "and the explicit formulas for the roots".
(2*x1^2 + 3*x1*x2 + 2*x2^2)/(4 x1^2*x2 + 4*x2^2*x1) /. Thread[{x1, x2} -> SolveValues[2 x^2 + 5 x - 7 == 0, x]]. What would you want to go any other way? $\endgroup$2 x1^2 + 5 x1 - 7 == 0 && 2 x2^2 + 5 x2 - 7 == 0 && x1 < x2are enough for the simplification, but it is not so. Also think about the analog of the question for cubic, say to simplify a symmetric expression formed byx1,x2,x3which are rhe roots of a cubic. Don't hesitate to ask forv further explanation in need $\endgroup$(2*x1^2 + 3*x1*x2 + 2*x2^2 + 3 x2*x3 + 2 x3^2 + 3 x1*x3)/(4 x1^2*x2 + 4 x1^2*x3 + 4*x2^2*x1 + 4 x2^2*x3 + 4 x3^2*x1 + 4 x3^2*x2) /. Thread[{x1, x2, x3} -> SolveValues[2 x^3 + 5 x - 7 == 0, x]]outputs(2 + 3/2 (-1 - I Sqrt[13]) + 1/2 (-1 - I Sqrt[13])^2 + 3/2 (-1 + I Sqrt[13]) + 3/4 (-1 - I Sqrt[13]) (-1 + I Sqrt[13]) + 1/2 (-1 + I Sqrt[13])^2)/(2 (-1 - I Sqrt[13]) + (-1 - I Sqrt[13])^2 + 2 (-1 + I Sqrt[13]) + 1/2 (-1 - I Sqrt[13])^2 (-1 + I Sqrt[13]) + (-1 + I Sqrt[13])^2 + 1/2 (-1 - I Sqrt[13]) (-1 + I Sqrt[13])^2). $\endgroup$16/35$\endgroup$