Skip to content
Topos Uranos

Concavity, convexity and inflection points

Summary

This lesson studies how the graph of a function bends: if between two of its points it lies below the chord joining them, the function is convex; if it lies above it, concave. It translates the definition into a comparison of the slopes of the chords and, with the mean value theorem and monotonicity, proves that a differentiable function is convex if and only if its derivative is increasing, if and only if its graph lies above all its tangents, and that a twice differentiable function is convex if and only if its second derivative is not negative. It defines inflection points, where the function changes from convex to concave, and gives the tests for finding them: the sign change of the second derivative, the necessary condition f′′(a)=0f''(a) = 0 and the third derivative test, which compares the graph with its tangent as the higher-order derivative test compared it with the horizontal line. With the chords of the sine it obtains Jordan’s inequality, and with Jensen’s inequality it turns the concavity of the logarithm into the inequality between the geometric and arithmetic means of any number of numbers.

Learning objectives

  1. Define with quantifiers the convex function and the concave function by their chords, distinguish the two conventions found in textbooks and translate the definition into the comparison of the slopes of the chords.
  2. Prove that a differentiable function is convex if and only if its derivative is increasing and if and only if its graph lies above its tangents, and decide with the second derivative on which intervals a function is convex or concave.
  3. Find the inflection points of a function with the sign change of the second derivative and with the third derivative, and recognize the points with zero second derivative that are not inflection points.
  4. Prove inequalities with convexity: Jordan’s by the chords, Jensen’s and the inequality of the means.

Convex and concave functions

The lesson on monotonicity studied whether a function rises or falls; this one studies how it does so. The functions x2x^2 and x\sqrt{x} are strictly increasing on [0,∞)\ico{0}{\infty}, but the first bends upward and the second downward: the line segment joining two points of the graph of x2x^2, its chord, lies above the arc of the graph between them, and that of x\sqrt{x} lies below it. If tt is in [0,1]\icc{0}{1}, the point of the chord joining (x,f(x))(x, f(x)) with (y,f(y))(y, f(y)) whose abscissa is tx+(1−t)ytx + (1 - t)y has ordinate tf(x)+(1−t)f(y)t f(x) + (1 - t) f(y): the same combination of the ordinates.

DefinitionConvex function and concave function

Let ff be a function defined on an interval II. We say that ff is convex on II if no point of its graph lies above the chord joining two points of the graph whose abscissas enclose its own:

(∀x∈I)(∀y∈I)(∀t∈[0,1])(f(tx+(1−t)y)≤tf(x)+(1−t)f(y))(\forall x \in I)(\forall y \in I)(\forall t \in \icc{0}{1})\left(f\left(tx + (1 - t)y\right) \leq t f(x) + (1 - t) f(y)\right)

and strictly convex if the inequality is strict whenever x≠yx \neq y and 0<t<10 < t < 1. We say that ff is concave (or strictly concave) on II if −f-f is convex (or strictly convex), that is, if the opposite inequality holds: no point of the graph lies below those chords.

A linear function mx+nmx + n is both convex and concave: its graph coincides with its chords. The function x2x^2 is strictly convex on R\mathbb{R}, because the difference between the two sides of the inequality is t(1−t)(x−y)2t(1 - t)(x - y)^2, positive if x≠yx \neq y and 0<t<10 < t < 1. The absolute value is convex, by the triangle inequality, ∣tx+(1−t)y∣≤t∣x∣+(1−t)∣y∣\abs{tx + (1 - t)y} \leq t\abs{x} + (1 - t)\abs{y}, although it is not differentiable at 00; it is not strictly convex, because on [0,∞)\ico{0}{\infty} it coincides with its chords.

Two conventions. In this course, “convex” is the function whose graph does not rise above its chords, like x2x^2, and “concave” the one that does not fall below them, like x\sqrt{x}. It is the convention of most textbooks of analysis and optimization, and that of the admitted fact of the concavity of the sine, in the lesson on the trigonometric functions and their graphs, from Algebra and Geometry II. Other textbooks use the words the other way around, and call x2x^2 concave, because they look at the graph from above; others say “concave up” for convex and “concave down” for concave. Faced with a new textbook, it is worth looking for its definition or noticing what it calls x2x^2: the inequalities do not change, only the names.

