M5.4.5 Chapter 5

Biggest and smallest

What is the biggest box I can fold from one square sheet of card?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Find the largest open box you can fold from a square sheet
  • Find the shortest fence for a pen of fixed area

Many real problems ask you to optimise, which means to find the best value: the biggest volume, the least cost, the shortest fence. A turning point is exactly the best value of a quantity that rises and then falls, or falls and then rises. This chapter turns word problems into a function of one variable, and then uses the method of the last chapter.

The method has the same steps every time. One: draw the situation and name the quantity you want to make biggest or smallest. Two: write that quantity using one variable only. Three: state the values the variable is allowed to take. Four: differentiate, set the derivative to 0 and solve. Five: reject any answer that is not allowed. Six: show that the answer is a maximum or a minimum. Seven: answer the question, with units.

Draw it first

From a flat sheet to an open box

  1. A flat square sheet, then the open box it folds into, drawn at the same scale. Step 1 shows the square sheet of side 30 cm with a square of side x cut from each corner, hatched, and the middle labelled 30 − 2x. Step 2 adds the open box below it, with height x and a square base of side 30 − 2x.xxxx30 − 2x30 cm

    1 Start with a square sheet of side 30 cm. Cut a square of side x from each corner. The hatched squares are thrown away.

  2. A flat square sheet, then the open box it folds into, drawn at the same scale. Step 1 shows the square sheet of side 30 cm with a square of side x cut from each corner, hatched, and the middle labelled 30 − 2x. Step 2 adds the open box below it, with height x and a square base of side 30 − 2x.xxxx30 − 2x30 cmx30 − 2x30 − 2x

    2 Fold up the four sides. The box has height x and a square base of side 30 − 2x.

The volume is base area times height. The base is a square of side 30 − 2x, so its area is (30 − 2x)². The height is x. So V = x(30 − 2x)². The variable x cannot be 0 or less, since you must cut something. It must also be less than 15, since two cuts of 15 cm would use up the whole 30 cm side and leave a base of side 0. So the allowed values are 0 < x < 15. These allowed values are called the domain.

A table with the heads x (cm) and V (cm³). The rows read 1 and 784, 2 and 1352, 3 and 1728, 4 and 1936, 5 and 2000, 6 and 1944, 7 and 1792, 8 and 1568, 10 and 1000.x (cm)V (cm³)178421352317284193652000619447179281568101000
The volume V = x(30 − 2x)² for some cuts. It rises to a peak near x = 5 and then falls.

Worked example

A square sheet of side 30 cm has squares of side x cut from its corners, and is folded into an open box. Find x for the greatest volume, and that volume.

  1. The base has side 30 − 2x and the height is x. The volume is V = x(30 − 2x)².
  2. Expand: (30 − 2x)² = 900 − 120x + 4x². So V = 900x − 120x² + 4x³, with 0 < x < 15.
  3. Differentiate: dV/dx = 900 − 240x + 12x².
  4. Set dV/dx = 0. Divide by 12: x² − 20x + 75 = 0.
  5. Factorise: (x − 5)(x − 15) = 0, so x = 5 or x = 15.
  6. x = 15 is not allowed, because the base would have side 0. So x = 5.
  7. The second derivative is 24x − 240. At x = 5 it is 24 × 5 − 240 = −120, which is negative, so it is a maximum.
  8. The greatest volume is V = 5 × (30 − 10)² = 5 × 400 = 2000 cm³.

Answer: Cut squares of side 5 cm. The greatest volume is 2000 cm³.

A graph of the volume V in cm³ against the cut x in cm, with the x axis x (cm) and the y axis volume (cm³). The curve rises from 0 at x = 0 to a peak and then falls to 0 at x = 15. The peak is a dot named maximum at x = 5 and V = 2000.maximum510154008001 2001 6002 0002 4000x (cm)volume (cm³)
The volume is 0 at x = 0 and at x = 15. It peaks at x = 5 with V = 2000 cm³. The root x = 15 of dV/dx = 0 is the other end, where the volume is 0.

See it three ways

With things

Cut a square of paper, 20 cm each side, and make boxes with different corner cuts. A small cut makes a low, wide box. A big cut makes a tall box with a small base. Compare how much rice each holds.

As a picture

An open box, drawn in three dimensions. Its height is labelled x and the side of its square base is labelled 20 − 2x along the front and along the depth.x20 − 2x20 − 2x

In words

The volume is base area times height, and it depends on the size of the corner cut. There is one best cut.

In symbols

