Select Page

# Calculus

Applications of the Derivative

# Convex Functions

Page 1
Problems 1-2
Page 2
Problems 3-10

### Definition of Convexity of a Function

Consider a function $$y = f\left( x \right),$$ which is assumed to be continuous on the interval $$\left[ {a,b} \right].$$ The function $$y = f\left( x \right)$$ is called convex downward (or just convex) if for any two points $${x_1}$$ and $${x_2}$$ in $$\left[ {a,b} \right],$$ the following inequality holds:
$f\left( {\frac{{{x_1} + {x_2}}}{2}} \right) \le \frac{{f\left( {{x_1}} \right) + f\left( {{x_2}} \right)}}{2}.$ If this inequality is strict for any $${x_1},{x_2} \in \left[ {a,b} \right],$$ such that $${x_1} \ne {x_2},$$ then the function $$f\left( x \right)$$ is called strictly convex downward on the interval $$\left[ {a,b} \right].$$

Similarly, we define a concave function. A function $$f\left( x \right)$$ is called convex upward (or concave) if for any two points $${x_1}$$ and $${x_2}$$ in the interval $$\left[ {a,b} \right]$$, the following inequality is valid:
$f\left( {\frac{{{x_1} + {x_2}}}{2}} \right) \ge \frac{{f\left( {{x_1}} \right) + f\left( {{x_2}} \right)}}{2}.$ If this inequality is strict for any $${x_1},{x_2} \in \left[ {a,b} \right],$$ such that $${x_1} \ne {x_2},$$ then the function $$f\left( x \right)$$ is called strictly convex upward on the interval $$\left[ {a,b} \right].$$

### Geometric Interpretation of Convexity

The introduced concept of convexity has a simple geometric interpretation.

Figure 1.

Figure 2.

If a function is convex downward (Figure $$1$$), the midpoint $$B$$ of each chord $${A_1}{A_2}$$ lies above the corresponding point $${A_0}$$ of the graph of the function or coincides with this point.

Similarly, if a function is convex upward (Figure $$2$$), the midpoint $$B$$ of each chord $${A_1}{A_2}$$ is located below the corresponding point $${A_0}$$ of the graph of the function or coincides with this point.

Convex functions have another obvious property, which is related to the location of the tangent to the graph of the function. The function $$f\left( x \right)$$ is convex downward on the interval $$\left[ {a,b} \right]$$ if and only if its graph does not lie below the tangent drawn to it at any point $${x_0}$$ of the segment $$\left[ {a,b} \right]$$ (Figure $$3$$).

Figure 3.

Figure 4.

Accordingly, the function $$f\left( x \right)$$ is concave or convex upward on the interval $$\left[ {a,b} \right]$$ if and only if its graph does not lie above the tangent drawn to it at any point $${x_0}$$ of the segment $$\left[ {a,b} \right]$$ (Figure $$4$$). These properties represent a theorem and can be proved using the definition of convexity.

### Sufficient Conditions for Convexity

Suppose that the first derivative $$f’\left( x \right)$$ of a function $$f\left( x \right)$$ exists in a closed interval $$\left[ {a,b} \right],$$ and the second derivative $$f^{\prime\prime}\left( x \right)$$ exists in an open interval $$\left( {a,b} \right).$$ Then the following sufficient conditions for convexity are valid:

• If $$f^{\prime\prime}\left( x \right) \ge 0$$ for all $$x \in \left( {a,b} \right),$$ then the function $$f\left( x \right)$$ is convex downward on the interval $$\left[ {a,b} \right];$$
• If $$f^{\prime\prime}\left( x \right) \le 0$$ for all $$x \in \left( {a,b} \right),$$ then the function $$f\left( x \right)$$ is convex upward on the interval $$\left[ {a,b} \right].$$

In the cases where the second derivative is strictly greater (or less) than zero, we say, respectively, about the strict convexity downward (or strict convexity upward).

