Finding extreme values of a single variable function

From Applied Science

If a function is continuous, its rate of change is non-constant and there are intervals in which it's crescent and others where it's decrescent, a natural conclusion is to expect the rate of change to be zero somewhere. [math]\displaystyle{ f'(x) = 0 }[/math] is a necessary but insufficient condition for a point to be a local maximum or minimum. It's insufficient because there are points where [math]\displaystyle{ f'(x) = 0 }[/math] and yet that point is neither a maximum nor a minimum. The same concept applies to multivariable functions. A point can have a necessary property to be a critical point and yet fail to meet other necessary criteria to be a maximum or a minimum.

Take the function [math]\displaystyle{ f(x) = x^3 }[/math] for example. At the origin its rate of change inverts its sign, but this function is strictly crescent and doesn't have a local maximum or minimum anywhere.

Fermat's stationary points

If [math]\displaystyle{ f }[/math] is differentiable at [math]\displaystyle{ c }[/math] and [math]\displaystyle{ c \in D_f }[/math] in an open interval. A requisite for that point to be a local maximum or minimum is [math]\displaystyle{ f'(c) = 0 }[/math].

We begin with the hypothesis that [math]\displaystyle{ c }[/math] is a local maximum. Now let's consider a small step to the right and to the left of that point and call the step [math]\displaystyle{ s }[/math]:

[math]\displaystyle{ f(c) \geq f(x + s) }[/math] (with our starting assumption every step that we take to the right or to the left, from the local maximum, results in going down)

Therefore:

[math]\displaystyle{ f(x + s) - f(c) \leq 0 }[/math] (added [math]\displaystyle{ -f(c) }[/math] to both sides. Note that the inequality wasn't inverted.)

We can divide both sides by a positive constant without affecting the inequality:

[math]\displaystyle{ \frac{f(x + s) - f(c)}{s} \leq \frac{0}{s} }[/math]

We are assuming that [math]\displaystyle{ f }[/math] is differentiable at [math]\displaystyle{ c }[/math], therefore the sided limits exist and are equal to each other:

[math]\displaystyle{ f'(c) = \lim_{s \ \to \ 0^{+}} \frac{f(x + s) - f(c)}{s} \leq 0 }[/math]

With that we have shown that [math]\displaystyle{ f'(c) \leq 0 }[/math].

If we consider [math]\displaystyle{ s \lt 0 }[/math] the previous inequality inverts to being greater than or equal to zero. We calculate the same limit, but from the left [math]\displaystyle{ h \to 0^{-} }[/math]. With that we prove that [math]\displaystyle{ f'(c) \geq 0 }[/math]. With both inequalities being true we conclude that [math]\displaystyle{ f'(c) = 0 }[/math]. It makes perfect sense if we think graphically. To the right and to the left of [math]\displaystyle{ f'(c) }[/math] the derivatives have opposite signs. When the take the sided limits, both converge to the same, horizontal, tangent line.

The same reasoning follows to prove that a local minimum also has [math]\displaystyle{ f'(c) = 0 }[/math].

Note: I have a textbook that does the proof by applying the sign conservation theorem, which condenses the proof by not having to deal with positive and negative increments separately.

Careful! Fermat's theorem of stationary points is not about global maximum or minimum. Take the function [math]\displaystyle{ f(x) = |x| }[/math] for example. At the origin it does have a global minimum, but it's not differentiable there.

Links for the proofs:

The second derivative test

The graphical idea is the application of [math]\displaystyle{ f'(c) = 0 }[/math] to the derivative of the derivative. Suppose that we have an interval and in between the extremes of it the function behaves as a parabola. Then somewhere in that interval the rate of change shifts from positive to negative or vice-versa. Now suppose that the parabola is not just a function, but the derivative itself. Then we have that the point where the derivative changes from crescent to decrescent or vice-versa is [math]\displaystyle{ f''(c) = 0 }[/math].

Theoretically we can have a function that can be derived to the nth order, but for most purposes we lose meaningful interpretations beyond the second or third orders.


If [math]\displaystyle{ f }[/math] admits a second order derivative and the derivative is continuous in an open interval [math]\displaystyle{ I }[/math]. Then, with [math]\displaystyle{ c \in I }[/math] we can state that:

If [math]\displaystyle{ f'(c) = 0 }[/math] and [math]\displaystyle{ f''(c) \gt 0 }[/math]. Then we have a local minimum.
If [math]\displaystyle{ f'(c) = 0 }[/math] and [math]\displaystyle{ f''(c) \lt 0 }[/math]. Then we have a local maximum.