V = x(20 − 2x)². dV/dx = 0 gives x = 10/3 and a volume of about 592.6 cm³.

The second problem is a fence. A farmer wants a rectangular pen of area 200 m². One side is a long wall and needs no fence. The other three sides are fenced. What size of pen needs the least fence? The area is fixed, and a fixed condition like this is a constraint. It will let you write the length of one side using the other.

A rectangular pen with a hatched wall along the top. The two sides that meet the wall are each labelled x. The side opposite the wall is labelled y. The area inside is labelled 200 m².wallxxy200 m²
The fence goes along three sides: two sides of length x and one side of length y. The wall needs none.

Worked example

A pen of area 200 m² has a wall along one side. Find the dimensions that use the least fence, and the length of that fence.

  1. Let the sides that meet the wall have length x metres, and the side parallel to the wall have length y metres.
  2. The fence length is L = 2x + y. This has two variables. The area gives xy = 200, so y = 200/x.
  3. So L = 2x + 200/x = 2x + 200x⁻¹, with x > 0.
  4. Differentiate: dL/dx = 2 − 200x⁻² = 2 − 200/x².
  5. Set dL/dx = 0: 2 = 200/x², so x² = 100 and x = 10 (the other root, −10, is not allowed).
  6. Then y = 200 ÷ 10 = 20.
  7. The second derivative is 400/x³. At x = 10 it is 0.4, which is positive, so L has a minimum.
  8. The least fence is L = 2 × 10 + 20 = 40 m.

Answer: The pen is 10 m by 20 m, and the least fence is 40 m.

A graph of the fence length L in metres against x in metres, with the x axis x (m) and the y axis fence (m). The curve falls steeply, reaches a lowest point and then rises slowly. The lowest point is a dot named minimum at x = 10 and L = 40.minimum1020204060801000x (m)fence (m)
A narrow pen needs a long y, and a wide pen needs a long x. The least fence, 40 m, is at x = 10.

Worked example

Two numbers add up to 20. What is the greatest value of their product?

  1. Let the numbers be x and 20 − x. The product is P = x(20 − x) = 20x − x².
  2. Differentiate: dP/dx = 20 − 2x. Set it to 0: x = 10.
  3. The second derivative is −2, which is negative, so it is a maximum.
  4. The product is P = 10 × 10 = 100.

Answer: The greatest product is 100.

Try it

Fold boxes from a paper square

You need: a square of paper or card 20 cm by 20 cm, scissors, a ruler, tape.

  1. Cut four squares of side 2 cm from the corners of the sheet. Fold up the sides and tape the corners. Measure the base side and the height.
  2. Work out the volume with V = x(20 − 2x)². Do the same for a cut of 3 cm, and 4 cm, using new sheets.
  3. Check the volumes with a table. Look for the cut that gives the largest box.
  4. Compare your result with 3.3 cm, which is close to the exact answer 10 ÷ 3 cm.

What you will see: The volume rises and then falls as the cut grows. The best whole number cut is 3 cm, and the best cut overall is a little above it, 3.33 cm.

If you cannot try it, this is what happens.
A table with the heads x (cm) and V (cm³). The rows read 1 and 324, 2 and 512, 3 and 588, 4 and 576, 5 and 500.x (cm)V (cm³)13242512358845765500

A wrong idea many people have

A table of whole number cuts shows the best cut exactly: for the 20 cm sheet it is 3 cm.

Why it feels right: The table shows the biggest volume at 3 cm, 588 cm³, and each side of it is smaller. So 3 cm looks like the top of the hill.

The test that breaks it: Try 3.3 cm. The volume is 3.3 × (20 − 6.6)² = 3.3 × 13.4² = 592.5 cm³. That is bigger than 588 cm³.

What is true: A table of whole numbers only shows the region of the best value. Calculus finds it exactly. Here dV/dx = 0 gives x = 10 ÷ 3, about 3.33 cm, with V = 592.6 cm³.

A wrong idea many people have

Every solution of dV/dx = 0 is a possible answer. For the box, both x = 5 and x = 15 are good.

Why it feels right: Solving dV/dx = 0 gives two values of x, and each is a stationary point. It seems that both belong in the answer.

The test that breaks it: Put x = 15 in the box. The base has side 30 − 30 = 0 and the height is 15. The volume is 0, which is the smallest value, not the largest.

What is true: Always check each solution against the allowed values, here 0 < x < 15, and against the question. A solution outside the range, or one that gives a minimum, is rejected. Then say why.

