# How to find maximum value of a function (not maxima)

• Jan 5th 2013, 07:56 AM
MattBurrows
How to find maximum value of a function (not maxima)
When using the trapezium rule to approximate a definite integral between a and b, the error is bounded by:

(1/12)(b-a)(h^2) * max(a<= x <= b)|f''(x)|

According to my notes, the way to find the max value of f''(x) is to differentiate again to find f'''(x) and find where this is zero (maximum), makes sense but what if the maximum isn't the actual maximum value f''(x) can take ? As in you could have a maximum turning point but then further along the x-axis the graph could go back up, higher than the value of the maximum (still within [a,b]) then f(b) could be the max(a<=x<=b)|f''(x)|. E.g. some graph of x^3

Thanks :)
• Jan 5th 2013, 11:46 AM
russo
Re: How to find maximum value of a function (not maxima)
In my case, as I learnt it, $\displaystyle |f''(\xi)|$ 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 $\displaystyle |f''(x)|$. That number will be bigger than $\displaystyle |f''(\xi)|$ 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
• Jan 5th 2013, 09:43 PM
hollywood
Re: How to find maximum value of a function (not maxima)
You're right - the place where the third derivative is zero will be a local maximum (or it could also be a local minimum or inflection point) of the second derivative. But a local maximum is not a global maximum.

I was taught to find the global maximum by looking at: endpoints, places where the derivative is zero, and places where the derivative fails to exist. We called them critical points.

Since you're doing a numerical integration, you might be able to do a calculation to find the maximum directly.

- Hollywood