2
$\begingroup$

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".

$\endgroup$
8
  • $\begingroup$ I don't see any "simplification" going on here. You just solve for the two roots and insert them into the expression: (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$ Commented Oct 16, 2024 at 17:22
  • $\begingroup$ @Domen: Thank yiu for the interest to the question. Sorry, I don't understand your "I don't see any "simplification" going on here". The point of the question is as follows. I expected the conditions 2 x1^2 + 5 x1 - 7 == 0 && 2 x2^2 + 5 x2 - 7 == 0 && x1 < x2 are 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 by x1,x2,x3 which are rhe roots of a cubic. Don't hesitate to ask forv further explanation in need $\endgroup$ Commented Oct 16, 2024 at 17:46
  • $\begingroup$ @Domen: (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$ Commented Oct 16, 2024 at 18:09
  • $\begingroup$ I have a doubt that approach works for seventh degree. $\endgroup$ Commented Oct 16, 2024 at 18:15
  • 2
    $\begingroup$ @user64494 MMa v12.2 evaluates your first codeline without problems to 16/35 $\endgroup$ Commented Oct 16, 2024 at 20:28

1 Answer 1

4
$\begingroup$

Or introduce a variable w.

Solve[{w == (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}, w, {x1, x2}] 

{{w -> 16/35}}.

$\endgroup$
3
  • $\begingroup$ Even Solve[{w == (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), 2 x1^3 + 5 x1 + 8 == 0, 2 x2^3 + 5 x2 + 8 == 0, 2 x3^3 + 5 x3 + 8 == 0}, w, {x1, x2, x3}] works well. $\endgroup$ Commented Oct 17, 2024 at 4:43
  • $\begingroup$ Something to improve in your code, since the above command produces extraneous results {{w->-(5/96)},{w->(\[InvisiblePrefixScriptBase]^3)\[NegativeVeryThinSpace] -0.575\[Ellipsis]},{w->(\[InvisiblePrefixScriptBase]^3)\[NegativeVeryThinSpace] 0.0923\[Ellipsis]-0.312\[Ellipsis] I},{w->(\[InvisiblePrefixScriptBase]^3)\[NegativeVeryThinSpace] 0.0923\[Ellipsis]+0.312\[Ellipsis] I},...} too $\endgroup$ Commented Oct 17, 2024 at 5:58
  • 1
    $\begingroup$ OK with Solve[{w==(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),2 x1^3+5 x1+8==0,2 x2^3+5 x2+8==0,2 x3^3+5 x3+8==0,x1!=x2,x1!=x3,x2!=x3},w,{x1,x2,x3}]. $\endgroup$ Commented Oct 17, 2024 at 10:09

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.