I saw that there are two points of minimum and some of rectangles are exactly higher than others, so I need discard them and continue only with the remaining rectangles.
If I can’t see exactly which rectangles are higher I must divide my interval on more rectangles.
Thanks,
Viktoriya.
P.S. I know how draw rectangles on a function:
The notation might be a bit confusing. I suppose that x1, x2 etc are the x-coordinates of the extrema. If that is so to determine the global maximum one might want to calculate
Max[f[x1],f[x2],...] (*This is not Mathematica notation*)
I have found that NMinimize and NMaximize are reasonably good at finding the global extremum if the method used is “SimulatedAnnealing” or “RandomSearch” but not so good with the default method.