3
$\begingroup$

Given a long list of independent rational expressions, I need to decide in a reliable but quick way whether or not it is possible for each to be purely negative.

Consider the following rational expression:

expr = ((-1)^(1/3)*(x^2 - y))/x^2

Then I would like something like:

Assuming[(# ∈ Reals)& /@ Variables[expr]   (* {x ∈ Reals, y ∈ Reals} *)
 , Simplify[expr ∈ Reals && expr < 0]]

to return False since expr can't be real and negative. But it doesn't work. I have to explicitly tell it that no combination of variables can be zero:

Assuming[{x ∈ Reals, y ∈ Reals, y ≠ x^2, y ≠ 0, x ≠ 0}
 , Simplify[expr ∈ Reals && expr < 0]]

(* False *)

But this breaks my ability to automate this computation. How do I decide whether a rational expression is real and negative in a simpler way?

$\endgroup$
  • $\begingroup$ If x and y and expr are all real, doesn't this mean that (-1)^(1/3) is just -1? $\endgroup$ – bill s Oct 2 '16 at 19:25
  • $\begingroup$ (-1)^(1/3) = 0.500 + 0.867 I $\endgroup$ – QuantumDot Oct 2 '16 at 19:39
  • $\begingroup$ (-1)^(1/3) = 0.500 + 0.867 I or 0.500 + 0.867 I or -1. If you choose a complex root of -1, how can expr be real? $\endgroup$ – bill s Oct 2 '16 at 19:40
  • $\begingroup$ It can't. And I want Mathematica to tell me that. How do I do that in an automated way. Please note that the example given is one of many in a long list (read the first sentence of my post.). $\endgroup$ – QuantumDot Oct 2 '16 at 19:42
  • $\begingroup$ @bills - If you want -1 then you would need to use CubeRoot or Surd $\endgroup$ – Bob Hanlon Oct 2 '16 at 22:45
4
$\begingroup$

Use FullSimplify (instead of Simplify) and you can remove most of the extra assumptions.

expr = ((-1)^(1/3)*(x^2 - y))/x^2;
Assuming[{x \[Element] Reals, y \[Element] Reals}, 
     FullSimplify[expr \[Element] Reals && expr < 0]]

(* False *)
| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ I think the OP wants to test whether any expression is a negative real number for all (valid) real inputs. The OP's example should be False but it does not simplify to False with just Simplify[]. With FullSimplify[], the condition evaluates to False as desired. $\endgroup$ – Michael E2 Oct 3 '16 at 1:06
  • $\begingroup$ The first part of your post answers my question and @MichaelE2 summarizes my request correctly. I am editing your post to remove the unrelated and unneeded stuff near the end; please roll back if you wish. $\endgroup$ – QuantumDot Oct 3 '16 at 16:44
  • $\begingroup$ You're right -- it's cleaner this way. $\endgroup$ – bill s Oct 3 '16 at 17:06

Your Answer

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

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