The progression of a function: extremes

Kapitoly: The progression of a function, The progression of a function: extremes, The progression of a function: monotonicity, Convexity and concavity

Extremes of a function are the points at which the function takes its maximum or minimum values.

Extremes of a function

There are two basic types of extremes - minimum and maximum. We also distinguish between global maximum/minimum and local maximum/minimum. The global maximum is the point at which the function has the largest value of all the points in the definitional domain. If this value is the only one, we say that it is a sharp maximum. A function can have a maximum value at more than one point, just as, for example, two different employees can take a maximum salary of half a million crowns per month. The definitions of minima and maxima are given in the article on functions.

A local minimum is then defined only on part of the defining domain of the function, typically on some interval. Definitions of local maximum and minimum:

  • A function f has a local maximum at a point M ∈ D(f) if there exists some neighborhood U = (M−ε, M+ε), where ε > 0 such that f(x)≤ f(M) holds for all x∈ U∩ D(f).
  • A function f has a local minimum at a point m ∈ D(f) if there exists some neighborhood U = (m−ε, m+ε), where ε > 0 such that f(x)≥ f(m) holds for all x∈ U ∩ D(f).

An example of a function that has infinitely many extrema is the function f(x) = x · sin x:

Graph the function f(x) = x \cdot \sin x

And why is there "for all x∈ U∩ D(f)" in the definition, now why is there that intersection with the defining region? For example, because the function given by this graph...

Graph the function f

a minimum at the point m = 1, but yet in any left neighborhood of the point m = 1, the function is not defined, so it would not hold in that left neighborhood that f(x)≥ f(m). If we still do the intersection with the defining scope, we get only the right neighborhood.

The basic principle of finding extremes

But now let us return to the graph of the function f(x) = x2 + 1 together with its three tangents:

Graph the function f(x)=x^2+1 with three tangents a, b, c

Let us focus first on the tangent c. We see that the tangent touches the graph at the minimum of the function x2 + 1 and is horizontal, i.e. parallel to the axis x. It thus "squeezes" a 180 degree angle with the positive semi-axis x. What would happen if we reversed the function and instead of a minimum, the function had a maximum? Graph the function −x2 + 1:

Graph the function -x^2+1

Notice that the tangent c, which passes through the maximum of the function −x2 + 1, is again parallel to the axis x. This gives us a regularity: if we are looking for the minimum or maximum of a function, we are looking for a tangent that is parallel to the axis x, which has the tangent of the angle it makes with the axis x, equal to zero. From the previous figure, we can see that $tan(180^{\circ})=0$. Thus, in the context of derivatives, we are looking for a point for which its derivative is zero: $f^{\prime}(x)=0$.

Let us calculate the extremum for our favorite function f(x) = x2 + 1 using the derivative. The derivative of the function f is $f^{\prime}(x)=2x$. Next, we look for when the first derivative is zero, i.e., we solve the equation $f^{\prime}(x)=0$; after inserting 2x = 0. This trivially holds for x = 0. We see that this agrees with the fact that the function f(x) = x2 + 1 has a global minimum at the point x = 0.

Exceptions to the "rule"

One would like to say that a function has an extreme at the point x precisely if the derivative is zero at that point. Unfortunately this is not true, it is not that simple. Let's look at the following examples:

  • Let's try to find the extremes of the function f(x) = x3. The first derivative of this function is $f^{\prime}(x)=3x^2$. Let's solve the equation $f^{\prime}(x)=0$, i.e. 3x2 = 0. This is obviously true for x = 0. But does the function x3 have an extreme at the point x = 0? Let's look at the graph:

    Graph the function f(x)=x^3

    We see that at the point x = 0 there is no extreme of the function. Neither global nor local. So why does the derivative come out zero at this point? Because at this point, the tangent t is simply parallel to the axis x, see the following figure:

    The tangent function

  • What about such a nice function f(x) = |x|, i.e. the absolute value from x? From the graph we can see that it has a global minimum at the point x = 0:

    Graph the function f(x)=|x|

    Only this function has no derivative at the point x = 0! At the point x = 0 the function has no tangent, because it is hard to say what the tangent might look like.

It is true that:

  • If the function f has an extreme, i.e., a minimum or maximum, at the point x, and if there is a derivative (!) at that point, then that derivative is zero. It may be that the function has an extremum at the point x and also that the function has no derivative at that point.

  • If the function f has zero derivative at the point x, then there may or may not be an extremum at that point.

