Assuming that the function is convex and that there is a derivative of f(x) , for all points => there is only one minimum. The reason I emphasize the restriction of the derivative is that in the case where the function looks like two convex functions one next to the other at the intersection point, the derivative does not exist, but the function is still convex and there are two local minima.
The derivative will have opposite signs to the left and to the right of the minima (the slope changes directions). You can see a visualization of this here . With that in mind, you can do a simple binary search in your domain to find a point k that satisfies f'(ke) * f'(k+e) < 0 , the less you choose e , the better the accuracy of the result. When performing the search, let [a,b] be an interval, and k=(a+b)/2 you must select left if f'(k)*f'(a) < 0 and otherwise otherwise.
Having f(x) , f'(x) = (f(x+e)-f(x))/e , you again reduce e , better the accuracy of the derivative.
source share