difficult inequality to solve

2 visualizaciones (últimos 30 días)
bk97
bk97 el 25 de En. de 2017
Comentada: Walter Roberson el 26 de En. de 2017
abs((cos(x)+1/2*x^2)-1)*x^4)<=1/24, does anybody have any idea how to solve this on matlab or write down some possible codes?

Respuesta aceptada

Niels
Niels el 25 de En. de 2017
Editada: Niels el 25 de En. de 2017
since your function is even it is symmetric and it is monotone for x>0 or x<0
use fzero
>> f=@(x)((cos(x)+1./2.*x.^2)-1).*x.^4 - 1/24 % subtract the value to transform it into an issue of roots
>> solution=abs(fzero(f,0))
solution =
1.0042
>> range=[-solution solution]
range =
-1.0042 1.0042
  19 comentarios
bk97
bk97 el 26 de En. de 2017
alright thank you for the code about complex value! So could you please tell me if the code with the abs that @Niels has written before does work correctly for real solutions? And what is the conclusion for that
Walter Roberson
Walter Roberson el 26 de En. de 2017
The +/- -1.004205445912837 I show occurs when the imaginary component is 0. It is a higher precision version of the value that Niels posted. The code Niels posted is fine.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by