Maxima and minima on closed intervals

A hiker on a mountain trail might stand on the highest bump nearby — a local peak — without being anywhere close to the tallest summit on the whole trail. Local maxima and minima only compare a point to its immediate neighbours; they say nothing about the single highest or lowest value the function reaches over an entire stretch. This article fixes that gap for a continuous function ff on a closed interval [a,b][a, b]. Because the domain is closed and bounded and ff is continuous, the function is guaranteed to attain an absolute maximum and an absolute minimum somewhere on [a,b][a,b] — possibly at an interior critical point, possibly right at one of the two endpoints. We build a short, reliable checklist — the closed-interval test — that finds both values every time, and we work two examples, a cubic and a trigonometric function, to see the endpoints actually win the day.

The core insight

On a closed interval [a,b][a,b], the absolute maximum and minimum of a continuous ff are found simply by comparing the values of ff at every interior critical point and at both endpoints aa and bb.

The core idea

Local versus absolute. A local maximum or minimum only beats its immediate neighbours; an absolute (or global) maximum or minimum beats every point in the whole interval under consideration. A function can have several local peaks and valleys, but on a closed interval it has exactly one absolute maximum value and one absolute minimum value (though these values may be repeated at more than one point).

Why endpoints matter. Endpoints are not local extrema in the usual sense — a point needs neighbours on both sides to be tested that way, and an endpoint has neighbours on only one side. Yet endpoints are still valid candidates for the absolute extrema, precisely because the domain of ff stops there and nothing beyond can be compared.

The guarantee. If ff is continuous on a closed, bounded interval [a,b][a,b], then ff attains an absolute maximum value and an absolute minimum value somewhere in [a,b][a,b]. This existence fact (the Extreme Value Theorem) is used here only as a background guarantee — it is not proved with limits in this course — but it is what makes the checklist below trustworthy: the search for the largest and smallest value is guaranteed to succeed and can be reduced to a short finite list.

candidates={f(a), f(b)}∪{f(c):f′(c)=0 or f′(c) does not exist, c∈(a,b)}\text{candidates} = \{f(a),\ f(b)\} \cup \{f(c) : f'(c) = 0 \text{ or } f'(c) \text{ does not exist}, \ c \in (a,b)\}

where: aa and bb are the two endpoints of the closed interval, and cc ranges over the critical points of ff that lie strictly inside (a,b)(a,b) — points where the derivative is zero or fails to exist. The absolute maximum is the largest number in this candidate set, and the absolute minimum is the smallest.

No classification needed. Unlike hunting for local extrema, this method skips the first-derivative sign test and the second-derivative test entirely. Once the candidate list is built, the job is arithmetic: evaluate ff at each candidate and compare the numbers directly.

Figure
A curve on a closed interval showing the absolute maximum at the right endpoint and the absolute minimum at an interior critical point
Absolute extrema can occur at an endpoint or a critical point x f(x) a critical point (min) b (absolute max)

The closed-interval test — derivation

Derivation AThe closed-interval test

The goal is to justify, step by step from the definitions of local extremum and derivative, why comparing ff at critical points and both endpoints is enough to catch the absolute maximum and minimum of a continuous function on [a,b][a,b], without needing any sign-change or second-derivative classification of the critical points.

Step 1. Assume ff is continuous on the closed, bounded interval [a,b][a,b]. By the Extreme Value Theorem, ff attains an absolute maximum value at some point p∈[a,b]p \in [a,b] and an absolute minimum value at some point q∈[a,b]q \in [a,b]. This is a statement of existence: such points pp and qq are known to exist, though we do not yet know where.

Step 2. Consider the point pp where the absolute maximum occurs. There are only two possibilities: either pp is an endpoint (p=ap = a or p=bp = b), or pp lies strictly inside (a,b)(a,b).

Step 3. If pp lies inside (a,b)(a,b), then because f(p)f(p) is the absolute maximum on all of [a,b][a,b], it is certainly at least as large as ff at every nearby point too — so pp is also a local maximum. If ff is differentiable at pp, this forces f′(p)=0f'(p) = 0 (the tangent must be flat, since the curve cannot be rising into pp from one side and falling away on the other otherwise); if ff is not differentiable at pp, then pp is a critical point by definition anyway. Either way, an interior point pp giving the absolute maximum must be a critical point.

Step 4. So the point pp where the absolute maximum occurs is always one of: the endpoint aa, the endpoint bb, or an interior critical point. The exact same argument, run for a minimum instead of a maximum, shows the point qq giving the absolute minimum is also one of these same candidates. Since both pp and qq must appear somewhere in the finite candidate list {f(a),f(b)}∪{f(c)}\{f(a), f(b)\} \cup \{f(c)\}, comparing the values on that list and picking the largest and smallest is guaranteed to find the true absolute maximum and minimum — nothing is missed, and no further classification of each critical point is needed. Verified: the argument only uses that a differentiable interior extremum forces f′=0f'=0 (else the one-sided difference quotients around pp would force f(p)f(p) to not be extremal), matching the closed-interval test used in both worked examples below.

