Monotonic Functions and Local Extrema
“Mr. Smith, could you explain to us what recursion is all about?” The professor in Introduction to Programming asked an apathetic student. “I don’t know the question, but sex, money, or both is definitely the answer, and God, justice, our values, and love are just the excuses,” I replied. “You shall not pass,” the teacher was far from amused, Apocalypse, Anawim, #justtothepoint.
Recall
Definition. A function f is a rule, relationship, or correspondence that assigns to each element x in a set D, x ∈ D (called the domain) exactly one element y in a set E, y ∈ E (called the codomain or range).
-
The pair (x, y) is denoted as y = f(x) where: x is the independent variable (input) and y is the dependent variable (output). Often, both the domain D and codomain E are the set of real numbers ℝ or subsets of ℝ.
-
D is the domain, the set of all possible inputs. E is the codomain or range, the set of all possible outputs.
-
Key property💡: Each input has exactly one output. (No input is assigned two different outputs — this is the vertical line test!)
-
Examples: constant, f(x) = c, horizontal line, slope = 0; linear, f(x) = mx + b, straight line, constant slope m and y-intercept b; quadratic $f(x) = ax^2 + bx + c$, u-shaped or inverted U, opens up (a > 0) or down (a < 0), vertex at x = $\frac{-b}{2a}$, symmetry about vertical axis through vertex; polynomial, $f(x) = a_n x^n + \dots + a_0$, a smooth and continuous curve, n roots (counting multiplicity), end behaviour determined by its leading term $a_n x^n$; exponential function, $f(x) = a \cdot b^x, a \ne 0, b \gt 0$, rapid growth (b > 1) or decay (0 < b < 1); trigonometric functions, $\sin(x), \cos(x), \tan (z)$ oscillatory, periodic behavior (period 2π for sin/cos, π for tan), sin and cos are bounded between -1 and 1, but tan is unbounded; step function $f(x) = \lfloor x \rfloor$, greatest integer ≤ x, constant on intervals [n, n+1), jumps at integers, its graph is a staircase shape; absolute value f(x) = |x|, V-shaped graph, slope changes at 0.
-
Functions can be expressed in multiple forms, each useful in different contexts: verbal description, table of values (list of pairs), algebraic formula, graph, piecewise definition, recursive definition, parametric or integral form, and series representation.
-
Evaluating a function means finding or computing the output value f(x) for a given input value x. f(x) = $x^2-2x +4, f(2) = 2^2 -2\cdot 2 + 4 = 4 - 4 + 4 = 4, f(0) = 0^2 -2\cdot 0 + 4 = 4, f(1) = 1^2 -2\cdot 1 + 4 = 1 -2 +4 = 3$
-
The x-intercept is any point on the graph that intersects or crosses the x-axis. In other words, it is the value of x when the function (y-coordinate or y-value) is zero. The y-intercept is the point where the graph intersects or crosses the y-axis. y-coordinate of the point whose x-coordinate is 0, e.g., 2x - 3y = 6. x-intercept: set y = 0 → 2x = 6 ⇒ x=3, so (3, 0). y-intercept: set x = 0 → −3y = 6 ⇒ y = −2, so (0, −2).
Monotonic Functions
Intuitively, a function is monotonic on an interval if it never changes its general direction on that interval: it either always goes up (or stays flat) as you move from left to right, or always goes down (or stays flat).
A monotonic function is a function that maintains a consistent direction of change on an interval of its domain: it is either entirely nondecreasing (monotone increasing) or entirely nonincreasing (monotone decreasing) on that interval. More precisely, let f be a real-valued function defined on some interval $I \subseteq \mathbb{R}$. f increases (or is nondecreasing) on an interval I if ∀a, b ∈ I, b > a ⟹ f(b) >= f(a). If, moreover, ∀a, b ∈ I, b > a ⟹ f(b) > f(a), the function f is said to be strictly increasing on I.
Increasing (nondecreasing): the function never goes down as you move from left to right along the x-axis, the graph either raises or stay flat. Strictly increasing: the function always goes up (strictly rises) as you move to the right; it never stays constant on any nontrivial interval.
Conversely, f decreases (or is nonincreasing) on an interval I if ∀a, b ∈ I, b > a ⟹ f(b) <= f(a). If ∀a, b ∈ I, b > a ⟹ f(b) < f(a), the function is said to be strictly decreasing on I.
Graphically, as you move from left to right along the x-axis, the graph either goes down or stays flat; for strictly decreasing, it always goes down.
Finally, f is said to be constant on an interval I if ∀a, b ∈ I, f(a) = f(b). In other words, the graph is a horizontal line on that interval.
Examples
- f(x) = 2x is a linear function with positive slope 2. It is strictly increasing on all of ℝ. f’(x) = 2 > 0.
- $f(x) = a^x$ where a > 1 (a = e is a special case of this) is an exponential with base > 1. It is also strictly increasing on all of ℝ. $f'(x) = a^x \cdot ln(a) \gt 0$ since a > 1.
- $f(x) = \sqrt{x}$ is strictly increasing on its domain [0, ∞). $f'(x) = \frac{1}{2\sqrt{x}} \gt 0, \forall x \in (0, \infin)$.
- f(x) = -2x is a linear function with negative slope -2. It is strictly decreasing on all of ℝ. f’(x) = -2 < 0.
- $f(x) = -\sqrt{x}$ is strictly decreasing on its domain [0, ∞). $f'(x) = -\frac{1}{2\sqrt{x}} \lt 0, \forall x \in (0, \infin)$.
- $f(x) = \frac{1}{x}$ is decreasing on (−∞, 0) and (0, ∞), but it has a discontinuity at x = 0 where it jumps from −∞ to +∞. It is not defined at x = 0. f’(x) = $\frac{-1}{x^2} \lt 0, \forall x \in \mathbb{R} \setminus \{ 0 \}$.
- $f(x) = a^x$ where 0 < a < 1 is an exponential with base between 0 and 1, and it is strictly decreasing on all of ℝ. $f'(x) = a^x \cdot ln(a) \lt 0$ since ln(a) < 0 $\forall a$ such that 0 < a < 1.
Monotonicity and the derivative
If f is differentiable on I, monotonicity can often be detected via the derivative:
- If $f'(x) \ge 0, \forall x \in I$, then f is nondecreasing on I.
- If $f'(x) > 0, \forall x \in I$, then f is strictly increasing on I.
- If $f'(x) \le 0, \forall x \in I$, then f is nonincreasing on I.
- If $f'(x) < 0, \forall x \in I$, then f is strictly decreasing on I.
Intuition
🧠 These results are consequences of the Mean Value Theorem. They make precise the intuition that a positive derivative means sloping upwards, the curve always climbs. Similarly, a negative derivative means sloping downwards, the curve always descends. Furthermore, a zero slope means the curve is flat.
Remarks
- Zero derivative at a single point does not imply the function is constant unless it holds everywhere, e.g., $f(x)=x^3$ has f’(0) =0, but the function is not constant near (in any neighborhood of) 0. However, if $f'(x) = 0, \forall x \in I$, then f is constant on I, e.g., f(x) = 7.
- Strict monotonicity requires strict inequalities. If $f'(x) \geq 0$ but equals 0 on a subinterval, the function may be flat there (nondecreasing but not strictly increasing).
Example A, f(x) = $e^x$ (f′(x) > 0 everywhere) is strictly increasing everywhere —no flat sections, no pauses. Each x-value maps to a unique, larger y-value than any previous x. The graph is a smooth curve that constantly rises from left to right.
Example B, $f(x) = \begin{cases} x, &x\leq 0 \\\\ 0, &0 < x < 1 \\\\ 1, &x > 1 \end{cases}$
For x < 0: f is strictly increasing. For 0 < x < 1, f is completely flat (constant). For x > 1: f is strictly increasing again. Why is it not strictly increasing?: $f(0.2) = f(0.8) = 0$ even though $0.2 < 0.8$. The function “pauses” on the interval (0, 1). - Differentiability is crucial. A function can be monotone without being differentiable everywhere for example, f(x) = ∣x∣ is increasing on [0, ∞) but not differentiable at x = 0), but derivative tests for monotonicity only applies when differentiability holds (the function is differentiable at every point).
Local Extrema
We now turn to the study of local maxima and local minima, also called local extrema.
Informally, these are peaks and valleys of the graph when you look in a small neighborhood – the “highest” or “lowest” nearby point even if they are not the highest or lowest values on the entire domain.
Local extrema are the largest or smallest values locally, that is, in some interval around a point. More formally, they are points on the graph where the function reaches a maximum or minimum value within a small neighborhood around that point.
A critical point of a function f(x) is a point c in the domain where the derivative is zero (f’(c) = 0) or does not exists. Local extrema can only occur at critical points or at endpoints.
Let $D \subseteq \mathbb{R}$ be the domain of a function f and let c ∈ D.
Definition. f is said to have a local or relative maximum at c if there exists an interval (a, b) containing c ($c \in (a, b)$) such that f(c) ≥ f(x) $∀ x \in (a, b) ∩ D$. That is, in some neighborhood around c, the value f(c) is at least as large as the nearby values of the function (the maximum value).
Definition. f is said to have a local or relative minimum at c if there exists an interval (a, b) containing c ($c \in (a, b)$) such that f(c) ≤ f(x) $∀ x \in (a, b) ∩ D$. Again, in some neighborhood around c, the value f(c) is less than or equal to all the nearby values of the function (the minimum value).
We say that f has a local extremum at c if c is either a local maximum or a local minimum. Equivalently, it is a point where the function changes its monotonicity within the domain: from increasing to decreasing (local maximum) or from decreasing to increasing (local minimum).
Suppose f is defined on an interval I, and $c \in I$ is a point where f attains a local maximum or minimum. Then one of the following must hold:
- Interior Point with Existing Derivative. f′(c) = 0 (critical point). Imagine you’re at a local maximum (you’re standing at the top of a hill). To the left of c, the function must be increasing (slopes positive). To the right of c, the function must be decreasing (slopes negative). At the peak itself, the slope flattens: f’(c) = 0. So the derivative must change sign from positive to negative around c, e.g., f(x) = $x^3-3x^2, f'(x) = 3x^2-6x = 3x(x-2) = 0 \leadsto x = 0, 2$. x = 2 is a local minimum; x=0 is not an extremum (it’s a saddle point). Not all critical points are extrema!
- Interior Point with Non-Existing Derivative, f′(c) does not exist (critical point). Typical cases: sharp corners, cusps, vertical tangents. Then, you could still have a peak or valley, e.g., f(x) = ∣x∣ at x = 0 the derivative does not exist, but f has a local minimum.
- c is an endpoint of the domain. A function can be a local maximum or minimum even if $f'(c)\neq 0$, e.g., f(x) = $x^2$ on [0, 2] has a minimum at x = 0 (endpoint, $f'(0) = 0$) and a maximum at x = 2 (endpoint, $f'(2) = 4 \ne 0$).
Necessary condition: If f has a local extremum at an interior point (c is inside the domain, not at a boundary) where f' exists, then f'(c) = 0. However, a point where f’(c) = 0 (critical point) is not sufficient (does not guarantee) to be a local extremum, e.g., f(x) = $x^3-3x^2$, x = 0 is not a local extremum. Critical points may be a local maximum (peak), a local minimum (valley) or neither (inflection/saddle), e.g., $f(x)=x^3$ has f’(0) = 0, but no extremum at x = 0. This is a saddle point (or stationary point of inflection). Furthermore, extrema can occur at non-differentiable points (e.g., f(x) = |x| has a local minimum at x = 0, but f’(0) does not exist; f(x) = $\sqrt[3]{x^2}$ has a minimum at x = 0, but the derivative is undefined) or endpoints.
Conclusion: 💡Local extrema can only occur where the function stops rising or falling —either because the derivative is zero, the derivative doesn't exist, or you're at the edge of the domain.
How to Find Local Extrema (Practical Method)
Given f defined on an interval [a, b]:
- Find all critical points in (a,b). Solve f′(x) = 0. Find where f′(x) does not exist.
- Include endpoints: x = a and x = b.
- Evaluate f(x) at all these candidate points.
- Compare values: The largest is the absolute maximum; the smallest is the absolute minimum. Others may be local extrema.
Bibliography
- NPTEL-NOC IITM, Introduction to Galois Theory.
- Algebra, Second Edition, by Michael Artin.
- LibreTexts, Calculus. Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
- Field and Galois Theory, by Patrick Morandi. Springer.
- Michael Penn, and MathMajor.
- Contemporary Abstract Algebra, Joseph, A. Gallian.
- YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
- MIT OpenCourseWare 18.01 Single Variable Calculus, Fall 2007 and 18.02 Multivariable Calculus, Fall 2007.
- Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.