Math Bytes · Calculus · Episode 12 · Applications of derivatives
Optimization
To find the biggest or smallest value of something, write it as a function of one variable, take the derivative, and find where the derivative is zero. With 20 m of fence, the area A = x(10 − x) = 10x − x² peaks where A′ = 10 − 2x = 0, at x = 5: a 5 by 5 square of 25 m².
The fence problem
You have 20 m of fence and want to enclose the biggest rectangle. Skinny rectangles hold almost nothing; wide ones do better. Which shape is best?
Call the width x. The four sides add to 20:
x + x + (10 − x) + (10 − x) = 20
so the length is 10 − x. The width can be anything between 0 and 10.
Write the function
Area is width times length:
A = x(10 − x) = 10x − x²
Graph it and you get a hill: the area is 0 when x = 0, rises, then falls back to 0 when x = 10.
Set the derivative to zero
At the top of the hill the graph is flat, so the slope (the derivative) is zero there.
A′ = 10 − 2x
10 − 2x = 0 gives x = 5.
So the width is 5 m and the length is 10 − 5 = 5 m: a square, with area 5 × 5 = 25 m². Check a neighbour: 4 × 6 = 24 m², a little less.
The steps for any optimization problem
- Name the variable and draw a picture.
- Write the function you want to make biggest or smallest, in terms of one variable (use the constraint, like the 20 m of fence, to remove the other one).
- Take the derivative and set it equal to
0. - Check it really is the maximum (or minimum): compare with the endpoints, or check the second derivative.
Try it yourself
- You have
40 mof fence for a rectangle (all four sides). What's the biggest area? - Two positive numbers add to
14. What's the biggest their product can be?
(Answers: 1. Width x, length 20 − x, A = 20x − x², A′ = 20 − 2x = 0 at x = 10: a 10 by 10 square, 100 m². 2. Product P = x(14 − x) = 14x − x², P′ = 14 − 2x = 0 at x = 7: 7 × 7 = 49.)
Good to know
- Check that it's a maximum. Here
0 < x < 10, the area is0at both ends, and the second derivativeA″ = −2is negative (the graph curves down), sox = 5is the top, not the bottom. - "Slope zero at the top" works for a smooth hilltop inside the allowed range. On a closed interval, the best value can also sit at an endpoint, so compare those too. Lesson 13 covers max and min in more detail.
- For a fixed perimeter, the rectangle with the most area is always a square.
Answer to the comment question
12 meters of fence makes three sides of a pen, with a wall as the fourth. What's the biggest area? 18 square meters. Let the two sides that touch the wall be x; the side opposite the wall is 12 − 2x. Area A = x(12 − 2x) = 12x − 2x², so A′ = 12 − 4x = 0 gives x = 3. The long side is 12 − 6 = 6, and the area is 3 × 6 = 18 m².
Test your knowledge
Quick quiz: Optimization
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- OpenStax, "Calculus Volume 1, 4.7 Applied Optimization Problems": the problem-solving strategy and maximizing a fenced rectangular area
- OpenStax, "Calculus Volume 1, 4.3 Maxima and Minima": critical points; extrema on a closed interval at endpoints or critical points
- College Board, "AP Calculus AB and BC Course and Exam Description": Unit 5, Analytical Applications of Differentiation (introduction to and solving optimization problems)
- MIT OpenCourseWare, "18.01 Single Variable Calculus (Fall 2006)": lecture notes on optimization
Video transcript
What's the biggest rectangle you can fence with 20 meters of fence?
Call the width x. The four sides add to 20, so the length is 10 minus x.
Area is x times 10 minus x: 10x minus x squared.
At a hilltop, the graph is flat: slope zero. So find where the derivative is zero.
The derivative is 10 minus 2x. That's zero when x is 5.
Five by five: a square, 25 square meters. Four by six gets only 24.
That's optimization: write a function, then find where its derivative is zero.
Your turn. 12 meters of fence makes three sides of a pen, with a wall as the fourth. What's the biggest area? Comment your answer below!
That's your byte.
More from Calculus
- Calculus EP9Implicit differentiation
- Calculus EP10Related rates
- Calculus EP14Concavity
- Calculus EP15The mean value theorem