# Extrema of a function

Let $I \subseteq \mathbb{R}$ be an open interval. The function $f: I \to \mathbb{R}$ is:

1.) increasing on $I$ if ($\forall x_1, x_2 \in I$) $(x_1 < x_2) \Longrightarrow( f(x_1) \le f(x_2))$,

2.) strictly increasing on $I$ if ($\forall x_1, x_2 \in I$) ($x_1 < x_2) \Longrightarrow (f(x_1) < f(x_2))$,

3.) decreasing on $I$ if ($\forall x_1, x_2 \in I$ $x_1 < x_2) \Longrightarrow f(x_1) \ge f(x_2)$,

4.) strictly decreasing on $I$ if ($\forall x_1, x_2 \in I$) $(x_1 < x_2) \Longrightarrow( f(x_1) > f(x_2))$.

Functions above are called monotonic functions, that is, strictly monotonic functions.

Let $f$ be the function such that is differentiable on $\left \langle a, b \right \rangle$ and continuous on $[a, b]$.

a) The function $f$ is increasing on $[a,b]$  if $f'(x) > 0, \forall x \in \left \langle a, b \right \rangle$.

b) The function $f$ is decreasing on $[a,b]$ if $f'(x) < 0, \forall x \in \left \langle a, b \right \rangle$.

c) The function $f$ is constant on $[a, b]$ if $f'(x) = 0, \forall x \in \left \langle a, b \right \rangle$.

Let $I \in \mathbb{R}$ be an open interval, $x_0 \in I$ and $f: I \to \mathbb{R}$. Then $x_0$ is a critical number (or stationary point) of the function $f$ if $f'(x_0) = 0$, whereby the function $f$ is defined at $x_0$.

To determine intervals in which the function $f$ is either always increasing or decreasing, first we need to find critical points by solving the equation $f'(x) =0.$

The domain of the function is divided into open intervals with critical numbers and on each of these intervals we need to determine the sign of the first derivative.

Example 1. Determine critical numbers and monotone intervals of the function $f$ if:

$$f(x) = x^5 – 5x^4 +4.$$

Solution:

The first derivative of the function $f$ is equal to:

$$f'(x) = 5 x^4 – 20x^3= 5x^3 (x – 4).$$

Critical numbers we obtain by solving the equation:

$$f'(x) = 0 \Longrightarrow 5x^3 (x – 4) = 0.$$

Solutions of the equation above are:

$$x_1 = 0, \quad \quad x_2 =4,$$

that is, $x_1=0$ and $x_2=4$ are critical numbers.

Therefore, monotone intervals are:

$$\left \langle – \infty, 0 \right \rangle, \left \langle 0, 4 \right \rangle, \left \langle 4, + \infty \right \rangle.$$

Now we choose any point from the each interval and determine the sign of the first derivative:

$$x= -1 \in \left \langle – \infty, 0 \right \rangle,\quad \quad f'(-1) = 20 > 0,$$

$$x=1 \in \left \langle 0, 4 \right \rangle, \quad \quad f'(1) = -15 < 0,$$

$$x = 5 \in \left \langle 4, + \infty \right \rangle, \quad \quad f'(5) = 625 > 0.$$

We can conclude that the function $f$ is increasing on intervals $\left \langle – \infty, 0 \right \rangle$ and $\left \langle 4, + \infty \right \rangle$ and decreasing on $\left \langle 0, 4 \right \rangle$.

Local extrema

Let $I \subseteq \mathbb{R}$ be an open interval, $x_0 \in I$ and $f: I \to \mathbb{R}$.

Then the function $f$ has the local minimum at point $x_0$ if $f(x_0) \le f(x), \forall x \in I$ and the local maximum at point $x_0$ if $f(x_0) \ge f(x), \forall x \in I$.

The local minimum and  local maximum of a function are called local extreme values or  local extrema of a function.

The necessary condition for local extrema (Fermat’s theorem)

If the function $f$ has the local minimum or maximum at point  $x_0$ and if the function $f$ has the first derivative at point $x_0$, then $f'(x_0) = 0$.

Theorem. (First derivative test)

Let $f: I \to \mathbb{R}, I \subseteq \mathbb{R}$ be differentiable function on $I$ and $x_0 \in I$ a critical number.

1.) If $f'(x)$ changes sign from positive to negative around number $x_0$, then $(x_0, f(x_0))$ is a local maximum.

