I am trying to reduce a bunch of inequalities using the Reduce command in Mathematica. But the output is very convoluted and I am wondering if there's a way to systematically organize it so that I can actually write it on a piece of paper, or at the very least, read it correctly.
For example,
Reduce[h1>=0 && h2>=0 && 2*x>=0 && -m+h1+y>=0 && m+x-y>=0 && h2-x+2y>=0, {x,y}]
produces output that looks like this
which, needless to say, looks horrendous.
Is there a way to clean this up?
Answer
If you are OK with turning the Or
s into Column
s, you can do something like:
result = Reduce[
h1 >= 0 && h2 >= 0 && 2*x >= 0 && -m + h1 + y >= 0 &&
m + x - y >= 0 && h2 - x + 2 y >= 0, {x, y}];
TraditionalForm[
result //.
{Or -> (Column[#, Right, Background -> {{White, LightGray}}, Frame -> All] &)@*List}]
Comments
Post a Comment