How to solve an inequality?
4 views (last 30 days)
Show older comments
Hello everyone, I am writing because I have a problem with the resolution of inequality. How can I solve an inequality (f < 0) of a symbolic function? Eg
syms x;
f = 6*x + 24;
Thanks and sorry for my bad English
0 Comments
Accepted Answer
John D'Errico
on 20 May 2016
Edited: John D'Errico
on 20 May 2016
This is one of the very frequent questions we see here.
You cannot in general "solve" an inequality. An inequality represents a set of values, often infinitely many such values. For example, what is the solution to the inequality
(x - 1)^2 - 4 >= 0
The "solution is two infinite sets,
(-inf,-1] and [3,inf)
Depending on the inequality (> versus >=) the sets may be closed on one end or not. (I'll let you decide how you want to describe the unbounded ends at +/- inf.)
If the problem is highly nonlinear, or in multiple dimensions, then the sets will become quite complicated. As well, the solution sets may also live in the complex plane, which in itself makes the idea of an inequality a difficult thing.
In multiple dimensions, the solution locus will generally be a polytope of some ilk, perhaps with curved facets.
Should you choose to restrain all solutions to the real line, then the simplest thing is to replace the inequality with a strict equality, then solve the equality. Those solutions will represent the end points of intervals that may contain solutions of the inequality. Be careful though. There are obviously no solutions of the inequality (restricted to the real line)
x^2 < 0
even though the solve I describe above would yield 0 as a point of interest.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!