Worked example

Find the absolute maximum and absolute minimum values of f(x)=x3−6x2+9x+15f(x) = x^3 - 6x^2 + 9x + 15 on the interval [0,5][0, 5].

Step 1. Differentiate: f′(x)=3x2−12x+9=3(x−1)(x−3)f'(x) = 3x^2 - 12x + 9 = 3(x-1)(x-3).

Step 2. Set f′(x)=0f'(x) = 0: this gives critical points x=1x = 1 and x=3x = 3, and both lie inside (0,5)(0,5), so both are valid candidates.

Step 3. Evaluate ff at the critical points and at both endpoints: f(0)=15f(0) = 15, f(1)=1−6+9+15=19f(1) = 1 - 6 + 9 + 15 = 19, f(3)=27−54+27+15=15f(3) = 27 - 54 + 27 + 15 = 15, and f(5)=125−150+45+15=35f(5) = 125 - 150 + 45 + 15 = 35.

Step 4. Compare the candidate list {15,19,15,35}\{15, 19, 15, 35\}. The largest value is 3535, at x=5x=5; the smallest is 1515, occurring at both x=0x=0 and x=3x=3. Absolute maximum =35= 35 at x=5x = 5 (an endpoint); absolute minimum =15= 15 at x=0x = 0 and x=3x = 3.

Competitive stretch

For f(x)=sin⁡x+cos⁡xf(x) = \sin x + \cos x on [0,π2]\left[0, \tfrac{\pi}{2}\right], the same method gives f′(x)=cos⁡x−sin⁡x=0f'(x) = \cos x - \sin x = 0 at x=π4x = \tfrac{\pi}{4}, with f(0)=1f(0) = 1, f ⁣(π4)=2≈1.414f\!\left(\tfrac{\pi}{4}\right) = \sqrt2 \approx 1.414, and f ⁣(π2)=1f\!\left(\tfrac{\pi}{2}\right) = 1. Comparing {1,2,1}\{1, \sqrt2, 1\}: the absolute maximum is 2\sqrt2 at x=π4x = \tfrac{\pi}{4} (an interior critical point this time), and the absolute minimum is 11, tied at both endpoints — a reminder that sometimes the interior point wins and sometimes the endpoints do, which is exactly why every candidate must be checked.

Common traps

  • Forgetting to check the endpoints. As Worked Example 1 shows, the true absolute maximum can sit at an endpoint rather than at any interior critical point — skipping the endpoints is the single most common error on this topic.
  • Including critical points outside [a,b][a,b]. Solving f′(x)=0f'(x) = 0 can produce roots that fall outside the given interval; only roots strictly inside (a,b)(a,b) belong on the candidate list.
  • Running an unnecessary sign test. For absolute extrema you never need to classify a critical point as a local max or min with the first- or second-derivative test — just compute the numerical value of ff there and compare it against the rest of the list.
  • Confusing local with absolute. A local minimum need not be the absolute minimum on the interval, and an endpoint can be an absolute extremum without being a local extremum at all — always finish by comparing every value in the full candidate list.

Ask the tutor: Want to try the closed-interval test on a rational or modulus function, or see a worked example where the interval is open instead of closed?

Why don't we need the first-derivative or second-derivative test here?

Those tests classify a critical point as a local maximum, local minimum, or neither by studying how ff behaves in a small neighbourhood around it. For the closed-interval test we do not care about that local behaviour at all — we only want to know the actual numerical value of ff at each candidate point, then compare all the numbers directly. A point could even be a local minimum and still turn out to be part of the overall absolute maximum comparison in unusual cases, so skipping the classification and comparing raw values is both simpler and safer.

What happens if f is not differentiable at some point inside the interval?

That point still counts as a critical point and must be included in the candidate list, alongside the points where f′(x)=0f'(x) = 0. The definition of a critical point is any interior point where the derivative is either zero or does not exist. Most NCERT-level problems use polynomials, sine and cosine, which are differentiable everywhere, so this case rarely arises in this chapter, but the definition is written to cover it.

Does the closed-interval test work if the interval is open instead of closed, like (a, b)?

No, and this is an important limitation. The Extreme Value Theorem needs the interval to be closed and bounded; on an open interval (a,b)(a,b) the function is never actually evaluated at aa or bb because they are excluded from the domain, so the function may keep climbing or falling as xx approaches an endpoint without ever reaching a maximum or minimum there. For example, f(x)=xf(x) = x on (0,1)(0,1) has no absolute maximum or minimum at all. The closed-interval test as given here applies specifically to closed intervals [a,b][a,b].

Before this

Where this leads