1
$\begingroup$

I have a big system of equations and want to check if some candidate solutions hold.

Ideally, I want to have an expression that returns 'True' if my candidate solution hold and 'False' otherwise.

Based on previous posts, I decided to use Reduce[my_equtions && candidate_solutions && assumptions_on_variables]

However, Mathematica doesn't fully reduce the system to True / False -- even after using FullSimplify, some trivial terms remain in the output. Especially when my_equations are multiple, long equation, it is hard to find spot manually if the output should be true or not.

Consider as a MWE the system $x a^2 + y b^2 + (-x - y) ab == 0$ with the assumption $y>x>1$ over the reals. We have candidate solutions $a=1/x$, $b=1/y$ , which clearly solve the system.

However,

Reduce[x a^2 + y b^2 + (-x - y) ab == 0 &&  a == 1/x && b == 1/y && 
   y > x > 1, {a, b}, Reals] // FullSimplify

Outputs:

1 < x < y && ab == 1/(x y) && a == 1/x && b == 1/y

Ideally, I would get True or candidate_solutions && assumptions_on_variables. In any case, the part

ab == 1/(x y)

should not be in there, as these terms become very annoying when the system of equations is large.

My questions:

  1. How can I make Reduce to output simply True or candidate_solutions && assumptions_on_variables

  2. Is there a better command to test if given candidate solutions fulfill a system of equations under certain assumptions?

$\endgroup$
2
  • 1
    $\begingroup$ Your ab is not the same as a*b. Typing ab without space is a separate symbol. $\endgroup$
    – user293787
    Jul 26, 2022 at 18:03
  • 1
    $\begingroup$ The canonical way to check a candidate solution is eq=x*a^2+y*b^2+(-x-y)*a*b;candidate={a->1/x,b->1/y};eq/. candidate//Simplify. Another useful command in this ballpark is PossibleZeroQ. $\endgroup$
    – user293787
    Jul 26, 2022 at 18:05

2 Answers 2

2
$\begingroup$
Simplify[
 x a^2 + y b^2 + (-x - y) a*b == 0, {a == 1/x, b == 1/y, y > x > 1}]

True.

$\endgroup$
3
$\begingroup$

Provide the conditions to FullSimplify too.

eq = x a^2 + y b^2 + (-x - y) a b == 0;

cond = a == 1/x && b == 1/y && y > x > 1;

Reduce[eq && cond, {a, b}, Reals] // FullSimplify[#, cond] &

(*   True   *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.