12
$\begingroup$

I have the following inequality, with conditions:

Reduce[
  {-(a + b) > Sqrt[(a + b)^2 - 4 (a b - c d)], 
  Element[{a, b, c, d}, Reals], a + b < 0, 
  a b - c d > 0, (a + b)^2 > 4 (a b - c d)}, 
  {a, b}
  ]

However, the very first line of the output gives c ∈ Reals && .... In itself, it is rather inconsequential, but it made me wonder if Mathematica doesn't make full use of the given conditions? Another pointer in this direction is that if I remove all the conditions, the output is actually slightly shorter, which doesn't make sense to me.

What is going on here? Thanks.

$\endgroup$
0

2 Answers 2

14
$\begingroup$

What I believe is the issue here is what a statement in your Reduce like c ∈ Reals actually means. You say it's a condition (and I feel you mean assumption), I say it's an expression, a Boolean expression. An expression like x>0 doesn't state that x is greater than 0. It's an undetermined claim about x that is True when x is indeed greater than 0, and False if it is not.

So, as long the truth cannot be determined, the output is the expression itself:

Reduce[x > 0, {x}]
(* x > 0 *)

and

Reduce[x > 0, {x}] /. x -> 5
(* True *)

Similarly,

Reduce[x ∈ Reals, x]
(* x ∈ Reals *)

and

Reduce[x ∈ Reals, x] /. x -> 5
(* True *)

In inequalities Reduce automatically assumes the variables to be Real. It reduces them to the minimum set of expressions that have the same Boolean value. Compare:

Reduce[a > 0, {a}]
(* a > 0 *)

Reduce[a + b > 0, {a, b}]
(* a ∈ Reals && b > -a *)

Reduce[a + b + c > 0, {a, b, c}]
(* (a | b) ∈ Reals && c > -a - b *)

In your case, most of the generated Boolean conditions that must hold for your expression to be true contain inequalities that already imply that the variables contained in them must be real. c is an exception:

Reduce[{
   -(a + b) > Sqrt[(a + b)^2 - 4 (a b - c d)], 
   (a | b | c | d) ∈ Reals, 
   a + b < 0, a b - c d > 0, 
   (a + b)^2 > 4 (a b - c d)}, 
   {a, b}
] // LogicalExpand // Reduce

Mathematica graphics

In the yellow expressions you see no inequality containing c, so its status as real must be made explicit.

Your expression could be better written using a domain specification at the end as:

Reduce[{
  -(a + b) > Sqrt[(a + b)^2 - 4 (a b - c d)], 
  a + b < 0, 
  a b - c d > 0, 
  (a + b)^2 > 4 (a b - c d)}, 
  {a, b}, Reals
]

Mathematica graphics

$\endgroup$
3
  • $\begingroup$ Thank you for the explanation! To others having a hard time seeing the content of the pictures, "ctrl+scroll" is your friend. $\endgroup$ Commented Jan 11, 2017 at 20:11
  • $\begingroup$ @Lovsovs. Thanks. I enlarged the pictures somewhat for easier viewing. $\endgroup$ Commented Jan 11, 2017 at 20:20
  • $\begingroup$ Nice answer. I never really thought of it this way but this makes sense. $\endgroup$
    – Mr.Wizard
    Commented Jan 12, 2017 at 1:52
3
$\begingroup$

Try this:

FullSimplify[
 Reduce[Assuming[
   a + b < 0 && a b - c d > 0 && (a + b)^2 > 4 (a b - c d), -(a + b) >
     Sqrt[(a + b)^2 - 4 (a b - c d)]], {a, b}, Reals]]
$\endgroup$
3
  • $\begingroup$ Thanks! Why doesn't it work the other way around, i.e. Assuming[Reduce[...]]? $\endgroup$ Commented Jan 11, 2017 at 20:15
  • 1
    $\begingroup$ This is not my expertise, but i belive assuming is not a parameter of the reduce function. $\endgroup$
    – Stratus
    Commented Jan 11, 2017 at 21:23
  • $\begingroup$ I've discovered that this may give incorrect results: For instance compare: FullSimplify[ Reduce[Assuming[ a + b < 0 && a b - c d > 0, (a + b)^2 < 4 (a b - c d)], {a, b}, Reals]] and FullSimplify[ Reduce[{a + b < 0, a b - c d > 0, (a + b)^2 < 4 (a b - c d)}, {a, b}, Reals]] - the results are not the same (in the first one the assumption a+b<0 has been thrown away). $\endgroup$ Commented Jan 12, 2017 at 11:23

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.