Leyla wants to make an open box for her beads from a square piece of cardboard with 12 cm sides: she will cut equal squares from the corners and fold up the edges. Tiny squares give a shallow box; big ones leave almost no base. The best size hides somewhere in between, and the derivative finds it exactly. In the previous lesson we found the extrema of a function — the “peaks” and “valleys” of its graph. Now we ask a bigger question: what are the greatest and the least values on a whole interval, and how do we choose the best option in a real problem?
Extremum or greatest value: what is the difference?
A maximum (an extremum) is a local notion: f(x₀) is compared only with the values at nearby points. The greatest value is global: it is compared with the values at all points of the given set. Picture a mountain trail: there are several peaks along the way, but the highest point of the whole trail may be one of them — or the very end of the trail, if it finishes on a summit.
Greatest and least valuesDefinition
Let x₀ ∈ X. If f(x) ≤ f(x₀) for all x in the set X, the number M = f(x₀) is the greatest value of f on X. If f(x) ≥ f(x₀) for all x ∈ X, then m = f(x₀) is the least value. Notation: M = max f(x), m = min f(x) (x ∈ X).
| Feature | Extremum | Greatest / least value |
|---|---|---|
| Compared with | values at nearby points | values at all points of the set |
| How many | there can be several maxima and minima | one number (it may be reached at several points) |
| At an end of [a, b] | never: an extremum point is an inner point | often reached exactly there |
| Depends on the interval? | no | yes: change the interval and the answer may change |
For example, f(x) = x + 4/x has a maximum of −4 at x = −2 and a minimum of 4 at x = 2: the maximum is smaller than the minimum! There is no contradiction, because each one is compared only with its neighbours.
A continuous function on a closed interval: the theorem and the algorithm
The Weierstrass theorem (school statement): a function continuous on a closed interval [a, b] attains its greatest and least values on it. Intuitively, a graph drawn from x = a to x = b without lifting the pencil has a highest and a lowest point. Both conditions matter. On the open interval (0, 1) the function f(x) = x has neither: its values come as close as you like to 0 and 1 but never reach them. On [0, π] the function tan x is not continuous (it is undefined at x = π/2) and takes arbitrarily large values.
Where can the greatest value be? If it is reached at an inner point x₀, then x₀ is also a maximum point, so by the necessary condition from the previous lesson f′(x₀) = 0 or f′(x₀) does not exist: x₀ is a critical point. Otherwise it is reached at an end, a or b. The same holds for the least value. So there are only a few candidates, and we simply compare them — no sign chart is needed.
Where
- a, b
- the ends of the interval
- x₁, …, xₖ
- the critical points inside (a, b)
- M, m
- the greatest and least values of f on [a, b]
For a function continuous on [a, b], the greatest and least values are chosen among the values at the ends and at the critical points inside.
Check the function
f must be continuous on [a, b]: the whole interval lies in the domain.
Differentiate
Find f′(x) and factor it if you can.
Critical points
Solve f′(x) = 0 and find where f′ does not exist. Keep only the points inside (a, b); drop the rest.
Compute the values
Evaluate f at the kept points and at both ends, a and b.
Choose and answer
The largest number is M, the smallest is m. The answer is a value, not a point: “the greatest value is 10 (at x = −1)”.
Four candidates
Problem
Find the greatest and least values of f(x) = x³ − 3x² − 9x + 5 on [−2, 4]. How would the answer change on [−2, 6]?
Show solutionHide solution
Solution
2) f′(x) = 3x² − 6x − 9 = 3(x + 1)(x − 3).
3) Critical points: x = −1 and x = 3, both inside (−2, 4).
4) f(−2) = −8 − 12 + 18 + 5 = 3; f(−1) = −1 − 3 + 9 + 5 = 10; f(3) = 27 − 27 − 27 + 5 = −22; f(4) = 64 − 48 − 36 + 5 = −15.
5) The greatest value is 10 (at x = −1), the least value is −22 (at x = 3).
On [−2, 6]: f(6) = 216 − 108 − 54 + 5 = 59, so the greatest value becomes 59, reached at the end x = 6, where there is no maximum at all.
Three more intervals
Problem
Find the greatest and least values: 1) f(x) = x + 4/x on [1, 4]; 2) f(x) = sin x + cos x on [0, π/2]; 3) f(x) = 2x³ − 3x² − 12x + 1 on [0, 3].
Show solutionHide solution
Solution
2) f′(x) = cos x − sin x = 0 → tan x = 1 → x = π/4. f(0) = 1, f(π/4) = √2/2 + √2/2 = √2 ≈ 1.41, f(π/2) = 1. Greatest value √2, least value 1.
3) f′(x) = 6x² − 6x − 12 = 6(x + 1)(x − 2). x = −1 lies outside [0, 3], so we drop it (f(−1) = 8 would give a false “greatest value”!). f(0) = 1, f(2) = 16 − 12 − 24 + 1 = −19, f(3) = 54 − 27 − 36 + 1 = −8. Greatest value 1, least value −19.
Shortcut: if f′ keeps its sign on the whole interval, the function is monotonic and the answer sits at the ends. For an increasing function m = f(a) and M = f(b); for a decreasing one it is the other way round.
Monotonic functions
Problem
Find the greatest and least values: 1) f(x) = x³ + 3x − 2 on [−1, 2]; 2) f(x) = 5 − 2x − x³ on [0, 2]; 3) f(x) = x² − 6x + 1 on [0, 2].
Show solutionHide solution
Solution
2) f′(x) = −2 − 3x² < 0, so f decreases. M = f(0) = 5, m = f(2) = 5 − 4 − 8 = −7.
3) f′(x) = 2x − 6 = 0 → x = 3, but this point lies outside [0, 2]; on the interval f′ < 0, so f decreases. M = f(0) = 1, m = f(2) = 4 − 12 + 1 = −7.
If the interval is not closed — (a, b), (0, +∞) — the theorem guarantees nothing. But another reliable rule works: if a continuous function has exactly one critical point x₀ on an interval and f′ changes sign there from “−” to “+”, then f(x₀) is the least value on the whole interval: the function decreases up to x₀ and increases after it. If the sign changes from “+” to “−”, f(x₀) is the greatest value. Most optimisation problems are solved with exactly this rule.
A single critical point
Problem
1) Find the least value of f(x) = x² + 16/x on (0, +∞). 2) Find the greatest value of g(x) = 3x − x³ on (0, +∞).
Show solutionHide solution
Solution
2) g′(x) = 3 − 3x² = 3(1 − x)(1 + x) = 0 → x = 1 (x = −1 is not in the interval). For 0 < x < 1, g′ > 0; for x > 1, g′ < 0: a maximum. Greatest value: g(1) = 3 − 1 = 2. There is no least value: g(x) → −∞ as x → +∞.
Optimisation problems: from words to a function
Optimisation problemDefinition
A problem of finding the option that makes some quantity (area, volume, cost, profit) as large or as small as possible. In the language of mathematics: finding the greatest or least value of a function of one variable on its domain.
The derivative does the calculus in a few lines; the real work is turning the words into a function of one variable. Follow the same plan every time.
Variable
Choose the quantity you can change, call it x and note its unit.
Function
Express the quantity to optimise (area, volume, cost…) through x; use the given condition to remove any other letters.
Domain
Take it from the meaning of the problem: lengths are positive, a cut cannot exceed half the sheet, and so on.
Derivative
Differentiate and find the critical points in the domain.
Check
On a closed interval, compare with the ends; with a single critical point, check the sign of f′ around it.
Answer
Answer exactly what is asked (dimensions, volume, price…) and give the unit.
The largest area
Problem
Murad wants to enclose a rectangular garden with 40 m of fence. What dimensions give the largest area?
Show solutionHide solution
Solution
Function: S(x) = x(20 − x) = 20x − x².
Domain: 0 < x < 20.
Derivative: S′(x) = 20 − 2x = 0 → x = 10.
Check: S′ > 0 for x < 10 and S′ < 0 for x > 10, so the only critical point is a maximum.
Answer: 10 m × 10 m, a square; S = 100 m². In general, among rectangles with a given perimeter the square has the largest area.
A fence along a wall
Problem
Elvin wants to fence a rectangular run for his chickens next to the wall of a barn. He has 60 m of wire netting, and no netting is needed along the wall. What dimensions give the largest area?
Show solutionHide solution
Solution
Function: S(x) = x(60 − 2x) = 60x − 2x².
Domain: 0 < x < 30.
Derivative: S′(x) = 60 − 4x = 0 → x = 15.
Check: S′ changes sign from “+” to “−” at x = 15 — a maximum.
Answer: 15 m × 30 m (30 m along the wall); S = 450 m².
Note: this time the answer is not a square — the side along the wall is twice as long. The same 60 m on all four sides would give at best a 15 m × 15 m square of only 225 m²: the wall doubles the area.
A very common target is a sum x + k/x: one term grows with x while the other shrinks. The derivative shows where they balance.
Where
- k
- a positive constant
- x
- a positive variable
- 2√k
- the least value of the sum
For x < √k, f′ < 0 and for x > √k, f′ > 0, so the single critical point gives the least value. At the optimum both terms are equal: x = k/x = √k.
Using x + k/x
Problem
1) For which positive x is the sum x + 9/x smallest, and what is this least value? 2) A rectangular plot must have an area of 36 m². What dimensions need the shortest fence? 3) Find the least value of x + 4/x on [1, 4] with the formula.
Show solutionHide solution
Solution
2) One side is x m, the other 36/x m; the perimeter is P(x) = 2(x + 36/x), x > 0. By the formula (k = 36), x = 6 and P = 2 · 2√36 = 24 m. Answer: a 6 m × 6 m square with 24 m of fence.
3) k = 4 and √4 = 2 lies in [1, 4], so the least value is 2√4 = 4 (at x = 2) — the same as above. The greatest value still comes from the ends.
Where
- a
- the side of the square sheet
- x
- the side of the squares cut from the corners (the height of the box)
- a − 2x
- the side of the base of the box
- V
- the volume of the box
An open box from a square sheet: cut off squares with side a/6.
Leyla’s box
Problem
Leyla cuts equal squares from the corners of a 12 cm × 12 cm sheet of cardboard and folds up the edges into an open box. What side should the cut squares have for the largest volume, and what is this volume? Then use the formula for sheets with sides 30 cm and 18 cm.
Show solutionHide solution
Solution
Function: the base is a square with side 12 − 2x, so V(x) = x(12 − 2x)².
Domain: 0 < x < 6 (at x = 6 no base is left).
Derivative: V′(x) = (12 − 2x)² − 4x(12 − 2x) = (12 − 2x)(12 − 6x) = 0 → x = 2 or x = 6; x = 6 is not in the domain.
Check: V′(1) = 10 · 6 = 60 > 0, V′(3) = 6 · (−6) = −36 < 0 — a maximum.
Answer: cut squares with 2 cm sides; the box is 8 cm × 8 cm × 2 cm and V = 2 · 8² = 128 cm³.
With the formula: a = 30 cm → x = 5 cm, V = 5 · 20² = 2000 cm³; a = 18 cm → x = 3 cm, V = 3 · 12² = 432 cm³.
Interactive
Where
- r
- the radius of the base
- h
- the height of the cylinder
- V
- the given volume
- S
- the total surface area: two bases 2πr² and the side 2πrh
A closed cylinder of given volume needs the least material when its height equals its diameter.
A cylindrical can
Problem
A closed cylindrical can must hold 250π cm³ (≈ 785 cm³). What radius and height need the least metal? Then do the same for a can of 54π cm³.
Show solutionHide solution
Solution
Function: from πr²h = 250π, h = 250/r²; S(r) = 2πr² + 2πr · 250/r² = 2πr² + 500π/r.
Derivative: S′(r) = 4πr − 500π/r² = 0 → r³ = 125 → r = 5.
Check: S′ < 0 for r < 5 and S′ > 0 for r > 5, so the only critical point is a minimum.
Answer: r = 5 cm, h = 250/25 = 10 cm = 2r; S = 50π + 100π = 150π ≈ 471 cm².
For 54π cm³: r³ = 27 → r = 3 cm, h = 6 cm, S = 18π + 36π = 54π ≈ 170 cm².
The closest point of a parabola
Problem
Find the point of the parabola y = x² closest to A(3, 0) and this distance. Then do the same for B(6, 3).
Show solutionHide solution
Solution
Function: the squared distance g(x) = MA² = (x − 3)² + (x² − 0)² = x⁴ + x² − 6x + 9. When MA is smallest, so is MA², and MA² has no square root, so it is easier to differentiate.
Derivative: g′(x) = 4x³ + 2x − 6 = 2(x − 1)(2x² + 2x + 3). The factor 2x² + 2x + 3 is always positive (its discriminant 4 − 24 < 0), so x = 1 is the only critical point.
Check: g′ changes sign from “−” to “+”, so this is the least value.
Answer: M(1, 1), MA = √(4 + 1) = √5 ≈ 2.24.
For B(6, 3): g(x) = (x − 6)² + (x² − 3)², g′(x) = 4x³ − 10x − 12 = 2(x − 2)(2x² + 4x + 3), again one critical point x = 2. Answer: M(2, 4), MB = √(16 + 1) = √17 ≈ 4.12.
Where
- p
- the selling price of one item (manat)
- q(p)
- the number of items sold at that price
- c
- the cost of one item
- R, Π
- revenue (the money taken in) and profit
Revenue is price times quantity sold; profit subtracts the cost of every item sold.
The best price for ice cream
Problem
A kiosk on the Baku Boulevard sells ice cream. Observations show that at a price of p manat it sells q = 200 − 40p cones a day, and each cone costs the kiosk 1 manat. 1) Which price gives the largest revenue? 2) Which price gives the largest profit? 3) How would the answer change if a cone cost the kiosk 2 manat?
Show solutionHide solution
Solution
1) R(p) = p(200 − 40p) = 200p − 40p², R′(p) = 200 − 80p = 0 → p = 2.5 manat. R(2.5) = 2.5 · 100 = 250 manat (at the ends R(0) = R(5) = 0).
2) Π(p) = (p − 1)(200 − 40p) = −40p² + 240p − 200, Π′(p) = 240 − 80p = 0 → p = 3 manat. At the ends Π(0) = −200 and Π(5) = 0, while Π(3) = 2 · 80 = 160 manat is the greatest profit, with 80 cones sold a day.
3) Π(p) = (p − 2)(200 − 40p), Π′(p) = 280 − 80p = 0 → p = 3.5 manat, Π = 1.5 · 60 = 90 manat.
The largest revenue and the largest profit come at different prices: selling more does not mean earning more.
Shortcuts and typical mistakes
- 1.f(x) = x² − 4x on [0, 5]: greatest value =
- 2.For x > 0 the least value of x + 25/x =
- 3.Largest open box from a 24 cm square sheet: side of the cut squares = cm
- 4.Closed cylinder of volume 16π cm³ with the least material: radius = cm
This lesson completes the module “The derivative and its applications”. The ideas of critical points, signs and endpoints continue at university level in the lesson “Applications of derivatives” of the “Calculus” module, together with concavity, L’Hôpital’s rule and related rates.
Remember
- An extremum is local (compared with nearby points); the greatest and least values are global (compared with every point of the set).
- A function continuous on [a, b] attains its greatest and least values — at a critical point inside or at an end.
- Algorithm: f′ → critical points inside (a, b) → values there and at the ends a, b → pick the largest and the smallest.
- For a monotonic function the answer is at the ends; with a single critical point on an interval, the sign of f′ tells whether it gives the greatest or the least value.
- Optimisation: variable → function → domain → derivative → check → answer with units.
- Useful results: fixed perimeter → a square; x + k/x ≥ 2√k; box from a sheet → x = a/6; can → h = 2r.