Tutorials › Real Analysis › Convexity and Derivatives

Differentiation · Tutorial 436 of 1000

Convexity and Derivatives

Use secant slopes and derivatives to recognize convex functions and obtain global tangent-line bounds.

Advanced 10 min read

What You'll Learn

  • Prove that the derivative of a differentiable convex function is nondecreasing.
  • Use the derivative characterization of convexity on an open interval.
  • Establish the supporting-line inequality for differentiable convex functions.
  • Apply derivative tests and tangent bounds to polynomial examples.
  • Recognize why a decrease in the derivative rules out convexity.

From Chord Slopes to Derivatives

In “Convex Functions,” the three-point secant-slope inequality showed that the slopes of successive chords of a convex graph are ordered. When the function is differentiable, derivatives are limits of these chord slopes. This connects the geometric definition of convexity to a useful test involving the derivative. The test also gives a stronger geometric conclusion: at each point, the tangent line lies below the entire graph.

Throughout this tutorial, let \(I\) be an open interval, and let \(f:I\to\mathbb{R}\) be differentiable at every point of \(I\). We use “nondecreasing” to mean that \(f'(x)\leq f'(y)\) whenever \(x<y\). The condition is not that the derivative must be strictly increasing.

The Derivative of a Convex Function Is Nondecreasing

Fix two points \(x<y\) in \(I\). For a convex function, a secant slope from \(x\) to a point just to its right cannot exceed the slope from \(x\) to \(y\). Letting that nearby point approach \(x\) compares the derivative at \(x\) with the slope across the whole interval. A corresponding comparison near \(y\) bounds that same slope by the derivative at \(y\).

