In my case, as I learnt it, is in a certain point which is maximum but we don't know it (because some times the function was not given). So a way to approximate it was to get a limit value which would be bigger than the error itself. First get approximately the x value of the maximum of the original function (by drawing it) and then specialize it in . That number will be bigger than and so the error. The result will guarantee that your approximation is off by less than error you got.
I'm not sure if that helps but that's the way I've always done it