Confused about function solve
显示 更早的评论
I am trying to use the function "solve" to find out the solution of inequality specified in cond1. Cond1 is shown in the following picture:

However, the solution is not obtained. I also plot the function given by the left of "cond1". Corresponding result shows there exactly exists the feasible solution.
Help!
Thank you in advance!
syms x;
cond1 = (x - 7) * x^2 / 2 - (4 + x)*2 >= 0;
sol = solve(cond1, x, 'ReturnConditions', true);
sol.conditions
2 个评论
Walter Roberson
2020-12-24
Convert it to an equality and solve(), and throw away any complex-valued roots. Then for each root, check to see which side of the root the inequality holds on.
Rik
2020-12-24
Comment posted as flag by yuquan xiao:
Thank you! But I still do not know why such an inequality can not be directly solved with solve().
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Equation Solving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!