0
$\begingroup$

I am a very beginner of Mathematica and the following will probably be a very stupid question. I have a bunch of inequalities in 6 unknowns and I want to find the set of values satisfying them. Can I do it in Mathematica? I have tried using the command Reduce:

    =Reduce[{0 < -a - d + 1 < 1 , 0 < (2a + 2b + 2d - 3e + 2f + 1)/3 < 1 , 

    0 < -f - b + 1 < 1 , 0 < e < 1 , 0 < a < 1 , 

    0 < -(2f - 3e + 2d + 3c + 2b + 2a - 2)/3 < 1 ,  

    0 < f < 1 , 0 < (-3e + 2d + 3c + 2b + 1)/3 < 1 , 0 < d < 1 , 0 < c < 1 , 

    0 < b < 1 , 0 < -(2d + 3c + 2b - 2)/3 < 1}, a, b, c, d, e, f]

I get as Output some Definitions

1   verb    cut down on; make a reduction in
2   verb    make less complex
3   verb    bring to humbler or weaker state or condition
4   verb    simplify the form of a mathematical equation of expression by substituting one term for another
5   verb    lower in grade or rank or force somebody into an undignified situation
6   verb    be the essential element
7   verb    reduce in size; reduce physically
8   verb    lessen and make more modest

Is the number of inequalities too high? If I reduce the number of inequalities and run for example

 =Reduce[{0 < -a - d + 1 < 1 , 0 < (2a + 2b + 2d - 3e + 2f + 1)/3 < 1 , 

        0 < -f - b + 1 < 1 , 0 < e < 1 , 0 < a < 1}, a, b, c, d, e, f]

it works with output

b \[Element] Reals && 
 0 < a < 1 && -a < d < 
  1 - a && ((0 < e <= 1/3 (2 a + 2 d) && -b < f < 
      1/2 (2 - 2 a - 2 b - 2 d + 3 e)) || (1/3 (2 a + 2 d) < e <= 
      1/3 (1 + 2 a + 2 d) && -b < f < 1 - b) || (1/3 (1 + 2 a + 2 d) <
       e < 1 && 1/2 (-1 - 2 a - 2 b - 2 d + 3 e) < f < 1 - b))

Could you help me to understand what I am doing wrong?

$\endgroup$
  • 1
    $\begingroup$ 1) By entering an = at the beginning of an expression (which will turn orange) you get wolfram alpha results, which in this case appear to be nonsense. 2) For mathematica results your syntax is wrong, you need { } around the variable list. $\endgroup$ – george2079 May 16 '16 at 19:53
  • $\begingroup$ Thanks a lot. Hence, what should I type in the Notebook to solve the system of inequalities above? $\endgroup$ – user3285148 May 16 '16 at 19:56
  • $\begingroup$ FindInstance quickly finds one instance satisfying your full system, which tells us it is properly posed. $\endgroup$ – george2079 May 16 '16 at 19:57
  • $\begingroup$ But I want to find the whole set of solutions $\endgroup$ – user3285148 May 16 '16 at 19:57
  • 1
    $\begingroup$ shift-enter to evaluate $\endgroup$ – george2079 May 16 '16 at 20:06
2
$\begingroup$
FindInstance[{
  0 < -a - d + 1 < 1,
  0 < (2 a + 2 b + 2 d - 3 e + 2 f + 1)/3 < 1, 0 < -f - b + 1 < 1,
  0 < e < 1,
  0 < a < 1,
  0 < -(2 f - 3 e + 2 d + 3 c + 2 b + 2 a - 2)/3 < 1,
  0 < f < 1,
  0 < (-3 e + 2 d + 3 c + 2 b + 1)/3 < 1,
  0 < d < 1,
  0 < c < 1,
  0 < b < 1,
  0 < -(2 d + 3 c + 2 b - 2)/3 < 1
  }, {a, b, c, d, e, f}]

{{a -> 1/4, b -> 1/8, c -> 1/6, d -> 1/2, e -> 2/3, f -> 3/8}}

Note if i ask FindInstance to find two instances it does not return in time to suit my patience. (perhaps the result is the only solution) Reduce has the same syntax, but you probably want to specify the domain Reals:

FindInstance[{
     0 < -a - d + 1 < 1,...
      }, {a, b, c, d, e, f},Reals]

This also does not return quickly for me, but It might be worth your while to let it go a couple of hours.

Edit: Reduce did eventually return (maybe 5 minutes). It gives about 10 pages of conditions..(have fun using that result! )

$\endgroup$
2
$\begingroup$
region = Reduce[{0 < -a - d + 1 < 1, 
  0 < (2 a + 2 b + 2 d - 3 e + 2 f + 1)/3 < 1, 0 < -f - b + 1 < 1, 
  0 < e < 1, 0 < a < 1, 
  0 < -(2 f - 3 e + 2 d + 3 c + 2 b + 2 a - 2)/3 < 1, 0 < f < 1, 
  0 < (-3 e + 2 d + 3 c + 2 b + 1)/3 < 1, 0 < d < 1, 0 < c < 1, 
  0 < b < 1, 0 < -(2 d + 3 c + 2 b - 2)/3 < 1},
 {a, b, c, d, e, f}];.

It's really long. Here's a look at the top few levels (the <<2>> etc indicate omitted parts of the expression):

Shallow[region, 5]

enter image description here

$\endgroup$

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.