The Mathematica Journal
Departments
Feature Articles
Columns
New Products
New Publications
Classifieds
Calendar
News Bulletins
Mailbox
Letters
Write Us
About the Journal
Staff and Contributors
Submissions
Subscriptions
Advertising
Back Issues
Home
Download this Issue

Inequality Solving

Q: Are there built-in functions for solving sets of (linear) equations and  optimization problems, finding a solution that satisfies certain strict  inequalities (e.g., [Graphics:../Images/index_gr_77.gif]), and non-strict inequalities (e.g., [Graphics:../Images/index_gr_78.gif])?
A: Adam Strzebonski (adams@wolfram.com) answers.
The package Algebra`InequalitySolve` (or Experimental`CylindricalAlgebraicDecomposition`) provides functionality for solving systems of inequalities.
[Graphics:../Images/index_gr_79.gif]
[Graphics:../Images/index_gr_80.gif]
[Graphics:../Images/index_gr_81.gif]
The function InequalityPlot, defined below, plots the two-dimensional region satisfying a set of  polynomial inequalities in [Graphics:../Images/index_gr_82.gif] and [Graphics:../Images/index_gr_83.gif] with rational number coefficients.
[Graphics:../Images/index_gr_84.gif]
[Graphics:../Images/index_gr_85.gif]
[Graphics:../Images/index_gr_86.gif]
InequalityPlot could be extended to handle algebraic inequalities with algebraic number  coefficients, and to plot lower-dimensional parts of the solution set, by  using Experimental`CylindricalAlgebraicDecomposition instead of Experimental`GenericCylindricalAlgebraicDecomposition, and extending the cylinderplot code to handle lower-dimensional cylinders.
The region defined by the polynomial inequalities can now be visualized.
[Graphics:../Images/index_gr_87.gif]

[Graphics:../Images/index_gr_88.gif]

For optimization problems you can use Experimental`Minimize` or Experimental`Infimum`. Here are a few examples.
[Graphics:../Images/index_gr_89.gif]
[Graphics:../Images/index_gr_90.gif]
[Graphics:../Images/index_gr_91.gif]
[Graphics:../Images/index_gr_92.gif]
Since the first inequality is strict, the infimum is not attained in the set of points satisfying the constraints.
[Graphics:../Images/index_gr_93.gif]
[Graphics:../Images/index_gr_94.gif]
The computation of Infimum may be significantly faster than the computation of Minimize, especially if all constraints are strict inequalities.
Here is a more complicated example.
[Graphics:../Images/index_gr_95.gif]
[Graphics:../Images/index_gr_96.gif]
We visualize this minimum value, displayed as a point in the following  graphic, by superimposing an InequalityPlot of [Graphics:../Images/index_gr_97.gif] on a ContourPlot of [Graphics:../Images/index_gr_98.gif] over [Graphics:../Images/index_gr_99.gif].
[Graphics:../Images/index_gr_100.gif]

[Graphics:../Images/index_gr_101.gif]


Converted by Mathematica      May 8, 2000

[In and Out Index] [Prev Page][Next Page]