Trying to Solve quadratic inequalities

4 visualizaciones (últimos 30 días)
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos el 31 de Dic. de 2023
Comentada: Athanasios Paraskevopoulos el 31 de Dic. de 2023
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 = 

Respuesta aceptada

Torsten
Torsten el 31 de Dic. de 2023
Editada: Torsten el 31 de Dic. de 2023
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 comentario
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos el 31 de Dic. de 2023
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.

Iniciar sesión para comentar.

Más respuestas (1)

John D'Errico
John D'Errico el 31 de Dic. de 2023
Editada: John D'Errico el 31 de Dic. de 2023
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.

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by