Finding the maximum/minimum values of a function

From the Monotonicity test for real functions we easily deduce a sufficient condition that gurantees that a stationary point is a point of local maximum or minimum.

Theorem 5.9.1. (First Derivative Test) Let f: [a,b] ⟶ ℝ, and let x0 ∈ (a,b) be a stationary point, that is f'(x0) = 0.

x0 maximum point
x < x0 x > x0
f'(x) ≥ 0 f'(x) ≤ 0
f f
x0 minimum point
x < x0 x > x0
f'(x) ≥ 0 f'(x) ≤ 0
f f
studio segno derivata prima
Segno della derivata prima e comportamento della funzione

Once local extrema have been found their values are compared with, the value of f at the boundaries i.e. f(a) and f(b).

Example 5.9.2. Find maxima and minina of the polynomial function:

f(x) = 2x3 − 3x2 − 12x +10

The derivative of f is:

f'(x) = 6x3 − 6x2 − 12 = 6(x − 2)(x + 1)

f' is thus null at x = −1 and x = 2. The following table re f ed f'

x −∞ −1 2 +∞
f'(x) + 0 0 +
0 x0
f(x) freccia su 17 segno su
−∞ −10 +∞

Second Derivative Test

In the last section we saw that Monotonicity test allows the classification of critical points of a function by studying the first derivative sign changes. We can apply the same test to f'(x) when f is a function twice differentiable. We have the following.

Theorem 5.9.2 (Second derivative test). Suppose f is differentiable on a neighborhood of x0 a critical point for f i.e. f'(x0) = 0, and that f''(x0) exists and is nonzero. Then

  1. If f''(x0) ≤ 0; Then f has a local maximum at x0

  2. If f''(x0) ≥ 0; Then f has a local minimum at x0

  3. Proof.

    1. When the critical point x0 is a maximum, in a left neighborhood of x0 we have f'(x) ≥ 0 and in a right neighborhood of x0 we have f'(x) ≤ 0, hence the first derivative is decreasing and we must have f''(x0) < 0.

    2. When the critical point x0 is a minimum, in a left neighborhood of x0 we have f'(x) ≤ 0 and in a right neighborhood of x0 we have f'(x) ≥ 0, hence the first derivative is increasing thus f''(x0) > 0.  □

    If f'' is continuous at x0, and if f''(x0) ≠ 0, there will be a neighborhood of x0 in which f'' has the same sign as f''(x0). Instead of a point we can consider a whole interval (a,b) and state that if f: (a,b) → ℝ is differentiable two times in (a,b). We have the following:

    Convavity Test

    1. f'' ≥ 0 in (a,b) ⇐⇒ f' increasing in (a,b)

    2. f'' ≤ 0 in (a,b) ⇐⇒ f' decreasing in (a,b)

    Geometrically when f is convex, as x increases the slope of the tange line to the graph of f increases as well. As a consequence if a function is convex in an interval (a,b) its graph lies above the tangent line at every point x ∈ (a,b):

    funzione convessa
    Fig.1. Convex function the slope of the tanget line goes from negative to positive values, hence increases.

    The tangent line to the graph of f at a point x0 has equation

    y = f(x0) + f'(x0) (xx0)

    If f is convex, its graph never goes below that line; this means that

    f(x0) ≥ f(x0) + f'(x0) (xx0)

    holds for every x with x0 ∈ (a,b). For concave function it is enough to reverse the inequality in the previous relation. The same condition also implies that every stationary point of a convex or concave function is a point of global minimum or maximum respectively.

    Inflection points

    Definition 5.9.3. An inflection point is a point where the graph of a function changes from convex to concave or vice versa. □

    At the inflection point the sign of f'', changes, hence is necesaary that f'' is zero at the inflection point; This is a necessary condition but not sufficient, i.e.:

    x0   inflection point  ⇒  f''(x0) = 0

    In view of the concavity test, there is a point of inflection at any point where the second derivative changes sign (assuming that the function is continuous).

    The second derivative test can be of great pratical value in determining the nature of a critical point whether it is a local minimum or local maximum. Of course, not all critical points correspond to extrema, as the example of x = 0 for the function f(x) = x3 at which f'' = 0. At such points, the second derivative test is inconclusive.

    Example 5.9.4. Let f(x) = x3. Since f'(x) = 3x2 ≥ 0 the function is increasinig over all ℝ, the stationary point at x = 0 cannot be an extreme point. Since f''(x) = 6x ≥ 0 for x ≥ 0. Thus the function is convex for x > 0 and concave for x < 0 and has a horizontal inflection point at x = 0.  ■

    cubic function

    The reader ought to beware that f"(x0) = 0 does not warrant x0 is a point of inflection for f. The function f(x) = x4 has second derivative f"(x) = 12x2 which vanishes at x0 = 0. The origin is nonetheless not an inflection point, for the tangent at x0 is the axis y = 0, and the graph of f stays always above it. In addition, f" does not change sign around x0.

    The inflection point of the cubic function is known as a horizontal inflection point.

    Definition 5.95 (Horizontal inflection point). Consider a differentiable function f(x). Assume that f'(x0) = 0, and that, in any neighborhood of x0 we have f(x) > f(x0) on one side of x0, and f(x) < f(x0) on the other. Then, the point x0 is called a horizontal inflection point.  □

    In the case the graph of a function that has a Vertical Tangent, its concavity changes when the graph intercept the vertical tangent. We call such a point a vertical tangent inflection point.

    vertical tangents
    «Hôpital's Rule Index Definizione limite per funzioni operanti tra spazi metrici o normati »