yes. I meant that the answer is specific to this question and not applicable for all functions. I don't know exactly which all functions it can be true but I guess it won't be true for any functions which is not monotonically increasing or decreasing.
In the wiki page it is given- overestimate for all concave curves and underestimate for all convex curves.