Skip to content

Chapter 2 — Functions

2.8 — Optimization and Extreme Values: Local Behavior

Before asking how the optimum is computed, one must ask what it means, precisely, for a value to be the best.


The properties studied so far describe a function as a whole, or at least on long stretches of its domain: monotonicity, symmetry, asymptotic behavior. This section deals instead with isolated points: those at which a function reaches its highest or lowest value, whether on its whole domain or only near the point. It is the first section of the chapter devoted to the local behavior of a function, and also the one that must be clearest about how far one can go without the tools of Calculus, which this book does not include.

Definition. Let ff be a function and c∈Dom⁡(f)c \in \operatorname{Dom}(f). We say that ff has an absolute maximum at cc if f(c)≥f(x)f(c) \ge f(x) for all x∈Dom⁡(f)x \in \operatorname{Dom}(f); in that case, f(c)f(c) is the maximum value of ff. Likewise, ff has an absolute minimum at cc if f(c)≤f(x)f(c) \le f(x) for all x∈Dom⁡(f)x \in \operatorname{Dom}(f).

The word “absolute” indicates that the comparison is made against the whole domain. There is a more modest notion, which only requires being the best value near the point, and which uses the neighborhood of §1.1, the same one that appeared in §2.4.

Definition. Let ff be a function and c∈Dom⁡(f)c \in \operatorname{Dom}(f). We say that ff has a relative maximum, or local maximum, at cc if there exists δ>0\delta > 0 such that

f(c)≥f(x)for all x∈(c−δ,c+δ)∩Dom⁡(f)f(c) \ge f(x) \quad \text{for all } x \in (c - \delta, c + \delta) \cap \operatorname{Dom}(f)

and a relative minimum at cc if f(c)≤f(x)f(c) \le f(x) for all xx in that same set. Maxima and minima are called, together, extrema.

With this definition, every absolute extremum is also relative: if f(c)f(c) is the largest value on the whole domain, in particular it is the largest within any neighborhood of cc. The converse is false: a relative maximum may be the largest value only near cc, with higher values elsewhere in the domain.

A curve on the interval [a,b] with an interior relative maximum and relative minimum, and its absolute extrema at the endpoints a and b

Figure 2.6 — Interior relative extrema (a local maximum and a local minimum) compared with the absolute extrema, reached here at the endpoints aa and bb of the interval. The curve is schematic: it illustrates the vocabulary of this definition, not the result of the tools of this section.


§2. Extrema of quadratic functions: the vertex

Section titled “§2. Extrema of quadratic functions: the vertex”

The most accessible case, and the most frequent one in applications at this level, is that of a quadratic function f(x)=ax2+bx+cf(x) = ax^2 + bx + c, with a≠0a \neq 0. Section 1.3 completed the square to factor the trinomial; the same computation, read with another purpose, gives the extremum of the function.

Proposition. Let f(x)=ax2+bx+cf(x) = ax^2 + bx + c, with a≠0a \neq 0, and Δ=b2−4ac\Delta = b^2 - 4ac. If a>0a > 0, ff has an absolute minimum at x=−b2ax = -\dfrac{b}{2a}, with value −Δ4a-\dfrac{\Delta}{4a}. If a<0a < 0, it has at the same point an absolute maximum with that same value.

Proof. Completing the square as in §1.3,

f(x)=a(x+b2a)2−Δ4af(x) = a\left(x + \frac{b}{2a}\right)^2 - \frac{\Delta}{4a}

If a>0a > 0, the term a(x+b2a)2a\left(x + \frac{b}{2a}\right)^2 is the product of a positive number and a square, so it is never negative, and it equals 00 exactly when x=−b2ax = -\frac{b}{2a}. Therefore f(x)≥−Δ4af(x) \ge -\frac{\Delta}{4a} for every x∈Rx \in \mathbb{R}, with equality only at that point. If a<0a < 0, the same term is never positive, the inequality is reversed and an absolute maximum is obtained. ■\blacksquare

The sign of aa decides whether the parabola opens upward, and then its lowest point is an absolute minimum, or downward, with an absolute maximum. The point (−b2a,−Δ4a)\left(-\frac{b}{2a}, -\frac{\Delta}{4a}\right) of the graph is called the vertex.

Example. Among all rectangles with perimeter 2020, which has the largest area? If one side measures xx, the other measures 10−x10 - x, with 0<x<100 < x < 10, and the area is A(x)=x(10−x)=−x2+10xA(x) = x(10 - x) = -x^2 + 10x. Here a=−1<0a = -1 < 0, and the proposition gives an absolute maximum at x=−102⋅(−1)=5x = -\frac{10}{2 \cdot (-1)} = 5, with area A(5)=25A(5) = 25. The optimal rectangle is the square with side 55. The vertex falls within the domain the problem allows, the interval (0,10)(0, 10), and that is why it is the answer.

That last check is not a detail. In the geometric problem of §1.6, the area was A(x)=x(x+4)=x2+4xA(x) = x(x + 4) = x^2 + 4x. With a=1>0a = 1 > 0, the proposition gives an absolute minimum at x=−2x = -2, with value A(−2)=−4A(-2) = -4. The result is correct as a statement about the formula, but it says nothing about the problem: a width cannot be negative, nor can an area. As in §1.6, the extremum of a formula matters only if it falls within the domain the problem allows, here x>0x > 0, where AA is increasing and has no extremum at all.


