I find the least value of the function h(x) = 1+2*cos(2*x)+3*cos(4*x)+4*cos(8*x). I did
h:=x->1+2*cos(2*x)+3*cos(4*x)+4*cos(8*x);
minimize(h(x),x=-Pi/12..5*Pi/12,location=true);
But i received 1/2-3^(1/2), {[{x = 5/12*Pi}, 1/2-3^(1/2)]}. This is wrong answer. This is shown by
plot(h(x),x=-Pi/12..5*Pi/12);