System of inequalities with <=0

6 次查看(过去 30 天)
Abbi Hashem
Abbi Hashem 2018-12-9
I want to solve a system of equations and an inequality
example
the equation is x1+x2+x3-x4 +x5 - x6 +x7 - 2x8= 2 ( 8 variables )
And I have a set of 17 inequalities that are less than or equal to zero
x1 - x2 +x3 -x4 +4x5 <=0
2x3 +4x2 +4x3 - +3x8 <=0 ...etc ( 15 total inequalities)
Each time I want to substitute the values from the first equation, with ANY 7 of the inequalities to obtain a value for the variables from x1 to x8( that way i'll have 8 total equations and a unique solution for x1 to x8.

回答(1 个)

Walter Roberson
Walter Roberson 2018-12-9
Since the inequalities are <= then solve them all as equalities: you would have 17 variables and 17 linear equations, so provided there is no redundancy you would be able to get exact solutions.
If you were to ask the Symbolic Toolbox to solve the inequalities, it would either fail or else it would choose a specific value that is somehow representative. For example if for one variable the potential solutions ranged from 1/10 to 1 1/4 then the Symbolic Toolbox might choose the representative value 1 . In a previous posting, I cataloged the rules it uses to decide which specific representative value to use.
It is sometimes possible to solve for inequalities. The trick is to convert them to equalities involving an additional variable. For example x1 - x2 +x3 -x4 +4*x5 <=0 could be
syms T1
assume(T1 >= 0)
x1 - x2 +x3 -x4 + 4*x5 == 0 - T1
Then you solve for the x values in terms of the T values, probably using 'returnconditions', true when you solve()

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by