How to find if f(x) has a minimum or maximum over an interval

62 Views Asked by At

If f(x) is continuous over [-1,6], and f(-1)=-7 and f(4) =-14, then how do you find if there's a minimum or maximum in (-1,6)

2

There are 2 best solutions below

3
On

You calculate $f'(x)$ and check if it vanishes in $[-1,6]$. In that case, you check if it's a minimum or a maximum and confront it with the values you already have.

1
On

If you are asking how to do this without any further information, I don't think it's possible. You can have a parabola with a vertex at $x=0$ passing through both of your points, opening up or down, or $f$ may be a line -- so minimum, maximum and neither are all possible.

However, if you are asking how to find it using other information, since you cannot assume $f$ is differentiable (as you wrote $f$ is only continuous), I would sample a bunch of points in the middle trying to see if you can get $f(x) < -14$ (which would imply a relative extremum in $(x,4)$) or $f(x) > -7$ (which would imply a relative extremum in $(-1,x)$), and then use the bisection algorithm to find the root numerically.

If you can assume $f$ is differentiable and you can solve $f'(x)=0$, that would give you the candidate points.