Theorem (Derivative Monotonicity for Convex Functions): If \(f:I\to\mathbb{R}\) is differentiable and convex on the open interval \(I\), then \(f'\) is nondecreasing on \(I\). More precisely, whenever \(x<y\) in \(I\), $$ f'(x)\leq \frac{f(y)-f(x)}{y-x}\leq f'(y). $$

Proof. Fix \(x<y\) in \(I\). For any \(t\) with \(x<t<y\), the Three-Point Secant-Slope Inequality gives

$$ \frac{f(t)-f(x)}{t-x} \leq \frac{f(y)-f(x)}{y-x} \leq \frac{f(y)-f(t)}{y-t}. $$

As \(t\to x\) from the right, the leftmost quotient tends to \(f'(x)\), by the definition of the derivative. The middle quotient is fixed, so this limit gives

$$ f'(x)\leq \frac{f(y)-f(x)}{y-x}. $$

As \(t\to y\) from the left, the rightmost quotient tends to \(f'(y)\). Indeed, it is the difference quotient at \(y\) with increment \(t-y\), since \((f(t)-f(y))/(t-y)=(f(y)-f(t))/(y-t)\). Thus

$$ \frac{f(y)-f(x)}{y-x}\leq f'(y). $$

Combining the two inequalities proves the claimed secant-slope bounds. In particular, \(f'(x)\leq f'(y)\) whenever \(x<y\), so \(f'\) is nondecreasing. \(\square\)

This argument does not require \(f'\) to be continuous. It uses only differentiability at the two endpoints of each secant interval and the ordering of slopes that convexity provides.

A Derivative Characterization of Convexity

The preceding theorem proves that convexity forces the derivative to be nondecreasing. Conversely, the Mean Value Theorem shows that a nondecreasing derivative implies convexity, as proved below. Together, these results give an exact criterion for differentiable functions on open intervals.

Theorem (Derivative Characterization of Convexity): Let \(I\) be an open interval, and let \(f:I\to\mathbb{R}\) be differentiable. Then \(f\) is convex on \(I\) if and only if \(f'\) is nondecreasing on \(I\).

Proof. If \(f\) is convex, the Theorem on Derivative Monotonicity for Convex Functions proves that \(f'\) is nondecreasing. Conversely, suppose \(f'\) is nondecreasing on \(I\). For \(x<z<y\) in \(I\), the Mean Value Theorem gives \(c_1\in(x,z)\) and \(c_2\in(z,y)\) such that \(\frac{f(z)-f(x)}{z-x}=f'(c_1)\leq f'(c_2)=\frac{f(y)-f(z)}{y-z}\). Since \(c_1<c_2\), the inequality follows from the assumed monotonicity. Rearranging gives \(f(z)\leq \frac{y-z}{y-x}f(x)+\frac{z-x}{y-x}f(y)\), the convexity inequality for interior points \(z\) between \(x\) and \(y\). The endpoint cases are immediate, so \(f\) is convex. These two implications prove the equivalence. \(\square\)

The open-interval hypothesis ensures that every point of \(I\) is an interior point where the derivative is defined, and that the derivative criterion applies throughout the domain. This is a criterion for differentiable functions; it does not replace the chord definition for functions that may fail to be differentiable.

Worked Example: A Fourth-Power Function

Let \(f(x)=x^4\) on \(\mathbb{R}\). The Power Rule gives \(f'(x)=4x^3\). If \(x<y\), then

$$ f'(y)-f'(x)=4(y^3-x^3) =4(y-x)(y^2+xy+x^2)>0. $$

Here \(y-x>0\), and \(y^2+xy+x^2>0\) for \(x<y\): this quadratic expression equals \((x+y/2)^2+3y^2/4\), and it can be zero only if \(x=y=0\), which is incompatible with \(x<y\). Thus \(f'\) is increasing, in particular nondecreasing, and the derivative characterization proves that \(x^4\) is convex.

The theorem on derivative monotonicity also yields a tangent-line bound. At \(a=1\), it gives \(x^4\geq 1+4(x-1)=4x-3\) for all \(x\in\mathbb{R}\). The inequality can be checked directly:

$$ x^4-(4x-3)=(x-1)^2(x^2+2x+3) =(x-1)^2\big((x+1)^2+2\big)\geq0. $$

The factorization confirms equality at \(x=1\) and strict inequality elsewhere.

Worked Example: A Fifth-Power Function on the Positive Half-Line

Let \(f(x)=x^5\) on \(I=(0,\infty)\). Its derivative is \(f'(x)=5x^4\). For \(0<x<y\),

$$ f'(y)-f'(x)=5(y^4-x^4) =5(y-x)(y+x)(y^2+x^2)>0. $$

Every factor on the right is positive, so \(f'\) is increasing on \(I\). Hence \(x^5\) is convex on \((0,\infty)\). At \(a=1\), its tangent line has equation \(y=1+5(x-1)=5x-4\), and the supporting-line bound gives \(x^5\geq5x-4\) for \(x>0\). In this case, the difference factors as

$$ x^5-5x+4=(x-1)^2(x^3+2x^2+3x+4). $$

For \(x>0\), the cubic factor is positive, so the difference is nonnegative. The factorization verifies the bound and shows equality at \(x=1\).

Tangent Lines as Global Lower Bounds

For a differentiable convex function, the slope of the chord from \(x\) to \(y\) is at least \(f'(x)\) when \(x<y\). Rearranging this slope inequality says that \(f(y)\) lies above the tangent line drawn at \(x\). The same conclusion holds when \(y<x\), using the other side of the secant-slope bounds.

Theorem (Supporting-Line Inequality): Let \(I\) be an open interval, and let \(f:I\to\mathbb{R}\) be differentiable and convex. For every \(a,y\in I\), $$ f(y)\geq f(a)+f'(a)(y-a). $$ Thus the tangent line at any point \(a\) lies on or below the graph throughout \(I\).

Proof. First suppose \(a<y\). The secant-slope bounds in the Theorem on Derivative Monotonicity for Convex Functions give

$$ f'(a)\leq\frac{f(y)-f(a)}{y-a}. $$

Since \(y-a>0\), multiplying preserves the inequality and gives \(f(y)\geq f(a)+f'(a)(y-a)\).

Now suppose \(y<a\). Applying the same secant-slope bounds to the ordered pair \(y<a\) gives

$$ \frac{f(a)-f(y)}{a-y}\leq f'(a). $$

Multiplying by \(a-y>0\) gives \(f(a)-f(y)\leq f'(a)(a-y)\). Rearranging yields \(f(y)\geq f(a)+f'(a)(y-a)\).

If \(y=a\), both sides of the claimed inequality equal \(f(a)\). All cases are covered, so the supporting-line inequality holds for every \(y\in I\). \(\square\)

There is also a converse that explains why the tangent-line condition captures convexity. Suppose \(f\) is differentiable on \(I\) and that for every \(a,y\in I\), \(f(y)\geq f(a)+f'(a)(y-a)\). Take \(x,y\in I\), \(0\leq\lambda\leq1\), and set \(z=(1-\lambda)x+\lambda y\). Since \(I\) is an interval, \(z\in I\). Apply the assumed inequality at \(a=z\), first with the point \(x\), and then with the point \(y\). Multiplying the resulting inequalities by \(1-\lambda\) and \(\lambda\), respectively, and adding gives

$$ (1-\lambda)f(x)+\lambda f(y) \geq f(z)+f'(z)\big((1-\lambda)(x-z)+\lambda(y-z)\big) =f(z). $$

The final equality holds because \(z=(1-\lambda)x+\lambda y\). This is the chord inequality, so \(f\) is convex. The tangent-line condition and convexity are therefore equivalent for differentiable functions on an open interval.

Worked Example: A Polynomial That Is Not Convex

Consider \(f(x)=x^4-2x^2\) on \(\mathbb{R}\). Its derivative is \(f'(x)=4x^3-4x\). At two ordered points,

$$ -\frac12<0,\qquad f'\left(-\frac12\right)=\frac32,\qquad f'(0)=0. $$

Thus \(f'\) decreases between \(-1/2\) and \(0\), so it is not nondecreasing. By the derivative characterization, \(f\) is not convex. The chord definition also shows the failure directly: \(f(-1)=1-2=-1\), \(f(1)=1-2=-1\), and \(f(0)=0\), so at the midpoint of \(-1\) and \(1\),

$$ f(0)=0>\frac{f(-1)+f(1)}{2}=-1. $$

This violates the convexity inequality. The example illustrates a useful diagnostic: a decrease in the derivative is incompatible with convexity, and a specific decrease may point to a chord that demonstrates the failure.

What the Derivative Test Does—and Does Not—Say

The derivative criterion is efficient because it replaces comparisons across all chords with an order condition on \(f'\). The supporting-line inequality adds a practical bound that can be used without calculating a secant slope. Both results depend on convexity or a nondecreasing derivative over the whole interval; checking the derivative at only a few points is not enough to establish either property.

A common mistake is to demand that the derivative be strictly increasing. Convexity requires only that it be nondecreasing, so intervals on which \(f'\) is constant are allowed. On such an interval, the Mean Value Theorem implies that \(f\) is affine there. Another mistake is to use a derivative test when differentiability has not been established. The chord definition remains the appropriate definition in that case.

The next tutorial will develop a second-derivative criterion for convexity. The first-derivative viewpoint remains useful: it explains why that later test works and provides a direct route from increasing slopes to supporting tangent lines.

Check Your Understanding

Use the derivative and tangent-line results in this tutorial to answer the following questions.

  1. What does the secant-slope bound say about \(f'(x)\), the slope from \(x\) to \(y\), and \(f'(y)\) when \(f\) is differentiable and convex and \(x<y\)?
  2. State the derivative characterization of convexity on an open interval.
  3. Why does the supporting-line inequality need separate rearrangements when \(y>a\) and when \(y<a\)?
  4. How can the tangent-line inequalities at an interpolated point imply the chord inequality?
  5. Does convexity require a strictly increasing derivative? Explain the role of an interval where the derivative is constant.