We prove the theorem for the case of convexity downward. Let the function $$f\left( x \right)$$ have a non-negative second derivative on the interval $$\left( {a,b} \right):$$ $$f^{\prime\prime}\left( x \right) \ge 0.$$ Let $${x_0}$$ be the midpoint of the interval $$\left[ {{x_1},{x_2}} \right].$$ Suppose that the length of this interval is equal to $$2h.$$ Then the coordinates $${x_1}$$ and $${x_2}$$ can be written as
${{x_1} = {x_0} – h,\;\;\;}\kern-0.3pt{{x_2} = {x_0} + h.}$ Expand the function $$f\left( x \right)$$ at $${x_0}$$ in the Taylor series with the remainder in the Lagrange form. We obtain the following expressions:
${f\left( {{x_1}} \right) = f\left( {{x_0} – h} \right) } = {f\left( {{x_0}} \right) – f’\left( {{x_0}} \right)h + \frac{{f^{\prime\prime}\left( {{\xi _1}} \right){h^2}}}{{2!}},}$ ${f\left( {{x_2}} \right) = f\left( {{x_0} + h} \right) } = {f\left( {{x_0}} \right) + f’\left( {{x_0}} \right)h + \frac{{f^{\prime\prime}\left( {{\xi _2}} \right){h^2}}}{{2!}},}$ where $${x_0} – h \lt {\xi _1} \lt {x_0},$$ $${x_0} \lt {\xi _2} \lt {x_0} + h.$$

Add the two equations:
${f\left( {{x_1}} \right) + f\left( {{x_2}} \right) } = {2f\left( {{x_0}} \right) + \frac{{{h^2}}}{2}\left[ {f^{\prime\prime}\left( {{\xi _1}} \right) + f^{\prime\prime}\left( {{\xi _2}} \right)} \right].}$ Since $${\xi _1},{\xi _2} \in \left( {a,b} \right),$$ then the second derivatives in the right-hand side are non-negative. Consequently,
$f\left( {{x_1}} \right) + f\left( {{x_2}} \right) \ge 2f\left( {{x_0}} \right)$ or
$f\left( {\frac{{{x_1} + {x_2}}}{2}} \right) \le \frac{{f\left( {{x_1}} \right) + f\left( {{x_2}} \right)}}{2},$ i.e. according to the definition, the function $$f\left( x \right)$$ is convex downward.

Note that the necessary condition for convexity (for example, the implication when from the convexity downwards it follows that $$f^{\prime\prime}\left( x \right) \ge 0$$) holds only for the non-strict inequality. In the case of strict convexity, the necessary condition is generally not valid. For example, the function $$f\left( x \right) = {x^4}$$ is strictly convex downward. However, its second derivative is zero at $$x = 0$$, i.e. the strict inequality $$f^{\prime\prime}\left( x \right) \gt 0$$ does not hold in this case.

### Properties of Convex Functions

We list some properties of convex functions assuming that all functions are defined and continuous on the interval $$\left[ {a,b} \right].$$

1. If the functions $$f$$ and $$g$$ are convex downward (upward), then any linear combination $$af + bg$$ where $$a$$, $$b$$ are positive real numbers is also convex downward (upward).
2. If the function $$u = g\left( x \right)$$ is convex downward, and the function $$y = f\left( u \right)$$ is convex downward and non-decreasing, then the composite function $$y = f\left( {g\left( x \right)} \right)$$ is also convex downward.
3. If the function $$u = g\left( x \right)$$ is convex upward, and the function $$y = f\left( u \right)$$ is convex downward and non-increasing, then the composite function $$y = f\left( {g\left( x \right)} \right)$$ is convex downward.
4. Any local maximum of a convex upward function defined on the interval $$\left[ {a,b} \right]$$ is also its global maximum on this interval.
5. Any local minimum of a convex downward function defined on the interval $$\left[ {a,b} \right]$$ is also its global minimum on this interval.

## Solved Problems

Click on problem description to see solution.

### ✓Example 1

Sketch schematically the graphs of the functions for all possible combinations of $$y$$, $$y’$$, $$y^{\prime\prime}$$ where each of these values is positive or negative.

### ✓Example 2

