I'm using Mathematica 8

I've been searching the net without luck for this specific solutions:

Suppose I have an inequality f(x;M,m)>0 where I KNOW that M>4m and m>0. How can I let Mathematica know this so that when solving the inequality using Reduce I don't get twenty irrelevant solutions, but instead only solutions where 0<4m

I've used assumptions and so on but without luck, for instance:

Assuming[m > 0, Reduce[(x + m)*(x - m) < 0]]


x \[Element] Reals && (m < -Sqrt[x^2] || m > Sqrt[x^2])

m<-Sqrt is unnecessary here, so why does Mathematica write it out? How can we stop it?

  • 1
    $\begingroup$ Like Reduce[{(x + m)*(x - m) < 0, m > 0}]? $\endgroup$ Apr 11, 2013 at 18:24
  • $\begingroup$ Hey thanks for the tip...it works. Also it seems that one can have several constraints by using a simple comma. Thanks man! $\endgroup$
    – Ker
    Apr 11, 2013 at 18:27
  • 4
    $\begingroup$ Just fit everything into a list: Reduce[{equation, inequality1, inequality2, ...}] $\endgroup$ Apr 11, 2013 at 18:28

1 Answer 1


Although the comments already solved the problem, here is an answer with slight additions:

Assumptions and the command Assuming (which makes assumptions locally), don't affect Reduce. A good way to check whether a given command (say Solve) is affected by Assuming is to look through the Options for that function and see if Assumptions is among them. If not, then Assuming won't work either (at least to my knowledge).

So if you want to use Reduce inside Assuming and make sure that Reduce obeys the assumptions, you could include them in the list of expressions as follows:

Assuming[m > 0, Reduce[{$Assumptions, (x + m)*(x - m) < 0}]]

(* ==> m > 0 && -Sqrt[m^2] < x < Sqrt[m^2] *)

Here I'm invoking the variable $Assumptions in a list together with the inequality that I want Reduce to work with.

  • $\begingroup$ I cannot recall seeing that method before. +1 $\endgroup$
    – Mr.Wizard
    Apr 13, 2013 at 3:08

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.