When a function is not quadratic but its monotonicity is known, from the analysis of §2.3 or because it comes from a prototype transformed according to §2.5, its extrema on a closed interval follow from the definition of monotonicity.

Proposition. If ff is increasing on [p,q][p, q], then its absolute minimum on that interval is at x=px = p and its absolute maximum at x=qx = q. If ff is decreasing on [p,q][p, q], the roles are reversed.

Proof. Suppose ff is increasing on [p,q][p, q] and let x∈[p,q]x \in [p, q]. If x=px = p, then f(p)=f(x)f(p) = f(x); if p<xp < x, the definition of §2.3 gives f(p)<f(x)f(p) < f(x). In both cases, f(p)≤f(x)f(p) \le f(x). Likewise, f(x)≤f(q)f(x) \le f(q). Therefore f(p)≤f(x)≤f(q)f(p) \le f(x) \le f(q) for every x∈[p,q]x \in [p, q]. The decreasing case is analogous. ■\blacksquare

Example. The function x\sqrt{x} is increasing on [0,∞)[0, \infty) (§2.4). Restricted to the interval [0,9][0, 9], its absolute minimum is 0=0\sqrt{0} = 0 and its absolute maximum is 9=3\sqrt{9} = 3, with no computation beyond evaluating at the endpoints of the interval.


§4. The inequality between the means and extrema under a constraint

Section titled “§4. The inequality between the means and extrema under a constraint”

There is a kind of problem that does not fit the previous cases: one in which two quantities are linked by a constraint, for example a fixed sum, and one seeks the extremum of a third quantity built from them, for example their product. A classical inequality solves many of these problems without reducing them to a function of a single variable.

Proposition (inequality between the arithmetic and geometric means). For a,b≥0a, b \ge 0,

a+b2≥ab\frac{a + b}{2} \ge \sqrt{ab}

with equality if and only if a=ba = b.

Proof. Since a,b≥0a, b \ge 0, the roots a\sqrt{a} and b\sqrt{b} exist (§1.2), and since no real square is negative (§1.3),

(a−b)2≥0⟹a−2ab+b≥0⟹a+b≥2ab\left(\sqrt{a} - \sqrt{b}\right)^2 \ge 0 \quad\Longrightarrow\quad a - 2\sqrt{a}\sqrt{b} + b \ge 0 \quad\Longrightarrow\quad a + b \ge 2\sqrt{ab}

where we used ab=ab\sqrt{a}\sqrt{b} = \sqrt{ab} (§1.2). Dividing by 22 gives the inequality. Equality holds if and only if (a−b)2=0\left(\sqrt{a} - \sqrt{b}\right)^2 = 0, that is, if a=b\sqrt{a} = \sqrt{b}, and by the uniqueness of the root, if a=ba = b. ■\blacksquare

The number a+b2\frac{a + b}{2} is the arithmetic mean of aa and bb, and ab\sqrt{ab} their geometric mean. The inequality is usually abbreviated AM-GM.

Example. Let us generalize the example of §2: among all rectangles with perimeter PP, which has the largest area? Let x,y>0x, y > 0 be the sides. The fixed perimeter gives 2x+2y=P2x + 2y = P, that is, x+y=P2x + y = \frac{P}{2}. By the inequality,

xy≤x+y2=P4⟹xy≤P216\sqrt{xy} \le \frac{x + y}{2} = \frac{P}{4} \quad\Longrightarrow\quad xy \le \frac{P^2}{16}

where in the last step we squared two nonnegative numbers, which preserves the direction by the lemma of §1.2. The area never exceeds P216\frac{P^2}{16}, and by the equality condition that value is reached exactly when x=y=P4x = y = \frac{P}{4}: the optimal rectangle is the square. With P=20P = 20 we recover the result of §2. The constraint and the quantity to be maximized were combined directly, without building a function of a single variable.


The three tools of this section, the vertex of the parabola, monotonicity and the AM-GM inequality, solve a significant share of the optimization problems at this level, but they do not form a general method. None of the three says where the relative extrema of, for example, f(x)=x3−3xf(x) = x^3 - 3x are: it is not quadratic, its monotonicity changes direction at points these tools do not allow one to locate without knowing them beforehand, and it does not have the form of a fixed sum with a variable product. Determining the extrema of arbitrary functions, without depending on their having one of these particular structures, is one of the problems that motivate differential Calculus, with a tool, the derivative, capable of locating relative extrema without knowing the form of the function in advance. What has been developed here is not a general method disguised as a particular case, but what the title announces: an introduction to local behavior with the means available in this book.


The search for an extremum, the largest, the smallest, the most efficient, is not a concern exclusive to this section or to mathematics. A ray of light travels between two points along the path that minimizes the travel time; a soap bubble takes, among all the shapes enclosing a given volume, the one with the least surface; an ant colony builds routes that approach, without conscious computation, a path of minimal length. That nature seems to solve optimization problems again and again, without equations or inequalities, is one of the most persistent coincidences between mathematical structure and the behavior of the world. The question remains open whether that coincidence reveals something deep about how the world is made, or whether it is mathematics that finds economy everywhere because those are, of all possible structures, the simplest to describe.

With the extrema made precise, including the limits of what can be achieved without Calculus, the chapter completes its technical journey: from the function as a set of pairs to its domain, its global behavior, its prototypes and transformations, its algebra and composition, its reversibility and this first contact with optimization. The next section closes the chapter with a historical look at the very concept of function.