How to find the extremes of a function

We will assume that we have as input a function f, which is derivable over its entire definitional domain. Thus, in the first step, we derive the function f, giving the function $f^{\prime}$. Next, we set the first derivative equal to zero, i.e., we solve the equation $f^{\prime}(x) = 0$. The solutions of this equation are the points that are "suspected" of being extremal, or stationary points.

Next, we need to determine which of those stationary points are extremes. We can find this from, for example, the second derivative of the function f. If s is a stationary point, i.e., if $f^{\prime}(s)=0$ holds, then if $f^{\prime\prime}(s) > 0$, then the minimum is at s, while if $f^{\prime\prime} < 0$, then the maximum is at s.

If the second derivative is also zero at this point, then we must continue deriving further, more on that later. Now an example. Consider the function f(x) = 3x2 + 6x. Find its extremes.

Calculate the first derivative: $f^{\prime}(x)=6x+6$. Let's set the first derivative equal to zero:

\begin{eqnarray} 6x+6&=&0\\\x+1&=&0\x&=&-1 \end{eqnarray}

Thus, there is a stationary point at x = −1; a point suspected of being an extremum. We calculate the second derivative. This is equal to the function $f^{\prime\prime}(x)=0x+6$. After inserting the point x = −1, we obtain $f^{\prime\prime}(-1)=6$. The result is positive; the function has a minimum at that point. Graph:

Graph the function f(x)=3x^2+6x

What if the second derivative is also zero?

Let's try to find the extreme of the function f(x) = x4, graph:

Graph the function f(x)=x^4

The first derivative of this function is $f^{\prime}(x)=4x^3$. The solution of the equation $f^{\prime}(x)=0$ is, of course, the single stationary point s = 0. We calculate the second derivative, which is equal to $f^{\prime\prime}(x)=12x^2$. We plug the stationary point s into this second derivative, so we get

$$f^{\prime\prime}(0)=12\cdot0^2=0.$$

We have got zero, which, from what we have stated so far, would mean that there is no extremum at the point. But we see that there is an extremum at the point. If this situation occurs, we derive further. We find the third derivative and add the stationary point s. If a non-zero number comes out, there is a so-called inflection point at the point s (more on that later). If a zero number comes out, we derive further. For the fourth derivative, we make the same decision as for the second - we plug in the stationary point and a positive function value means there is a minimum, a negative one means there is a maximum.

The third derivative is equal to $f^{\prime\prime\prime}(x)=24x$, after the dotting we have $f^{\prime\prime\prime}(0) = 0$, so we derive further. The fourth derivative has the form $f^{\prime\prime\prime\prime}(x)=24$. We see that the fourth derivative is always positive already, from which we can deduce - as with the second derivative - that the function has a minimum at the point s = 0. And it does.

A summary of the procedure for finding the extremes of a function

  1. We are given a function f, which is derivable.

  2. We derive the function f.

  3. We solve the equation $f^{\prime}(x)=0$. We call all s, which are solutions of the equation, stationary points, or points suspected of being extremes.

  4. Calculate the second derivative.

  5. Calculate the function value of all the stationary points s. If $f^{\prime\prime}(s) > 0$, the function has a minimum at s, and if $f^{\prime\prime}(s) < 0$, it has a maximum at s. If $f^{\prime\prime}(s)=0$, then we derive further.

    Hint: if you don't want to remember whether the second derivative has to be positive or negative for there to be a maximum or minimum at a point, simply refer to the function x2. You should know the graph of this function, and the first and second derivatives are simple: $f^{\prime}(x)=2x$ and $f^{\prime\prime}(x)=2$. So the second derivative is always positive, and the function x2 has a minimum at the point x = 0.

  6. Calculate the third derivative. If it is $f^{\prime\prime\prime}(s)\ne0$, then there is an inflection point at s, otherwise we continue the derivative.

  7. Calculate the fourth derivative. If $f^{\prime\prime\prime\prime}(s)\ne0$, then there is an extremum at the point. Otherwise, we derive further.

  8. And so on and so forth. If the first non-zero derivative is an odd derivative, it is an inflection point. If the non-zero derivative is an even derivative, it is an extremum.