0
$\begingroup$

Simplify[c>0 && a/c <= b/c] results in c > 0 && a <= b, as hoped. However when a and b are even slightly complicated expressions, rather than variables, then even if c is still a variable, then Simplify no longer drops c. Is there a way to force this simplification to be performed?

$\endgroup$
2
  • 2
    $\begingroup$ Can you also give a (simple) example of a case where your desired simplification does not happen? The behavior may depend on the structure of the expression you are simplifying. $\endgroup$
    – MarcoB
    Mar 18, 2019 at 16:18
  • $\begingroup$ As an example, c>0 && a/c <= (Sqrt[e^2])/c is simplified to c > 0 && (a - Sqrt[e^2])/c <= 0, while c>0 && (a*d)/c <= (b*Sqrt[e^2])/c is not simplified at all. $\endgroup$ Mar 19, 2019 at 19:33

2 Answers 2

1
$\begingroup$

With version 11.3 use MultiplySides

ineq = a/c <= b/c;

If you know that the denominator is positive,

ineq2 = Assuming[c > 0, MultiplySides[ineq, c]]

(* a <= b *)

Or, if you know the denominator is negative,

ineq3 = Assuming[c < 0, MultiplySides[ineq, c]]

(* b <= a *)

EDIT: Also, look at Reduce

Reduce[c > 0 && a/c <= b/c]

(* b ∈ Reals && a <= b && c > 0 *)

Assuming[c > 0 && Element[b, Reals], 
  Reduce[c > 0 && a/c <= b/c] // Simplify]

(* a <= b *)
$\endgroup$
2
  • $\begingroup$ Unfortunately, what I am trying to do is not just to simplify a single inequality, but rather simplify a complex boolean combination of a bunch of inequalities... $\endgroup$ Mar 19, 2019 at 19:26
  • $\begingroup$ That said, Simplify[MultiplySides[c>0 && (a*d)/c <= (b*Sqrt[e^2])/c, c] does produce c > 0 && b*Sqrt[e^2] >= a*d, so it might be workable - I will try it in my actual example. $\endgroup$ Mar 19, 2019 at 19:37
1
$\begingroup$

You should provide the c>0 part as an assumption to the Simplify function. Try e.g.

Simplify[(a*d)/c <= (b*Sqrt[e^2])/c, c > 0]
Assuming[c > 0, Simplify[(a*d)/c <= (b*Sqrt[e^2])/c]]`

(* Out: a*d <= b*Sqrt[e^2] *)

Both remove c from the denominator.

$\endgroup$
1
  • $\begingroup$ This works with slightly more complex inequalities, but not by far. Also, it does not help simplify more Boolean combinations of inequality, where c>0 is part of a local clause, but is not true for other clauses... $\endgroup$ Mar 20, 2019 at 20:26

Your Answer

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

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