From Increasing Derivatives to Second Derivatives
In “Convexity and Derivatives,” convexity was characterized by a nondecreasing first derivative. When a function has a second derivative, the derivative of its first derivative tells us whether that first derivative is increasing or decreasing. This gives a convenient test for convexity: check the sign of the second derivative throughout the interval.
Throughout this tutorial, let \(I\) be an open interval and let \(f:I\to\mathbb{R}\) be twice differentiable, meaning that \(f'\) exists and is differentiable at every point of \(I\). We write \(f''=(f')'\). No continuity assumption on \(f''\) will be needed.
The Second-Derivative Criterion
The key connection is that a nonnegative second derivative makes the first derivative nondecreasing. The Mean Value Theorem gives this connection directly: between any two points, the change in \(f'\) equals a value of \(f''\) times the distance between the points. The derivative characterization of convexity from the previous tutorial then completes the argument.
Proof. First suppose \(f''(x)\geq0\) for every \(x\in I\). Take any \(x,y\in I\) with \(x<y\). Since \(f'\) is differentiable on \(I\), it is continuous there. In particular, \(f'\) is continuous on \([x,y]\) and differentiable on \((x,y)\), so the Mean Value Theorem applied to \(f'\) gives some \(c\in(x,y)\) such that
Here \(f''(c)\geq0\) and \(y-x>0\), so \(f'(y)-f'(x)\geq0\). Thus \(f'(x)\leq f'(y)\) whenever \(x<y\), which means \(f'\) is nondecreasing on \(I\). By the Derivative Characterization of Convexity from the previous tutorial, \(f\) is convex on \(I\).
Now suppose \(f\) is convex on \(I\). By the Theorem on Derivative Monotonicity for Convex Functions from the previous tutorial, \(f'\) is nondecreasing on \(I\). The function \(f'\) is differentiable, so the earlier result “Derivative Sign for a Nondecreasing Function” applies to it: the derivative of a differentiable nondecreasing function is nonnegative at every interior point. Every point of \(I\) is interior, and therefore
Both implications hold, proving the equivalence. \(\square\)
The theorem requires the sign condition at every point of the interval, not merely at a sample of points. It also does not require \(f''\) to be continuous: differentiability of \(f'\) is enough for the Mean Value Theorem step and for the converse.
Applying the Criterion
Worked Example: A Sixth-Power Function
Let \(f(x)=x^6\) on \(\mathbb{R}\). By the Power Rule, \(f'(x)=6x^5\) and \(f''(x)=30x^4\). Since \(x^4\geq0\) for every real \(x\),
The Second-Derivative Criterion shows that \(f\) is convex on \(\mathbb{R}\). At \(x=0\), the second derivative is zero; this does not obstruct the conclusion because the criterion requires nonnegativity, not strict positivity. Away from zero, \(f''(x)>0\), but the conclusion of this test is convexity.
Worked Example: A Reciprocal Function That Is Not Convex
Consider \(f(x)=-1/x\) on \(I=(0,\infty)\). The Power Rule for Negative Integer Exponents gives
For every \(x>0\), \(x^3>0\), so \(f''(x)<0\). In particular, the necessary condition in the Second-Derivative Criterion fails, and \(f\) is not convex on \((0,\infty)\). The derivative viewpoint confirms the failure: if \(0<x<y\), then \(x^{-2}>y^{-2}\), so \(f'(x)>f'(y)\), contrary to the nondecreasing-derivative condition for a differentiable convex function.
Worked Example: A Quadratic with Positive Second Derivative
Let \(f(x)=3x^2-4x+7\) on \(\mathbb{R}\). The derivative rules give
Because \(6\geq0\) everywhere, the Second-Derivative Criterion proves that \(f\) is convex on \(\mathbb{R}\). In this example, the derivative is increasing at a constant rate: for any \(x<y\),
The calculation illustrates the role of the second derivative: it measures the change in the first derivative, and a positive value makes that derivative increase across every nontrivial interval.
A Negative Value at One Point Is Enough
The criterion also has a useful contrapositive. If \(f''\) is negative at even one point, \(f\) cannot be convex on the interval. This conclusion is local: a single negative value gives nearby points where the first derivative decreases, which conflicts with the derivative monotonicity required by convexity.
Proof. Since \(I\) is open, there is room to choose positive increments \(h\) small enough that \(a+h\in I\). By the definition of \(f''(a)\),
Choose a positive number \(\varepsilon\) such that \(f''(a)+\varepsilon<0\), for example \(\varepsilon=-f''(a)/2\). By the limit, for all sufficiently small nonzero \(h\),
Choose such an \(h>0\). Multiplying by \(h>0\) gives \(f'(a+h)-f'(a)<0\), so \(f'(a+h)<f'(a)\). A differentiable convex function must have a nondecreasing derivative, by the Theorem on Derivative Monotonicity for Convex Functions. The decrease just obtained contradicts that requirement. Therefore \(f\) is not convex on \(I\). \(\square\)
This result does not say that one nonnegative value of \(f''\) proves convexity. The sign must be nonnegative throughout the domain for the sufficient direction. A negative value, however, immediately disproves convexity.
What the Sign Test Does—and Does Not—Tell You
The second-derivative criterion is a global test on the interval: \(f''\geq0\) everywhere is equivalent to convexity there. It is not enough to find a point where the second derivative is positive, nor is it enough to check the sign at a few selected points. If the sign changes, or if it is negative anywhere, the function is not convex on the whole interval.
A second derivative can equal zero at some points while remaining nonnegative everywhere. The sixth-power example shows why zero values alone do not settle the question: the full sign condition still holds. Conversely, a zero value at a point does not by itself show that the second derivative is nonnegative nearby. The sign on the entire interval is what the criterion uses.
The hypotheses matter as well. The theorem is stated for a twice-differentiable function on an open interval. If the second derivative does not exist at some points, this test cannot be applied as stated; the chord definition of convexity, or the first-derivative characterization when applicable, may still be useful. Nor should the criterion be confused with a test based on the sign of \(f'\): convexity is controlled by whether \(f'\) increases, and \(f''\) records that change.
In practice, the test is often efficient: differentiate twice, determine the sign of \(f''\) over the domain, and then state the conclusion only for the interval on which the sign condition holds. When the sign is not immediately clear, factoring, completing a square, or restricting attention to the given domain can resolve it.
Check Your Understanding
Use the second-derivative criterion and its proof to answer the following questions.
- State the Second-Derivative Criterion for a twice-differentiable function on an open interval.
- Which theorem connects \(f''\geq0\) to the fact that \(f'\) is nondecreasing?
- Why does \(f''(a)<0\) at one point contradict convexity?
- Does the criterion require \(f''(x)>0\) at every point, or is nonnegativity enough?
- Why can checking \(f''\) at only a few points fail to establish convexity on an interval?