• Foundation
  • About 16 min
  • 5 practice questions

Greatest and least values, and simple optimisation

Find the greatest and least values of a function on a closed interval by checking stationary points and end points, and solve simple word problems such as the largest rectangle for a fixed perimeter.

If something looks wrong, please tell us.

A local maximum is only the top of one hill. Often we need the highest point overall on a stretch of the graph, or the best possible design: the largest area for a given length of fence, the least material for a given volume. This lesson finds absolute (greatest and least) values on a closed interval, then solves simple optimisation word problems.

The closed interval method

A continuous function on a closed interval [a, b] always has a greatest and a least value. Each of them occurs either at a stationary point inside the interval or at one of the end points. So:

  1. Find the stationary points of f that lie inside (a, b). Ignore any outside the interval.
  2. Work out f at each of them and at both end points a and b.
  3. The largest of these numbers is the absolute maximum; the smallest is the absolute minimum.

No second derivative test is needed here: comparing the values settles it.

Worked example 1

Find the greatest and least values of f(x) = 2x³ − 3x² − 12x + 1 on [−2, 3]. f′(x) = 6x² − 6x − 12 = 6(x − 2)(x + 1), so the stationary points are x = −1 and x = 2, both inside. Values: f(−2) = −16 − 12 + 24 + 1 = −3; f(−1) = −2 − 3 + 12 + 1 = 8; f(2) = 16 − 12 − 24 + 1 = −19; f(3) = 54 − 27 − 36 + 1 = −8. Greatest value 8 (at x = −1), least value −19 (at x = 2).

Worked example 2: the end point wins

f(x) = x² − 4x on [0, 5]. f′(x) = 2x − 4 = 0 at x = 2. Values: f(0) = 0, f(2) = −4, f(5) = 5. The least value is −4 at the stationary point, but the greatest value is 5, at the end point x = 5. Skipping the end points is the most common mistake in these questions.

On [a, b]: evaluate f at the stationary points inside the interval and at a and b. The largest value is the absolute maximum and the smallest is the absolute minimum.

Optimisation word problems

In a word problem you build the function yourself. Name a variable, use the given condition (the constraint) to write the quantity to be made largest or smallest in terms of one variable, differentiate, set the derivative to zero, and confirm with the second derivative.

Worked example 3: rectangle with a fixed perimeter

Of all rectangles with perimeter 40 m, which has the largest area? If one side is x m, the other is (20 − x) m, since two adjacent sides add up to half the perimeter. A = x(20 − x) = 20x − x². A′ = 20 − 2x = 0 gives x = 10, and A″ = −2 < 0 confirms a maximum. Both sides are 10 m: the best rectangle is a square, with area 100 m².

Worked example 4: fencing beside a river

A farmer has 200 m of fencing to make a rectangular plot beside a straight river; no fence is needed along the river. Let x be each side at right angles to the river; the side parallel to the river is then 200 − 2x. A = x(200 − 2x) = 200x − 2x². A′ = 200 − 4x = 0 gives x = 50, and A″ = −4 < 0. The plot is 50 m by 100 m, with area 5000 m². With the river as one side, the best plot is not a square: the side along the river is twice the other.

Key takeaways: for the greatest and least values on [a, b], compare f at the stationary points and at the end points. In word problems, write the quantity in one variable using the constraint, set the derivative to zero, confirm the maximum or minimum, and answer the question actually asked: a length, an area or a value.

Check your understanding

  1. 1. What is the greatest value of f(x) = x² − 2x + 3 on the interval [0, 4]?

    1. 3
    2. 2
    3. 9
    4. 11
    Show answer

    Answer: D. f′(x) = 2x − 2 = 0 at x = 1. Values: f(0) = 3, f(1) = 2, f(4) = 16 − 8 + 3 = 11. The greatest is 11, at the end point x = 4.

  2. 2. What is the least value of f(x) = x³ − 12x on the interval [0, 3]?

    1. −9
    2. −16
    3. 0
    4. 16
    Show answer

    Answer: B. f′(x) = 3x² − 12 = 0 at x = ±2; only x = 2 lies in [0, 3]. Values: f(0) = 0, f(2) = 8 − 24 = −16, f(3) = 27 − 36 = −9. The least is −16.

  3. 3. What is the largest possible area of a rectangle whose perimeter is 36 cm?

    1. 324 cm²
    2. 72 cm²
    3. 81 cm²
    4. 36 cm²
    Show answer

    Answer: C. Sides x and 18 − x, so A = 18x − x². A′ = 18 − 2x = 0 gives x = 9 (A″ = −2 < 0). The best rectangle is a 9 cm square with area 81 cm².

  4. 4. A rectangular garden is built against a long wall, so fencing is needed on only three sides. With 60 m of fencing, what is the largest area it can enclose?

    1. 450 m²
    2. 225 m²
    3. 900 m²
    4. 400 m²
    Show answer

    Answer: A. Let each side at right angles to the wall be x; the side parallel to the wall is 60 − 2x. A = 60x − 2x², A′ = 60 − 4x = 0 gives x = 15 (A″ = −4 < 0). The garden is 15 m by 30 m, area 450 m².

  5. 5. What is the greatest value of f(x) = sin x + cos x on [0, π/2]?

    1. 1
    2. √2
    3. 2
    4. 1/√2
    Show answer

    Answer: B. f′(x) = cos x − sin x = 0 when tan x = 1, so x = π/4. Values: f(0) = 1, f(π/4) = √2/2 + √2/2 = √2, f(π/2) = 1. The greatest is √2.

Privacy · Terms · Refunds · Delivery