8 views (last 30 days)

Show older comments

Niels
on 25 Jan 2017

Edited: Niels
on 25 Jan 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

Walter Roberson
on 26 Jan 2017

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

Start Hunting!