2.) If $f'(x)$ changes sign from negative to positive around number $x_0$, then $(x_0, f(x_0))$ is a local minimum.

3.) If $f'(x)$ has the same sign from both sides of $x_0$, then the local extremum does not exists at $x_0$.

Example 2. Determine local extrema of the function:

$$f(x) = -x^2 + 2x +3.$$

Solution:

Calculate the first derivative:

$$f'(x) = – 2x +2,$$

which is equal to $0$ for $x_0 = 1$. On the interval $\left \langle – \infty, 1 \right \rangle$ the first derivative is positive, that is, in interval $\left \langle – \infty, 1 \right \rangle$ the given function is increasing. The first derivative is negative on the interval $\left \langle 1, + \infty \right \rangle$, that is, the function is decreasing. Therefore, the first derivative changes sign from positive to negative. The value of the function $f$ at point $x_0 = 1$ is equal to:

$$f(1) = -1 + 2 + 3 = 4$$

Finally, the point $T(1,4)$ is the local maximum of the given function $f$ (see the picture below).

Global extrema

Let $f$ be the function defined on $[a, b], a< b$, and $x_0 \in [a,b]$. Then the function $f$ has the global minimum at point $x_0$ if $f(x_0) \le f(x), \forall x \in [a, b]$ and the global maximum at point $x_0$ if $f(x_0) \ge f(x), \forall x \in [a, b]$.

Difference between local and global extrema is that the global extrema of a function is the largest or the smallest value on its entire domain, and local extrema of a function is the largest or the smallest value in a given range of a function.

How to find global extrema of the function $f$ on the closed interval $[a,b]$?

1.) Find all critical numbers of the function $f$ on $\left \langle a, b \right \rangle$.

2.) Evaluate the function $f$ at the endpoints $a$ and $b$ and at all critical numbers from the step 1.)

3.) The largest of obtained values is the absolute maximum and the smallest is the absolute minimum.

Example 3. Find the global minimum and global maximum of the function $f$ on the interval $[-4,4]$ if

$$f(x) = 2x^3 – 3x^2 – 36x.$$

Solution:

We finding the first derivative:

$$f'(x) = 6x^2 – 6x – 36 = 6(x^2 – x – 6).$$

Critical numbers we find by solving the equation $f'(x) = 0$, that is $x^2 – x – 6=0$. We obtain that critical numbers are $x_1 = – 2$ and $x_2 = 3$.

Now we need evaluate the function $f$ at the endpoints of the interval $[a,b]=[-4, 4]$ and at all critical numbers. Therefore, we have:

$$f(a) = f( -4) = -128 – 48 + 144 = -32,$$

$$f(x_1) = f(-2) = -16 – 12 + 72 = 44 ,$$

$$f(x_2) = f(3) =54 – 27 – 108 = -81 ,$$

$$f(b) = f(4) = 128 – 48 – 144 = -64.$$

The largest value of the function $f$ is $44$ at the point $x_1 = – 2$, and the smallest value of the function $f$ is $-81$ at the point $x_2 = 3$. Therefore, the point $m(3, -81)$ is the absolute minimum of the function $f$ and point $M(-2, 44)$ is the absolute maximum of the function $f$ on the interval $[-4, 4]$.

The sign of the first derivative in the neighborhood of a critical number it is not always easy to determine. Therefore, there is one more criteria for determining the character of a critical number, by using the second derivative.

Concavity and points of inflection

The function $f:I \to \mathbb{R}, I \subseteq \mathbb{R}$, is concave up if $f’$ is increasing on $I$.

The function $f: I \to \mathbb{R}, I \subseteq \mathbb{R}$, is concave down if $f’$ is decreasing on $I$.

Theorem. Let $I \subseteq \mathbb{R}$ be an open interval and $f: I \to \mathbb{R}$ a function which is twice differentiable on $I$.

1.) If $f” (x) >0, \forall x \in I$, then the function $f$ is concave up on $I$.

2.) If $f”(x) < 0, \forall x \in I$, then the function $f$ is concave down on $I$.

