xzhou
(Xiangyang Zhou)
1
Hi there,
Need help on solving for x5 in the following system:
x2 == 3 (5-x5) && x3 == 2 (3-x5) && x2>=0 && x3 >=0 && x5 >=0
I expect to have something like x5 <= 3, but Reduce gives the following solution:
(x2==6 && x3==0 && x5 ==3) || …
Any suggestions on how to let MMA give x5 <= 3 as the solution?
Many thanks!
Xiangyang
dontdont9
(Bill Nelson)
2
Simplify[
Reduce[x2==3(5-x5)&&x2>=0&&x5>=0]&&
Reduce[x3==2(3-x5)&&x3>=0&&x5>=0],
x2==3(5-x5)&&x2>=0&&x3==2(3-x5)&&x3>=0]
returns
0<=x5<=3
Another way:
Reduce[Exists[{x2, x3},
x2 == 3 (5 - x5) && x3 == 2 (3 - x5) &&
x2 >= 0 && x3 >= 0 && x5 >= 0]]
xzhou
(Xiangyang Zhou)
4
Solved the problem. Many thanks!