MATLAB: Bug fminbnd not working

fminbndMATLAB

fplot(@(x) x*(sin(x))^2*cos(x),[-2*pi 2*pi]);
[xMin1 fvalmin1] = fminbnd('-x*(sin(x))^2*cos(x)', -6, 6)
returns xMin1 = 1.0954
fvalmin1 = -0.3963
How is this possible, look at the plot?

Best Answer

No bug. fminbnd is a local minimizer, not a global minimizer.