I have two expressions, and they are same when k is positive and x is non-zero real number. Below code gives me False as output. How can I get True as output when I apply the condition?

Min[k, Max[-k, x]]/x === Min[1, k/Abs[x]]

Many thanks!

  • 4
    $\begingroup$ === is for structural equality, == is for mathematical equality. I believe you intend to check for the latter. $\endgroup$ – Szabolcs Sep 15 '18 at 18:41
  • 3
    $\begingroup$ Amplifying on @Szabolcs comment, evaluate Assuming[{k > 0, Element[x, Reals], x != 0}, Min[k, Max[-k, x]]/x == Min[1, k/Abs[x]] // Simplify] $\endgroup$ – Bob Hanlon Sep 15 '18 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.