This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / The Mathematica Book / A Practical Introduction to Mathematica / Symbolic Mathematics /

1.5.8 Inequalities

Handling inequalities.

This finds a reduced form for the inequalities.

In[1]:= Reduce[x + y < 1 && y > x > 0, {x, y}]


These inequalities can never be satisfied.

In[2]:= Reduce[x + y < 1 && y > x > 1, {x, y}]


It is easy to end up with rather complicated results.

In[3]:= Reduce[x + y < 1 && y^2 > x > 0, {x, y}]


Equations can often be solved to give definite values of variables. But inequalities typically just define regions that can only be specified by other inequalities. You can use FindInstance to find definite values of variables that satisfy a particular set of inequalities.

This finds a point in the region specified by the inequalities.

In[4]:= FindInstance[x + y < 1 && y^2 > x > 0, {x, y}]


Constrained minimization and maximization.

This gives the maximum, together with where it occurs.

In[5]:= Maximize[{x^2 + y, x^2 + y^2 <= 1}, {x, y}]