3. ) The point $(x_o, f(x_0)$, $x_0 \in I$ is called an inflection point of the function $f$ if $f'(x_0)$ exists and if concavity changes the sign at $(x_o, f(x_0)$ from positive to negative and from negative to positive.

That is, if is it the second derivative on the intervals $\left \langle a, b \right \rangle$ and  $\left \langle b, c \right \rangle$ of different signs, then the function $f$ at point $b$ has an inflection point, where $f$ changes from concave up to concave down or from concave down to concave up.

For instance, the function $f(x) = x^2$ is concave up  on $\mathbb{R}$, because $f”(x) = 2 > 0$, $\forall x \in \mathbb{R}$.

The function $f(x) = \ln x$ is concave down on $\left \langle 0, + \infty \right \rangle$, because $f”(x) = – \frac{1}{x^2} < 0$, for all $x \in \left \langle 0, + \infty \right \rangle$.

How to find open intervals where the function $f$ is concave up or concave down?

1. Find the second derivative of the function $f$.
2.  Potential inflection points find by solving the equation $f”(x) =0$. Check if they are in the domain of the function $f$.
3. On those intervals on which $f”(x) > 0$ the function $f$ is concave up, otherwise, concave down. On the border between concavity intervals is the inflection point.

Example 4. Find the open intervals where the function $f$ is concave up or concave down if

$$f(x) = x – \sqrt[3]{x-1}.$$

Solution:

Firstly, we need to find $f”$.

$$f'(x) = (x – \sqrt[3]{x-1})’ = 1 – \frac{1}{3 \sqrt[3]{(x-1)^2}}.$$

$$f”(x) = (1 – \frac{1}{3 \sqrt[3]{(x-1)^2}})’ = \frac{2}{9 \sqrt[3]{(x-1)^5}}.$$

The second derivative is not equal to $0$ for any $x$, however for $x=1$ the second derivative it is not define.  Therefore, for $x \in \left \langle – \infty, 1 \right \rangle$ is $f”(x) < 0$, that is, the function $f$ is concave down and for $x \in \left \langle 1, + \infty \right \rangle$ is $f”(x ) >0$, that is, the function $f$ is concave up.

Theorem. (The second derivative test)

Let the function $f: I \to \mathbb{R}, I\subseteq \mathbb{R}$ be twice differentiable on $I$. To find the local extrema of the function $f$ we

1.) calculate $f’$ and $f”$,

2.) find critical numbers by solving the equation $f'(x) =0$,

3.) to each critical number $x_0$ apply the second derivative test; if $f”(x_0) > 0$, then $x_0$ is the local minimum, and if $f”(x_0) < 0$, then $x_0$ is the local maximum. If $f”(x_0) = 0$, then the character of the point $x_0$ we finding by using the sign of the first derivative.

Example 5. Determine extrema of the function $f$ if

$$f(x) = \frac{x – 1}{x^2}.$$

Solution:

Firstly, we need to find $f'(x)$ and $f”(x)$. We have

$$f'(x) = \frac{(x-1)’ \cdot x^2 – (x-1) \cdot(x^2)’}{(x^2)^2}$$

$$= \frac{x^2 – (x-1) \cdot 2x}{x^4}$$

$$= \frac{-x^2 +2x}{x^4}$$

$$f”(x) = \frac{(-x^2 + 2x)’ \cdot x^2 – (-x^2 +2x) \cdot (x^4)’}{(x^4)^2}$$

$$= \frac{(-2x + 2) \cdot x^4 – (-x^2 + 2x) \cdot 4x^3}{x^8}$$

$$=\frac{-2x^5 + 2x^4 + 4x^5 – 8x^4}{x^8}$$

$$= \frac{2x^5 – 6 x^4}{x^8}.$$

Critical numbers we finding by solving the equation $f'(x) = 0$, that is

$$\frac{-x^2 +2x}{x^4} = 0$$

$$\Leftrightarrow – x^2 + 2x = 0$$

$$\Leftrightarrow x(2-x) = 0.$$

Therefore, the critical points are $x_1= 0$ and $x_2=2$. Since the second derivative of the function $f$ is defined on $\mathbb{R}$ and the function $f$ on $\mathbb{R}/ \{0\}$, the second derivative of the function $f$ at point $x_1=0$ is equal to $0$. The second derivative of the function $f$ at point $x_2 =2$ is equal to

$$f”(2) = \frac{2 \cdot 2^5 – 6 \cdot 2^4}{2^8} = \frac{32 – 96}{256} = \frac{-64}{256} = -\frac{1}{4} <0.$$

Now we need to find the value of the function $f$ at point $x_2=2$, that is

$$f(2) =\frac{2-1}{2^2} = \frac{1}{4}.$$

From the second derivative test we conclude that the given function $f$ has the local maximum at point $\left (2, \frac{1}{4} \right)$.