Chapter 2 — Functions and Dynamic Relations¶
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.
§1. Absolute and relative extrema¶
Definition. Let \(f\) be a function and \(c \in \operatorname{Dom}(f)\). We say that \(f\) has an absolute maximum at \(c\) if \(f(c) \ge f(x)\) for all \(x \in \operatorname{Dom}(f)\); in that case, \(f(c)\) is the maximum value of \(f\). Likewise, \(f\) has an absolute minimum at \(c\) if \(f(c) \le f(x)\) for all \(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 \(f\) be a function and \(c \in \operatorname{Dom}(f)\). We say that \(f\) has a relative maximum, or local maximum, at \(c\) if there exists \(\delta > 0\) such that
and a relative minimum at \(c\) if \(f(c) \le f(x)\) for all \(x\) in that same set. Maxima and minima are called, together, extrema.
With this definition, every absolute extremum is also relative: if \(f(c)\) is the largest value on the whole domain, in particular it is the largest within any neighborhood of \(c\). The converse is false: a relative maximum may be the largest value only near \(c\), with higher values elsewhere in the domain.
Figure 2.6 — Interior relative extrema (a local maximum and a local minimum) compared with the absolute extrema, reached here at the endpoints \(a\) and \(b\) of the interval. The curve is schematic: it illustrates the vocabulary of this definition, not the result of the tools of this section.
Reminder. Absolute: the best value on the whole domain. Relative: the best value on some neighborhood \((c - \delta, c + \delta)\) of the point. Every absolute extremum is relative; not every relative extremum is absolute.
§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) = ax^2 + bx + c\), with \(a \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) = ax^2 + bx + c\), with \(a \neq 0\), and \(\Delta = b^2 - 4ac\). If \(a > 0\), \(f\) has an absolute minimum at \(x = -\dfrac{b}{2a}\), with value \(-\dfrac{\Delta}{4a}\). If \(a < 0\), it has at the same point an absolute maximum with that same value.
Proof. Completing the square as in §1.3,
If \(a > 0\), the term \(a\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 \(0\) exactly when \(x = -\frac{b}{2a}\). Therefore \(f(x) \ge -\frac{\Delta}{4a}\) for every \(x \in \mathbb{R}\), with equality only at that point. If \(a < 0\), the same term is never positive, the inequality is reversed and an absolute maximum is obtained. \(\blacksquare\)
The sign of \(a\) decides whether the parabola opens upward, and then its lowest point is an absolute minimum, or downward, with an absolute maximum. The point \(\left(-\frac{b}{2a}, -\frac{\Delta}{4a}\right)\) of the graph is called the vertex.
Example. Among all rectangles with perimeter \(20\), which has the largest area? If one side measures \(x\), the other measures \(10 - x\), with \(0 < x < 10\), and the area is \(A(x) = x(10 - x) = -x^2 + 10x\). Here \(a = -1 < 0\), and the proposition gives an absolute maximum at \(x = -\frac{10}{2 \cdot (-1)} = 5\), with area \(A(5) = 25\). The optimal rectangle is the square with side \(5\). The vertex falls within the domain the problem allows, the interval \((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) = x^2 + 4x\). With \(a = 1 > 0\), the proposition gives an absolute minimum at \(x = -2\), with value \(A(-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 > 0\), where \(A\) is increasing and has no extremum at all.
Reminder. For \(f(x) = ax^2 + bx + c\), the vertex is at \(x = -\frac{b}{2a}\) and the extreme value is \(-\frac{\Delta}{4a}\): a minimum if \(a > 0\), a maximum if \(a < 0\). In an applied problem one must check that the vertex falls within the domain the problem allows.
§3. Extrema through monotonicity¶
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 \(f\) is increasing on \([p, q]\), then its absolute minimum on that interval is at \(x = p\) and its absolute maximum at \(x = q\). If \(f\) is decreasing on \([p, q]\), the roles are reversed.
Proof. Suppose \(f\) is increasing on \([p, q]\) and let \(x \in [p, q]\). If \(x = p\), then \(f(p) = f(x)\); if \(p < x\), the definition of §2.3 gives \(f(p) < f(x)\). In both cases, \(f(p) \le f(x)\). Likewise, \(f(x) \le f(q)\). Therefore \(f(p) \le f(x) \le f(q)\) for every \(x \in [p, q]\). The decreasing case is analogous. \(\blacksquare\)
Example. The function \(\sqrt{x}\) is increasing on \([0, \infty)\) (§2.4). Restricted to the interval \([0, 9]\), its absolute minimum is \(\sqrt{0} = 0\) and its absolute maximum is \(\sqrt{9} = 3\), with no computation beyond evaluating at the endpoints of the interval.
Reminder. A function increasing on \([p, q]\) reaches its minimum at \(p\) and its maximum at \(q\); a decreasing one, the other way around.
§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 \ge 0\),
with equality if and only if \(a = b\).
Proof. Since \(a, b \ge 0\), the roots \(\sqrt{a}\) and \(\sqrt{b}\) exist (§1.2), and since no real square is negative (§1.3),
where we used \(\sqrt{a}\sqrt{b} = \sqrt{ab}\) (§1.2). Dividing by \(2\) gives the inequality. Equality holds if and only if \(\left(\sqrt{a} - \sqrt{b}\right)^2 = 0\), that is, if \(\sqrt{a} = \sqrt{b}\), and by the uniqueness of the root, if \(a = b\). \(\blacksquare\)
The number \(\frac{a + b}{2}\) is the arithmetic mean of \(a\) and \(b\), and \(\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 \(P\), which has the largest area? Let \(x, y > 0\) be the sides. The fixed perimeter gives \(2x + 2y = P\), that is, \(x + y = \frac{P}{2}\). By the inequality,
where in the last step we squared two nonnegative numbers, which preserves the direction by the lemma of §1.2. The area never exceeds \(\frac{P^2}{16}\), and by the equality condition that value is reached exactly when \(x = y = \frac{P}{4}\): the optimal rectangle is the square. With \(P = 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.
Reminder. \(\frac{a + b}{2} \ge \sqrt{ab}\) for \(a, b \ge 0\), with equality if and only if \(a = b\). It is useful when a sum is fixed and the maximum of a product is sought, or the other way around.
§5. How far these tools go¶
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) = 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.