Find the values of $$x,$$ at which the cubic function $$f\left( x \right) = {x^3} + a{x^2} + bx + c$$ is convex downward.

### ✓Example 3

Find the intervals of convexity and concavity of the function
$f\left( x \right) = \sqrt {2 + {x^2}} .$

### ✓Example 4

Determine if the function $$f\left( x \right) = \arctan x$$ is convex downward or upward at the point $$x = 1?$$

### ✓Example 5

Find the intervals of convexity/concavity of the function
$f\left( x \right) = \frac{1}{{1 + {x^2}}}.$

### ✓Example 6

Find the intervals of convexity/concavity of the function
$f\left( x \right) = x – \cos x.$

### ✓Example 7

Find the intervals of convexity/concavity of the $$4$$th order polynomial function:
$f\left( x \right) = {x^4} + 2{x^3} – 36{x^2} + 2x + 1.$

### ✓Example 8

Find the intervals of convexity/concavity of the function
$f\left( x \right) = \frac{{{x^3}}}{{1 + {x^2}}}.$

### ✓Example 9

Investigate the direction of convexity of the curve defined by the parametric equations
${x = a\left( {t – \sin t} \right),\;\;\;}\kern-0.3pt {y = a\left( {1 – \cos t} \right),}$ where $$a \gt 0.$$

### ✓Example 10

Explore the direction of convexity of the curve defined implicitly by the equation
$x + y = {e^{x – y}}.$

### Example 1.

Sketch schematically the graphs of the functions for all possible combinations of $$y$$, $$y’$$, $$y^{\prime\prime}$$ where each of these values is positive or negative.

#### Solution.

Consider an arbitrary combination of these values, such as the following:
${y \gt 0,\;\;y’ \lt 0,\;\;\;}\kern-0.3pt{y^{\prime\prime} \gt 0.}$ The graph of such a function is located in the upper half-plane, and the function is strictly decreasing (since $$y’ \lt 0$$). Given that $$y^{\prime\prime} \gt 0,$$ the function is convex downward. Its schematic view is shown in Figure $$5$$ in the first column and second row.

Figure 5.

It is clear that the total number of possible combinations of the three variables with different signs is equal to $$8.$$ The corresponding sketches of the graphs of the functions are shown in Figure $$5.$$

### Example 2.

Find the values of $$x,$$ at which the cubic function $$f\left( x \right) = {x^3} + a{x^2} + bx + c$$ is convex downward.

#### Solution.

We compute the second derivative of the given function:
${f’\left( x \right) = {\left( {{x^3} + a{x^2} + bx + c} \right)^\prime } } = {3{x^2} + 2ax + b;}$ ${f^{\prime\prime}\left( x \right) = {\left( {3{x^2} + 2ax + b} \right)^\prime } } = {6x + 2a.}$ The function is convex upward if $$f^{\prime\prime}\left( x \right) \le 0.$$ Find the corresponding values of $$x:$$
${f^{\prime\prime}\left( x \right) \le 0,\;\;}\Rightarrow {6x + 2a \le 0,\;\;}\Rightarrow {6x \le – 2a,\;\;}\Rightarrow {x \le – \frac{a}{3}.}$ As it can be seen, only the point $$x = \sqrt 2$$ falls in the interval $$\left[ {0.5,2} \right].$$ Calculate the values of the function at the extremum point $$x = \sqrt 2$$ and at the boundary points of the interval:
${f\left( {\sqrt 2 } \right) = \sqrt 2 + \frac{2}{{\sqrt 2 }} = 2\sqrt 2 \approx 2.83;\;\;\;}\kern-0.3pt {f\left( {0.5} \right) = 0.5 + \frac{2}{{0.5}} = 4.5;\;\;\;}\kern-0.3pt {f\left( 2 \right) = 2 + \frac{2}{2} = 3.}$ So the maximum value of the function in this interval is equal to $$4.5$$ at the point $$x = 0.5,$$ and the minimum value is $$2.83$$ at $$x = \sqrt 2.$$

Page 1
Problems 1-2
Page 2
Problems 3-10