The definition compares a point of the graph with a chord. If x<z<yx < z < y, comparing (z,f(z))(z, f(z)) with the chord from xx to yy is equivalent to comparing the slopes of three chords: as one runs along the graph of a convex function from left to right, the chords get steeper. The figure shows it with f(x)=x24−0.3x+0.6f(x) = \frac{x^2}{4} - 0.3x + 0.6.

LemmaThe slopes of the chords

Let ff be a function defined on an interval II, and let S(u,v)=f(v)−f(u)v−uS(u, v) = \frac{f(v) - f(u)}{v - u} be the slope of the chord between two distinct abscissas uu and vv of II. If x<z<yx < z < y are points of II, each of the inequalities

S(x,z)≤S(x,y),S(x,y)≤S(z,y),S(x,z)≤S(z,y)S(x, z) \leq S(x, y), \qquad S(x, y) \leq S(z, y), \qquad S(x, z) \leq S(z, y)

is equivalent to the point (z,f(z))(z, f(z)) not lying above the chord joining (x,f(x))(x, f(x)) with (y,f(y))(y, f(y)), and each of the strict inequalities, to its lying strictly below it. Consequently, ff is convex on II if and only if the three inequalities hold for all x<z<yx < z < y in II, and strictly convex if and only if they hold strictly.

Proof

  1. f(z)≤tf(x)+(1−t)f(y)⇔(y−x)f(z)≤(y−z)f(x)+(z−x)f(y)f(z) \leq t f(x) + (1 - t) f(y) \Leftrightarrow \dato{c}{(y - x) f(z) \leq (y - z) f(x) + (z - x) f(y)}

    Let t=y−zy−xt = \frac{y - z}{y - x}, which lies in (0,1)\ioo{0}{1}; then 1−t=z−xy−x1 - t = \frac{z - x}{y - x} and z=tx+(1−t)yz = tx + (1 - t)y. The point of the chord with abscissa zz has ordinate tf(x)+(1−t)f(y)t f(x) + (1 - t) f(y), and the comparison, multiplied by y−x>0y - x > 0, is written without fractions:

  2. (y−x)(f(z)−f(x))≤(z−x)(f(y)−f(x))⇔S(x,z)≤S(x,y)(y - x)\left(f(z) - f(x)\right) \leq (z - x)\left(f(y) - f(x)\right) \Leftrightarrow \resaltar{S(x, z) \leq S(x, y)}

    Subtract (y−x)f(x)(y - x) f(x) from both sides; since y−x=(y−z)+(z−x)y - x = (y - z) + (z - x), the right-hand side becomes (z−x)(f(y)−f(x))(z - x)\left(f(y) - f(x)\right), and it suffices to divide by (z−x)(y−x)>0(z - x)(y - x) > 0. In the same way, subtracting (y−x)f(y)(y - x) f(y) and dividing by (y−z)(y−x)>0(y - z)(y - x) > 0 gives the second inequality.

  3. S(x,y)=z−xy−xS(x,z)+y−zy−xS(z,y),S(x,y)−S(x,z)=y−zy−x(S(z,y)−S(x,z))S(x, y) = \frac{z - x}{y - x} S(x, z) + \frac{y - z}{y - x} S(z, y), \qquad S(x, y) - S(x, z) = \resaltar{\frac{y - z}{y - x}\left(S(z, y) - S(x, z)\right)}

    The increment from xx to yy is the sum of the increments from xx to zz and from zz to yy: the slope of the long chord is an average of those of the short ones, with positive weights of sum 11, and its difference from S(x,z)S(x, z) has the sign of S(z,y)−S(x,z)S(z, y) - S(x, z). Hence the three inequalities are equivalent, and so are the strict ones. For the definition, if x=yx = y, or if tt equals 00 or 11, the inequality holds with equality, and if x>yx > y the roles of xx and yy are exchanged, and those of tt and 1−t1 - t.