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$
5
  • $\begingroup$ If x and y and expr are all real, doesn't this mean that (-1)^(1/3) is just -1? $\endgroup$ Commented Oct 2, 2016 at 19:25
  • $\begingroup$ (-1)^(1/3) = 0.500 + 0.867 I $\endgroup$ Commented Oct 2, 2016 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$ Commented Oct 2, 2016 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$ Commented Oct 2, 2016 at 19:42
  • $\begingroup$ @bills - If you want -1 then you would need to use CubeRoot or Surd $\endgroup$ Commented Oct 2, 2016 at 22:45

1 Answer 1

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 *) 
$\endgroup$
3
  • 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$ Commented Oct 3, 2016 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$ Commented Oct 3, 2016 at 16:44
  • $\begingroup$ You're right -- it's cleaner this way. $\endgroup$ Commented Oct 3, 2016 at 17:06

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.