A wrong idea many people have

For the pen, L = 2x + y, so dL/dx = 2. The fence has no turning point and there is no least value.

Why it feels right: You differentiate the formula you have written, and the derivative of 2x is 2. The y looks like a constant.

The test that breaks it: The area is fixed, so when x is large y must be small, and when x is small y must be large. The side y is not a constant. It depends on x, through xy = 200.

What is true: Use the fixed area to write y in terms of x first: y = 200/x. Then L = 2x + 200/x depends on x only, and dL/dx = 2 − 200/x². Always remove the second variable before you differentiate.

Key words

optimise
to find the greatest or the least value of a quantity.
constraint
a fixed condition that links the variables, such as the area xy = 200. It lets you write one variable using the other.
domain
the values of x that make sense in the problem, such as 0 < x < 15.
local maximum
the highest point in its own neighbourhood. A cubic can go higher elsewhere.

Back to your guess

The answer is C: A square sheet 30 cm by 30 cm has a square cut from each corner, and the sides fold up. The box holds the most when each cut square has sides of 5 cm.

The best cut is 5 cm, which gives a box of 2000 cm³. With 2 cm squares the box holds 1352 cm³, and with 10 cm squares it holds only 1000 cm³. A small cut makes a wide, shallow box. A big cut makes a tall, narrow one. The best is between, and calculus finds it exactly.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. For the open box made from a 30 cm sheet, V = x(30 − 2x)². Which values of x make sense?

    Tap your answer.
    1. Yes, that is right. The cut must be positive, and the base side 30 − 2x must be positive. So x > 0 and x < 15.

    2. Not this one. A cut of 20 cm from both ends would use up more than the 30 cm side. The base side 30 − 2x must be above 0, so x < 15. Read this page again. Try another.

    3. Not this one. A large x makes 30 − 2x negative, which is not a length. The base side must be above 0, so x < 15. Read this page again. Try another.

    4. Not this one. You may have divided 30 by 3. The only limits are that the cut is positive and that 30 − 2x is positive, so x < 15. Read this page again. Try another.

    See the answer

    0 < x < 15

    The cut must be positive, and the base side 30 − 2x must be positive. So x > 0 and x < 15.

    • If you chose B: A cut of 20 cm from both ends would use up more than the 30 cm side. The base side 30 − 2x must be above 0, so x < 15. Read this page again.
    • If you chose C: A large x makes 30 − 2x negative, which is not a length. The base side must be above 0, so x < 15. Read this page again.
    • If you chose D: You may have divided 30 by 3. The only limits are that the cut is positive and that 30 − 2x is positive, so x < 15. Read this page again.
  2. Solving dV/dx = 0 for the box gives x = 5 and x = 15. Which is rejected, and why?

    Tap your answer.
    1. Not this one. At x = 5 the second derivative is negative, so it is a maximum. That is the answer. Read this page again. Try another.

    2. Yes, that is right. At x = 15, 30 − 2x = 0, so there is no box and the volume is 0.

    3. Not this one. At x = 15 the box has no base and no volume. A solution must be checked against the allowed values. Read this page again. Try another.

    See the answer

    x = 15, because the base would have side 0.

    At x = 15, 30 − 2x = 0, so there is no box and the volume is 0.

    • If you chose A: At x = 5 the second derivative is negative, so it is a maximum. That is the answer. Read this page again.
    • If you chose C: At x = 15 the box has no base and no volume. A solution must be checked against the allowed values. Read this page again.
  3. The fence round a pen of area 200 m² against a wall is L = 2x + 200/x. What is dL/dx?

    Tap your answer.
    1. Not this one. The derivative of 200x⁻¹ is −200x⁻². The sign is negative because the power −1 comes down in front. Go to M5.4.2. Try another.

    2. Not this one. The power must go down by 1: x⁻¹ becomes x⁻², so the denominator is x². Go to M5.4.2. Try another.

    3. Not this one. The derivative of 2x is 2, not 2x. The power 1 comes down and the new power is 0. Go to M5.4.2. Try another.

    4. Yes, that is right. Write L = 2x + 200x⁻¹. The derivative of 2x is 2, and the derivative of 200x⁻¹ is −200x⁻² = −200/x².

    See the answer

    2 − 200/x²

    Write L = 2x + 200x⁻¹. The derivative of 2x is 2, and the derivative of 200x⁻¹ is −200x⁻² = −200/x².

    • If you chose A: The derivative of 200x⁻¹ is −200x⁻². The sign is negative because the power −1 comes down in front. Go to M5.4.2.
    • If you chose B: The power must go down by 1: x⁻¹ becomes x⁻², so the denominator is x². Go to M5.4.2.
    • If you chose C: The derivative of 2x is 2, not 2x. The power 1 comes down and the new power is 0. Go to M5.4.2.
  4. From an earlier chapter

    The second derivative at a turning point is −6. What kind of point is it?

    Tap your answer.
    1. Not this one. A minimum has a positive second derivative. This one is negative. Go to M5.4.4. Try another.

    2. Not this one. An inflection needs a second derivative of 0, and then the sign of the gradient does not change. Go to M5.4.4. Try another.

    3. Yes, that is right. A negative second derivative means the gradient is falling, so the curve bends like a cap. A stationary point on it is a maximum.

    See the answer

    A maximum

    A negative second derivative means the gradient is falling, so the curve bends like a cap. A stationary point on it is a maximum.

    • If you chose A: A minimum has a positive second derivative. This one is negative. Go to M5.4.4.
    • If you chose B: An inflection needs a second derivative of 0, and then the sign of the gradient does not change. Go to M5.4.4.
  5. Why do we check a solution of dV/dx = 0 after we find it?

    Tap your answer.
    1. Yes, that is right. The conditions dV/dx = 0 only find where the tangent is flat. You still need to check the domain and the type of point.

    2. Not this one. Slips in algebra do happen, but the main reason is different: a stationary point can be outside the domain or be the wrong type. Read this page again. Try another.

    3. Not this one. The solutions of dV/dx = 0 can include a minimum, or a value outside the domain, such as x = 15 for the box. Read this page again. Try another.

    See the answer

    The solution may be outside the allowed values, or may be a minimum, not a maximum.

    The conditions dV/dx = 0 only find where the tangent is flat. You still need to check the domain and the type of point.

    • If you chose B: Slips in algebra do happen, but the main reason is different: a stationary point can be outside the domain or be the wrong type. Read this page again.
    • If you chose C: The solutions of dV/dx = 0 can include a minimum, or a value outside the domain, such as x = 15 for the box. Read this page again.
  6. The pen of area 200 m² has x = 10 m. How long is y, the side parallel to the wall, in metres?

    Tap your answer.
    1. Not this one. That is x. The area is x times y, so y = 200 ÷ 10. Read this page again. Try another.

    2. Not this one. You divided by 40. Use xy = 200 with x = 10. Read this page again. Try another.

    3. Not this one. That is the length of the fence in metres, not the side y. Read this page again. Try another.

    4. Yes, that is right. The area is xy = 200. With x = 10, y = 200 ÷ 10 = 20 m.

    See the answer

    20

    The area is xy = 200. With x = 10, y = 200 ÷ 10 = 20 m.

  7. What is the greatest volume of an open box made from a square sheet of side 24 cm, in cm³?

    See the answer

    1024

    dV/dx = (24 − 2x)(24 − 6x) = 0 gives x = 4, since x = 12 leaves no base. The second derivative 24x − 192 is −96 at x = 4, so it is a maximum. Then V = 4 × (24 − 8)² = 4 × 256 = 1024 cm³.

  8. A pen of area 128 m² has a wall along one side. What is the least length of fence, in metres?

    See the answer

    32

    L = 2x + 128/x and dL/dx = 2 − 128/x² = 0 gives x = 8. The second derivative 256/x³ is 0.5 at x = 8, so it is a minimum. Then y = 128 ÷ 8 = 16, and L = 2 × 8 + 16 = 32 m.

  9. A rectangle has area 100 m². There is no wall, so all four sides count. What is the least perimeter, in metres?

    See the answer

    40

    With sides x and 100/x, the perimeter is P = 2x + 200/x. This is the same function as before, and it is least at x = 10. The rectangle is a 10 m by 10 m square, and P = 40 m.

  10. For the box from a 30 cm sheet, V = 900x − 120x² + 4x³. Find dV/dx.

    See the answer

    900 − 240x + 12x²

    900x gives 900. −120x² gives −240x. 4x³ gives 12x². So dV/dx = 900 − 240x + 12x².

Keep it

Copy this into your exercise book.

Optimise: one variable, allowed values, differentiate, set to 0, reject what is not allowed, test max or min, answer with units. Box from 30 cm sheet: x = 5, V = 2000.

Draw: A square sheet with corner squares marked x, beside the open box it folds into, with V = x(30 − 2x)².

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (925 KB). It opens on any phone.