Trying to Solve quadratic inequalities

3 ビュー (過去 30 日間)
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos 2023 年 12 月 31 日
Hello, I am a new user of Matlab and I am trying to solve the following inequality
I tried to solve it with the code bellow and as you can see the result is wrong. I am seeking for intervals. What should I do?
syms x
ineq = x^2-2*x+7>12;
sol = solve(ineq, x)
sol = 

採用された回答

Torsten
Torsten 2023 年 12 月 31 日
編集済み: Torsten 2023 年 12 月 31 日
Don't expect that MATLAB succeeds for complicated systems of quadratic inequalities. But for this simple one, it returns a solution:
syms x
ineq = x^2-2*x+7>12;
sol = solve(ineq, x, 'ReturnConditions',1);
sol.conditions
ans = 
  1 件のコメント
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos 2023 年 12 月 31 日
Thank you very much. I am a mathematician and I would like to put in my teaching some examples through Matlab. I am exploring what possibilities this program can give me and at the same time learn to use it for my PhD.

サインインしてコメントする。

その他の回答 (1 件)

John D'Errico
John D'Errico 2023 年 12 月 31 日
編集済み: John D'Errico 2023 年 12 月 31 日
syms x
ineq = x^2-2*x+7>12;
sol = solve(ineq, x,'returnconditions',true)
sol = struct with fields:
x: [2×1 sym] parameters: x conditions: [2×1 sym]
sol.x
ans = 
sol.conditions
ans = 
The result is two half-infinite intervals.
  1 件のコメント
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos 2023 年 12 月 31 日
Thank you very much!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by