Solve inequation not working with sqrt
1 次查看(过去 30 天)
显示 更早的评论
I tried to solve a simple inequation that had square root of the variable and the solve() function is not giving me the correct answer.
The inequation is:
The code is:
clear;
syms k real
eq = ( -1 + sqrt(1-4*k) )/2 < 1;
solve(eq, k)
And the answer is 0.
Since k is real the answer should be the interval (-2, 1/4)
0 个评论
采纳的回答
Prudhvi Peddagoni
2020-10-1
Hi,
It seems that you did not enable ReturnConditions parameter. So the function is returning only one solution
solve(eq, k,'ReturnConditions',true);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Power Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!