Translating a description into an objective function, using a constraint to reduce it to a single variable, determining the physically meaningful domain, and applying the extreme-value machinery — worked through fencing, an open box, a minimal-surface can, a shortest distance and a revenue problem.
Subject: Calculus I · 67 slides · symbolic lesson
Open the interactive version of this deck
Title
Calculus I · Section 4.7
Turning a described situation into one function, and finding its best value
Objectives
Sections 4.3 to 4.5 taught you to find the extreme values of a function you were handed. In the real problems of this section nobody hands you the function: you build it from a description, and then the old machinery finishes the job.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 381-390 — learning objective 4.7.1
So far in this chapter someone has always handed you the function. Find the critical points, test the endpoints, report the largest and smallest values. That skill is finished; you have it.
This section is about the step before that. A farmer, a packaging engineer or a rental company does not come with a formula. They come with a story: a length of fence, a sheet of cardboard, a price and a demand. Your job is to turn the story into one function of one variable on a sensible interval, and only then does the calculus you already know take over.
Expect most of your effort to go into that translation. The derivatives in this lesson are short; the thinking about what to call x, which equation is the constraint, and which values of x make physical sense is where the marks are won and lost.
Warm-up
Discussion prompt
Section 4.3 gave a recipe for the absolute extremes of a continuous function on a closed interval. Use it on f(x) = x³ − 3x over [0, 2]. Where are the absolute maximum and minimum?
Write your answer before you reveal it. This is the tool every problem in the lesson ends with, so it is worth being fluent.
The recipe has three parts. Find the critical points inside the interval, where the derivative is zero or undefined. Evaluate the function there and at both endpoints. The largest of those numbers is the absolute maximum and the smallest is the absolute minimum. Notice that minus one is a critical point of this function but lies outside the interval, so it is simply ignored.
The punchline is the maximum. It sits at the endpoint x equal to 2, where the derivative is 9, nowhere near zero. If you had only solved the derivative equal to zero, you would have missed it. Several problems in this lesson have exactly that feature, so keep the endpoints in your checklist every single time.
Section
Part 1
Concept
Every problem in this section has the same two ingredients. One quantity is to be made as large or as small as possible; another relation must hold no matter what.
objective — The quantity to maximise or minimise: area, volume, time, cost, revenue, distance.
constraint — A condition the variables must satisfy: the fence available, the volume required, the curve a point must lie on.
\[ \text{objective: } A = xy \qquad \text{constraint: } 2x + y = 100 \]
The objective usually has two variables; the constraint is what lets you remove one of them.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 381 — introduction to Example 4.32
Every optimisation story contains two different kinds of information, and your first job is to separate them. The objective is what someone wants to be as big or as small as possible. The constraint is a condition that is not negotiable: the amount of fence you own, the volume the box must hold, the curve a point must sit on.
In the garden problem the objective is the area, x times y, and it has two variables. On its own it has no maximum at all, because you could make both sides as long as you liked. The constraint is what stops that: two sides of length x and one of length y must add up to the 100 feet of fence.
The constraint's job is to let you write one variable in terms of the other, so the objective becomes a function of a single variable. Once you have that, the problem is an ordinary Section 4.3 problem again.
Intuition
With a fixed amount of fence, making the garden deeper uses up fence that could have made it longer. The two factors of the area pull against each other.
\[ A(x) = x\cdot(100 - 2x) \]
The first factor grows with x and the second shrinks. At x equal to 0 the garden has no depth, and at x equal to 50 it has no length: zero area either way. Positive in between and zero at both ends, the area must peak somewhere in the middle.
Before computing anything, it helps to see why a best garden should exist. The area is a product of two lengths, and the fence ties them together: every extra foot of depth costs two feet of length, because depth appears twice in the fence.
So as x grows, the first factor grows and the second shrinks. At one extreme, x equal to 0, the garden is a line along the wall with no area. At the other, x equal to 50, all the fence goes into the two depth sides and there is no length left: no area again. In between the area is positive.
A quantity that is zero at both ends and positive in the middle has to peak somewhere. That peak is what the calculus will locate exactly. This picture of two factors pulling against each other is behind almost every problem in the section.
Picture it
Figure (svg): Three rectangles drawn to scale on a wall, each using 100 feet of fence: 10 by 80 with area 800, 25 by 50 with area 1250 highlighted, and 40 by 20 with area 800.
All three gardens use exactly 100 feet of fence against the wall. The areas differ by more than half, so the choice of shape really matters, and the best one is neither the shallowest nor the deepest.
Look at the three gardens. They are drawn to the same scale and each uses exactly 100 feet of fence along three sides, with the wall supplying the fourth.
The shallow one on the left is 10 feet deep and 80 feet long, area 800 square feet. The deep one on the right is 40 feet deep and only 20 feet long, also 800. The middle one, 25 by 50, encloses 1250 square feet, more than half as much again as either of the others.
Two things to take from the picture. First, shape matters a lot, so the question is worth asking. Second, the areas on either side of the best shape are equal here, which is a hint that the area function is symmetric about its peak, as a downward parabola is.
Prediction
Predict first
A rock wall forms one side; 100 ft of fence forms the other three. Before any calculus: which shape do you expect to enclose the most area?
Correct: Twice as long as it is deep
Why: The wall saves fence on one long side, so the best shape stretches along it: 25 ft deep and 50 ft long, area 1250 square feet. A 33 by 33 square uses 99 ft of fence and encloses only about 1089 square feet. The next slide proves the answer.
Commit to one option before revealing. Many people instinctively answer a square, because squares are the answer to the more famous problem where all four sides are fenced.
The wall changes things. It is a free side, so you want as much of your garden as possible to lean on it. Stretching the garden along the wall makes good use of that free side, while the two depth sides each cost fence. The best balance turns out to be a garden twice as long as it is deep.
If you chose the square, compare numbers: a 33 by 33 square against the wall uses 99 feet of fence and encloses about 1089 square feet, noticeably less than 1250. The next slide proves the answer properly.
Worked example
A rock wall forms one side of a rectangular garden and 100 ft of wire fencing forms the other three. Find the dimensions of largest area, and that area.
Figure (svg): A rectangle drawn above a grey rock wall. The two short sides, each labelled x, and the long top side, labelled y, are drawn as orange fence; the wall side has no fence.
Name the variables and the objective
Why: Let x be the side perpendicular to the wall and y the side parallel to it.
\[ A = x\,y \]
Write the constraint
Why: Two sides of length x and one of length y use all the fence.
\[ 2x + y = 100 \]
Solve the constraint for y
Why: It is linear in y, so this is one subtraction.
\[ y = 100 - 2x \]
Substitute into the objective
Why: Now the area depends on x alone.
\[ A(x) = x(100 - 2x) = 100x - 2x^2 \]
Find the domain, then close it
Why: Both sides must be positive, and y positive forces x below 50. Closing the interval lets the Extreme Value Theorem apply.
\[ 0 < x < 50 \quad\longrightarrow\quad [0, 50] \]
Differentiate and set to zero
Why: The derivative of a quadratic is linear, with one root.
\[ A'(x) = 100 - 4x = 0 \;\Longrightarrow\; x = 25 \]
Compare with the endpoints
Why: The endpoints give degenerate gardens.
\[ A(0) = 0, \quad A(25) = 1250, \quad A(50) = 0 \]
Recover y and state the answer
Why: Use the constraint again.
\[ y = 100 - 2(25) = 50: \quad 25 \text{ ft} \times 50 \text{ ft}, \quad A = 1250 \text{ ft}^2 \]
Figure (svg): The parabola A of x equals 100x minus 2x squared for x from 0 to 50, zero at both ends, with its highest point marked at x equals 25, A equals 1250.
Check the neighbours and the fence
Why: One foot either way loses area, and the answer uses exactly the 100 feet available.
\[ A(24) = A(26) = 1248 < 1250, \qquad 2(25) + 50 = 100 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 381-382 — Example 4.32
Follow the six moves in order, because this is the template for the whole section. Name the variables using the picture, write the objective, write the constraint, eliminate one variable, find the domain, then optimise.
The domain step deserves attention. Both lengths must be positive, and since y equals 100 minus 2x, a positive y forces x below 50. That gives the open interval from 0 to 50. The book then closes it, adding the endpoints, so that the Extreme Value Theorem guarantees a maximum. The endpoints give zero area, so the maximum is inside, at the only critical point, x equal to 25.
Do not stop at x. The question asked for dimensions and the area, so recover y from the constraint and report all three. The check at the end is quick and worth making a habit: nudging x by one foot either way loses two square feet, and the fence adds up to exactly 100.
Worked example
The same garden, but now with 200 ft of fencing.
\[ 2x + y = 200, \qquad A = xy \]
Eliminate y
Why: Solve the constraint and substitute, exactly as before.
\[ A(x) = x(200 - 2x) = 200x - 2x^2, \quad 0 \le x \le 100 \]
Differentiate and set to zero
Why: One linear equation.
\[ A'(x) = 200 - 4x = 0 \;\Longrightarrow\; x = 50 \]
Compare with the endpoints
Why: Both endpoints give zero area.
\[ A(0) = 0, \quad A(50) = 5000, \quad A(100) = 0 \]
Recover y
Why: From the constraint.
\[ y = 200 - 2(50) = 100 \;\Longrightarrow\; 50 \text{ ft} \times 100 \text{ ft}, \quad 5000 \text{ ft}^2 \]
Check against the first garden
Why: Doubling the fence doubles each side, so the area is four times as large, and the shape is again twice as long as deep.
\[ 5000 = 4 \times 1250, \qquad y = 2x \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 382 — Checkpoint 4.31
This is the same problem with 200 feet instead of 100, and the working is line for line the same. The domain becomes 0 to 100, and the critical point moves to x equal to 50.
The check shows something worth noticing. Doubling the fence doubles every length, 50 instead of 25 and 100 instead of 50, and so the area goes up by a factor of four, from 1250 to 5000. Areas scale with the square of lengths.
It also shows that the shape did not change: the best garden is again twice as long as it is deep. When the same shape keeps appearing as the numbers change, that is a sign that the shape is the real answer, and the next slide proves it for any amount of fence.
Intuition
Redo the garden with F feet of fence, keeping F as a letter. The shape rule falls out.
\[ A(x) = x(F - 2x) = Fx - 2x^2 \]
\[ A'(x) = F - 4x = 0 \;\Longrightarrow\; x = \frac{F}{4} \]
\[ y = F - 2\cdot\frac{F}{4} = \frac{F}{2} = 2x \]
Whatever the length of fence, the best garden is twice as long as it is deep. Solving with letters instead of numbers gives you a shape, which is often the real answer to a design question.
Here the fence length is kept as a letter F instead of a number. Everything goes through exactly as before: the area is F times x minus 2x squared, its derivative is F minus 4x, and the critical point is a quarter of F.
Put that back into the constraint and the length y comes out as half of F, which is twice x. So the ratio of length to depth is two, whatever the fence. The numbers 100 and 200 were never the point; the shape is.
Working with letters like this is how designers think. A company making garden kits does not want one answer for each length of fence; it wants a rule, and a rule is what a symbolic solution gives you. You will see the same thing with the open box and the can later in the lesson.
Concept
Steps 1 to 5 are translation, not calculus. Most wrong answers in this section go wrong before the first derivative is taken.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 382-383 — Problem-Solving Strategy: Solving Optimization Problems
This is the book's Problem-Solving Strategy, and it is worth following literally until it becomes automatic. Read the list once, then look back at the garden example and find each step in it.
Notice how little of it is calculus. Steps one to five turn words into a function on an interval; only step six uses derivatives. That is why optimisation problems feel hard at first: the difficulty is in reading and modelling, and the calculus is the easy part.
Two steps are most often skipped. Drawing the figure feels optional but is where the constraint usually comes from, as the fence in the garden and the flaps in the box show. Finding the domain feels like a formality but decides which critical points to keep and which endpoints to test. Skip either and you will eventually get a wrong answer that looks right.
Sorting
Sort into buckets
Sort each phrase from the section's problems: is it the quantity to optimise, or a condition that must hold?
Sort each phrase before you check. A useful clue is the language: words such as largest, least, most and quickest describe something you are trying to push as far as possible, so they mark the objective.
Constraints are stated as facts: the box must hold a certain volume, a certain length of fence is available, the corners lie on a given curve. You do not optimise them. You use them to write one variable in terms of another.
Every problem needs exactly one objective, but it may have several constraints, or none. The open box cut from a sheet has no separate constraint equation at all, because the sheet's size is built directly into the formula for the volume.
Trap
A common wrong start on the garden:
\[ y = 100 - 2x \]
\[ y' = -2 \ne 0 \]
then: no critical point, so no maximum. Wrong.
The constraint is a fixed rule, not the thing being optimised. Substitute it into the objective and differentiate that.
\[ A(x) = 100x - 2x^2 \]
\[ A'(x) = 100 - 4x \]
A quick diagnostic: if the derivative you are setting to zero is a constant, you have differentiated the wrong equation.
The wrong line looks like calculus, which is why it is tempting. With two equations in front of you, it is natural to differentiate one of them. But the constraint is a fixed rule, not the quantity you care about, and its derivative carries no information about where the area is largest.
The diagnostic on the right is the one to remember. When the derivative you are about to set to zero is a constant, such as minus 2, you have almost certainly differentiated the constraint. A constant can never be zero, so you would conclude there is no optimum, which is absurd for a garden.
The fix is the order of operations: substitute the constraint into the objective first, get one function of one variable, and differentiate that.
Section
Part 2
Concept
The area formula accepts any real x, including negative numbers and numbers above 50. The garden does not. Every length must be positive.
\[ x > 0 \quad\text{and}\quad y = 100 - 2x > 0 \;\Longrightarrow\; 0 < x < 50 \]
Figure (svg): Two number lines. Top: the garden's x runs over the open interval from 0 to 50, with the critical point 25 inside. Bottom: the box's cut x runs over 0 to 12, with the critical point 4.71 inside and the other root 15.29 outside, marked in red.
Find the domain before you differentiate. It tells you which critical points to keep and which endpoints to test.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 382-383 — Examples 4.32 and 4.33, step 5
The formula for the area is a polynomial, and a polynomial is happy to accept any real number. Put in x equal to 60 and you get a perfectly good number: minus 1200. But there is no garden with a negative area, and no garden with a negative length y.
Look at the number lines. The green band is the set of values that make physical sense. For the garden it is every x strictly between 0 and 50. For the box it is every cut strictly between 0 and 12, because the 24-inch side loses two cuts and must stay positive.
Finding the band first pays off immediately. The box's derivative has two roots, and one of them, about 15.29, falls outside the band. Because you know the domain, you discard it without evaluating anything.
Concept
On an open interval a continuous function need not have a maximum. On a closed, bounded interval the Extreme Value Theorem guarantees one. So the book adds the endpoints, even though they are not real gardens.
\[ A \text{ continuous on } [0, 50] \;\Longrightarrow\; \text{an absolute maximum exists} \]
\[ A(0) = A(50) = 0 < A(x) \quad \text{for } 0 < x < 50 \]
The endpoints give zero, and every genuine garden gives more, so the maximum is not at an endpoint. It must be at a critical point inside, which is therefore a real garden.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 382 — Example 4.32
There is a subtle point here that the book handles carefully. On an open interval a continuous function need not have a maximum at all. So the book temporarily adds the endpoints, which are not real gardens, just to get the guarantee of the Extreme Value Theorem.
Then it checks what happens at those added points. Both give zero area, while every real garden gives more. So the maximum cannot be at an endpoint, which means it is at a critical point inside, and that point is a genuine garden.
You will use this argument again and again: close the interval, note that the endpoints are worse than the interior, and conclude that the best value is at an interior critical point. When the endpoints are not worse, as with the wire later on, the answer is at an end instead.
Picture it
Figure (svg): Left: a 36 by 24 inch sheet with a small square of side x shaded at each corner and dashed fold lines. Right: the folded open box, with length 36 minus 2x, width 24 minus 2x and height x.
Cut a square of side x from each corner of a 24 by 36 inch sheet and fold up the flaps. The cut becomes the height, and each of the other two dimensions loses two cuts' worth.
Take a moment with the picture before the algebra. The shaded squares are cut away, and the dashed lines are where the flaps fold up. Each flap is exactly as tall as the square that was removed, so the box's height is x.
The long side of 36 inches loses a square at each end, so the base's length is 36 minus 2x. The short side loses two squares as well, leaving 24 minus 2x. Every dimension of the box depends on the one choice of x.
This is why the problem has a best answer. A tiny cut gives a large but very shallow tray. A huge cut gives a tall box with almost no base. Somewhere in between, the volume is largest.
Notation
Annotate
On: \( V(x) = x\,(36 - 2x)(24 - 2x), \qquad 0 < x < 12 \)
Step through each annotation and connect it to the picture on the previous slide. The formula is just height times length times width, but each factor has a story, and knowing the story is how you check that you wrote it correctly.
The factor of 2 in each of the base dimensions is the most common mistake: a square is cut from both ends of each side, not just one. If you wrote 36 minus x, picture the sheet and count the corners on one long edge.
The domain annotation explains why it is the shorter side that matters. The width reaches zero first, at x equal to 12, while the length would last until 18. The box stops existing as soon as either dimension hits zero, so 12 is the limit.
Worked example
An open-top box is made from a 24 in. by 36 in. sheet by cutting a square of side x from each corner and folding up the flaps. Which x gives the largest volume?
Write the volume
Why: Height x, length 36 minus 2x, width 24 minus 2x.
\[ V(x) = x(36 - 2x)(24 - 2x) \]
Expand
Why: Multiply the two binomials, then by x.
\[ V(x) = 4x^3 - 120x^2 + 864x \]
State the domain and close it
Why: The width must stay positive.
\[ 0 < x < 12 \quad\longrightarrow\quad [0, 12] \]
Differentiate
Why: Power rule on each term.
\[ V'(x) = 12x^2 - 240x + 864 \]
Set it to zero and divide by 12
Why: Smaller coefficients, same roots.
\[ x^2 - 20x + 72 = 0 \]
Solve with the quadratic formula
Why: The discriminant is 400 minus 288, which is 112, and the square root of 112 is 4 root 7.
\[ x = \frac{20 \pm \sqrt{112}}{2} = \frac{20 \pm 4\sqrt7}{2} = 10 \pm 2\sqrt7 \]
Keep only the root in the domain
Why: Ten plus two root seven is about 15.29, past 12.
\[ x = 10 - 2\sqrt7 \approx 4.71 \text{ in} \]
Evaluate the volume
Why: The endpoints give zero, so this is the maximum.
\[ V(10 - 2\sqrt7) = 640 + 448\sqrt7 \approx 1825 \text{ in}^3 \]
Figure (svg): The cubic V of x for x from 0 to 16. On the domain 0 to 12, shaded, it rises to a peak of about 1825 at x about 4.71 and falls back to zero; beyond 12, drawn dashed, it dips negative to a trough at x about 15.29.
Check against whole-inch cuts
Why: Cuts of 4 and 5 inches both give a little less, as a maximum near 4.71 predicts.
\[ V(4) = 1792, \quad V(5) = 1820, \quad V(4.71) \approx 1825.3 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 383-384 — Example 4.33
This example follows the strategy step by step. After expanding, the volume is a cubic, so its derivative is a quadratic, and the quadratic formula gives two critical points, 10 plus and minus 2 root 7.
Here is where the domain earns its keep. Ten plus 2 root 7 is about 15.29, beyond 12, so it is thrown away without a second thought. The other root, about 4.71 inches, is inside. Since the volume is zero at both ends of the interval and positive inside, the maximum must be at that critical point.
Look at the graph. The solid part of the curve is the real box; the dashed part beyond 12 is the formula carrying on without any physical meaning, dipping to a negative value at the rejected root. The check compares the answer with whole-inch cuts of 4 and 5: both are a little less, exactly as a peak near 4.71 predicts.
Worked example
The same construction from a 20 in. by 30 in. sheet. Write the volume and its domain; then go one step further and find the best cut.
Write the volume
Why: Height x, and each side loses two cuts.
\[ V(x) = x(30 - 2x)(20 - 2x) = 4x^3 - 100x^2 + 600x \]
State the domain
Why: The 20-inch side runs out at x equal to 10.
\[ 0 < x < 10 \quad\longrightarrow\quad [0, 10] \]
Differentiate and set to zero
Why: Divide the derivative by 4.
\[ V'(x) = 12x^2 - 200x + 600 = 0 \iff 3x^2 - 50x + 150 = 0 \]
Solve
Why: The discriminant is 2500 minus 1800, which is 700.
\[ x = \frac{50 \pm \sqrt{700}}{6} = \frac{25 \pm 5\sqrt7}{3} \approx 3.92 \text{ or } 12.74 \]
Keep the root inside [0, 10] and evaluate
Why: 12.74 is past 10.
\[ x = \frac{25 - 5\sqrt7}{3} \approx 3.92, \quad V \approx 1056.3 \text{ in}^3 \]
Check against whole-inch cuts
Why: Both neighbours give less.
\[ V(3) = 1008, \quad V(5) = 1000 < 1056.3 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 384 — Checkpoint 4.32
The checkpoint asks only for the volume function and its domain, so the first two lines are the answer the book wants. The domain is 0 to 10 this time, because the shorter side is now 20 inches.
The remaining lines go one step further and finish the problem, because it is good practice. After dividing the derivative by 4, the quadratic formula gives about 3.92 and about 12.74. The second is past 10 and is discarded, just as in the example.
The best cut is a little smaller than before, which makes sense: the sheet is smaller, so the optimal flap is shorter too. The check with cuts of 3 and 5 inches confirms that the value in between is larger than both.
Matching
Match the pairs
Why: Each bound comes from a physical fact: the garden’s other side, 100 minus 2x, must be positive; the box’s width, 24 minus 2x, must be positive; the corner must lie inside the ellipse, whose x-intercept is 2; any base works if the box is tall enough; and the wire can go entirely into one shape, so both ends are genuine answers.
For each problem, ask what physical fact limits the variable, then find its partner. Every bound should come with a reason, not just a number.
Three of the domains are open intervals because a length would reach zero at the ends: the garden's other side, the box's width, and the rectangle's height when its corner reaches the ellipse's x-intercept at 2. The open box of fixed volume has no upper limit at all, because any base can be matched with a suitable height.
The wire is different, and worth noticing. Putting all the wire into the square, or all of it into the circle, gives a perfectly real answer, so its endpoints are genuine candidates, not just a device to invoke a theorem. That will matter when you solve it.
Worked example
A rectangle with sides parallel to the axes is inscribed in the ellipse below. Find its dimensions of largest area, and that area.
\[ \frac{x^2}{4} + y^2 = 1 \]
Figure (svg): The ellipse x squared over 4 plus y squared equals 1, with the largest inscribed rectangle shaded, corners at plus or minus root 2 and plus or minus one over root 2; the first-quadrant corner is marked (x, y).
Put one corner on the ellipse
Why: Let (x, y) be the first-quadrant corner; symmetry gives the rest.
\[ L = 2x, \quad W = 2y, \quad A = LW = 4xy \]
Solve the ellipse for y
Why: Take the positive root, since the corner is above the axis.
\[ y = \sqrt{1 - \frac{x^2}{4}} = \frac12\sqrt{4 - x^2} \]
Substitute
Why: The area now depends on x alone.
\[ A(x) = 2x\sqrt{4 - x^2}, \quad 0 \le x \le 2 \]
Differentiate with the product and chain rules
Why: Then put everything over the common denominator.
\[ A'(x) = 2\sqrt{4 - x^2} - \frac{2x^2}{\sqrt{4 - x^2}} = \frac{8 - 4x^2}{\sqrt{4 - x^2}} \]
Set the numerator to zero
Why: Minus root 2 is outside the domain.
\[ 8 - 4x^2 = 0 \;\Longrightarrow\; x = \sqrt2 \]
Find the dimensions
Why: Put x equal to root 2 into y.
\[ y = \frac12\sqrt{4 - 2} = \frac{1}{\sqrt2}, \quad L = 2\sqrt2, \quad W = \sqrt2 \]
Compute the area
Why: Length times width.
\[ A = (2\sqrt2)(\sqrt2) = 4 \]
Check against other corners
Why: The endpoints give zero and nearby corners give less.
\[ A(0) = A(2) = 0, \quad A(1) = 2\sqrt3 \approx 3.46, \quad A(1.5) \approx 3.97 < 4 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 387-388 — Example 4.36
The key idea is in the figure: the whole rectangle is determined by its first-quadrant corner. Once you know that corner, symmetry gives the other three, so the length is 2x and the width is 2y.
The constraint is the ellipse itself, because the corner must lie on it. Solving for y with the positive square root gives the area as 2x times the root of 4 minus x squared. The derivative takes the product rule and the chain rule, and combining the two terms over the common denominator leaves 8 minus 4x squared on top.
Only the numerator can be zero, which happens at root 2 inside the domain. The dimensions come out as 2 root 2 by root 2 and the area as exactly 4. The check compares it with a few other corners: the area at x equal to 1 is about 3.46, and at 1.5 about 3.97, both below 4.
Fill the middle
Redo the setup for the unit circle. Fill in the area function and the right end of the domain.
Fill in the blanks
x^2 + y^2 = 1 \;\Longrightarrow\; A(x) = 4\,x\sqrt1, \quad 0 < x < ___
Why: The area is still 4xy, and now y is the square root of 1 minus x squared, with no factor of one half. The corner's x runs up to the circle's x-intercept, 1. The maximum turns out to be a square, at x equal to one over root 2, with area 2.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 388 — Checkpoint 4.35
Type your answers into the formula before checking. Everything about the setup stays the same as in the ellipse example: the area is still four times x times y, with the corner on the curve.
What changes is the curve. On the unit circle, y is the square root of 1 minus x squared, with no factor of one half this time. That makes the coefficient 4. The corner's x cannot pass the circle's x-intercept, so the domain runs from 0 to 1.
If you finish the problem, the best rectangle is a square with corner at one over root 2, and its area is 2. That is a nice check on the ellipse answer, since squashing a circle into an ellipse should squash the best square into a rectangle.
Error analysis
Annotate
On: \( x = 10 + 2\sqrt7 \approx 15.29 \;\Longrightarrow\; V \approx -545 \text{: the smallest box} \)
Read the argument and look for the mistake before revealing the annotations. The arithmetic is correct: the second root really is about 15.29, and the formula really gives about minus 545 there.
The error is interpretation. A cut of 15.29 inches is impossible on a 24-inch side; the formula has left the domain where it describes a box. A negative volume is the formula's way of telling you that, not a small box.
Notice also that the smallest box was never asked for. On the physical domain the least volume is zero, at the endpoints, where there is no box at all. Whenever a candidate gives a negative length, area or time, treat it as a message to check the domain, not as an answer.
Section
Part 3
Concept
On a closed interval the absolute extremes can only be in two kinds of place: at a critical point inside, or at an end.
\[ \text{candidates: } \quad x = a, \quad x = b, \quad \text{and every } c \text{ in } (a, b) \text{ with } f'(c) = 0 \]
\[ f_{\max} = \text{the largest of } f(a), \; f(c_1), \; \ldots, \; f(b) \]
You evaluate the function at every candidate and compare. No sign chart is needed, and the endpoints are never optional: sometimes the best value is there.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 383 — Problem-Solving Strategy, step 6
This slide collects the rule you have been using into one statement. On a closed interval, an absolute extreme can only occur at an endpoint or at an interior critical point, so the list of candidates is short.
The procedure is then purely mechanical: evaluate the function at every candidate and pick the largest or smallest. You do not need a sign chart or a second derivative when you are on a closed interval, because the comparison does all the work.
The endpoints are not a formality. In the garden and the box they happened to give zero, so they lost. In the next examples an endpoint comes close to winning, and later one actually wins. Always write them into your list of candidates.
Picture it
Figure (svg): A to-scale map: the shoreline along the bottom, the cabin at the left, the island 2 miles offshore above a point 6 miles east of the cabin. An orange path runs x miles along the shore, then a blue path swims straight to the island; a dashed line shows the direct swim from the cabin.
You run x miles along the shore at 8 miles per hour, then swim straight to the island at 3. The swim is the hypotenuse of a right triangle with legs 2 and 6 minus x.
The map is drawn to scale, which makes the trade-off easy to see. The dashed line from the cabin to the island is the direct swim: shortest in distance, but all of it at 3 miles per hour.
The orange path runs along the shore at 8 miles per hour, and the blue path swims the rest. Running further means a shorter swim, but the run itself takes time. The question is where to leave the beach.
The swim is the hypotenuse of a right triangle. One leg is the 2 miles from the shore to the island, and the other is whatever is left of the 6 miles along the shore, 6 minus x. That triangle is the constraint, and Pythagoras turns it into a formula.
Notation
Annotate
On: \( T(x) = \frac{x}{8} + \frac{\sqrt{(6 - x)^2 + 4}}{3}, \quad 0 \le x \le 6 \)
Step through the annotations and tie each piece back to the map. Both terms are distance divided by speed, because time equals distance over rate.
The square root is the swim distance from Pythagoras. It is worth checking at the two ends: at x equal to 0 the swim is the square root of 40, the whole diagonal, and at x equal to 6 it is exactly 2 miles, straight out from the shore.
Both ends of the domain are real routes, unlike the garden, where the endpoints were degenerate. That means an endpoint might genuinely be the answer, and the comparison at the end of the example really matters.
Worked example
An island is 2 mi due north of its closest point on a straight shore. A cabin is 6 mi west of that point. You run at 8 mph and swim at 3 mph. How far should you run to reach the island fastest?
Time is distance over rate
Why: Let x be the distance run and y the distance swum.
\[ T = \frac{x}{8} + \frac{y}{3} \]
Express the swim with Pythagoras
Why: The legs are 2 and 6 minus x.
\[ y^2 = 2^2 + (6 - x)^2 \;\Longrightarrow\; y = \sqrt{(6 - x)^2 + 4} \]
One variable on a closed domain
Why: Both ends are genuine routes.
\[ T(x) = \frac{x}{8} + \frac{\sqrt{(6-x)^2 + 4}}{3}, \quad 0 \le x \le 6 \]
Differentiate
Why: The chain rule brings down a factor of minus 2 times 6 minus x, which cancels the one half.
\[ T'(x) = \frac18 - \frac{6 - x}{3\sqrt{(6 - x)^2 + 4}} \]
Set to zero and clear fractions
Why: This is the book's equation 4.6.
\[ 3\sqrt{(6 - x)^2 + 4} = 8(6 - x) \]
Square both sides
Why: Squaring may add false roots, so each must be checked later.
\[ 9\left[(6 - x)^2 + 4\right] = 64(6 - x)^2 \]
Collect the squares
Why: Nine of them on the left, sixty-four on the right.
\[ 55(6 - x)^2 = 36 \;\Longrightarrow\; 6 - x = \pm\frac{6}{\sqrt{55}} \]
Keep the root in the domain and verify it in equation 4.6
Why: Six plus six over root 55 is about 6.81, outside; the other root satisfies the unsquared equation.
\[ x = 6 - \frac{6}{\sqrt{55}} \approx 5.19: \quad 3(2.157) \approx 6.472 \approx 8(0.809) \]
Compare with the endpoints
Why: Evaluate T at all three candidates.
\[ T(0) \approx 2.108, \quad T(5.19) \approx 1.368, \quad T(6) \approx 1.417 \text{ h} \]
Figure (svg): The travel time T of x for x from 0 to 6: it falls from 2.108 hours at x equals 0 to a minimum of 1.368 hours at x about 5.19, then rises to 1.417 hours at x equals 6.
Check the verdict and read it correctly
Why: The critical value is the smallest of the three, so it is the absolute minimum (the book says local minimum, but the comparison proves more). Run about 5.19 miles, then swim.
\[ 1.368 < 1.417 < 2.108 \;\Longrightarrow\; x \approx 5.19 \text{ mi} \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 384-386 — Example 4.34
The setup is the first three lines, and it follows the map exactly. The calculus starts with the derivative: the chain rule on the square root brings down minus 2 times 6 minus x, and the 2 cancels the one half, leaving a tidy fraction.
Setting the derivative to zero and clearing fractions gives equation 4.6, which has a square root on one side. Squaring removes it, but squaring can also introduce roots that do not satisfy the original equation, so the book is careful to check. Of the two roots, 6 plus 6 over root 55 lies outside the domain, and 6 minus 6 over root 55, about 5.19, does satisfy equation 4.6.
Then compare all three candidates. Swimming straight from the cabin takes about 2.108 hours, running to the nearest point and swimming straight out about 1.417, and the critical point about 1.368. The book calls this a local minimum, but the comparison proves it is the absolute minimum on the whole interval, and that is the claim you should make.
Intuition
Swimming is slow, so you want as little of it as possible; but running all the way wastes the diagonal shortcut. The derivative condition says exactly where the balance lies.
\[ T'(x) = 0 \iff \frac{6 - x}{y} = \frac38 \]
\[ \frac{\text{shore leg of the swim}}{\text{swim}} = \frac{\text{swim speed}}{\text{run speed}} \]
The left side is the cosine of the angle your swim makes with the shore. Light passing from air into water obeys the same rule, Snell's law: a light ray takes the quickest path, just as you do.
It is worth reading the condition the derivative gave, because it is more interesting than the number. At the best point, the shore leg of the swim divided by the swim itself equals three eighths, which is the swimming speed divided by the running speed.
The shore leg over the swim is the cosine of the angle between your swim and the shoreline. So the best route leaves the beach at a fixed angle that depends only on the two speeds, not on how far away the cabin is. If the cabin were farther west, you would simply run further and leave at the same angle.
Light behaves the same way. When a ray passes from air into water, where it travels more slowly, it bends so as to take the path of least time, and the rule it obeys is Snell's law. Your run-then-swim problem is the same optimisation.
Trap
Squaring equation 4.6 gave two roots, so:
\[ x \approx 5.19 \text{ and } x \approx 6.81 \]
are both critical points. Wrong.
Squaring cannot tell a positive side from a negative one, so it can add roots. Put 6.81 back into the unsquared equation:
\[ 3\sqrt{(6-x)^2+4} \approx 6.47 \]
\[ 8(6 - x) \approx -6.47 \]
The signs disagree, so 6.81 is not a critical point at all, besides lying outside the domain. Always verify roots in the equation before squaring.
Squaring both sides is legitimate, but it is not reversible. If two numbers are equal, their squares are equal; but two numbers with equal squares might be negatives of each other. So squaring can create solutions that the original equation never had.
Here the second root, about 6.81, makes the left side of equation 4.6 positive and the right side negative, because 6 minus x is negative there. The two sides have the same size but opposite signs, so the squared equation is satisfied and the original is not. It would be rejected anyway for lying outside the domain, but you should know that it was never a critical point at all.
The rule is short: whenever you square to solve, substitute each candidate back into the equation from before the squaring.
Worked example
The island is 1 mi from shore, the cabin is 15 mi from the nearest shore point, and you swim at 2.5 mph and run at 6 mph. Write the time function, then find the best run.
Write the time
Why: Run x at 6, swim the hypotenuse at 2.5.
\[ T(x) = \frac{x}{6} + \frac{\sqrt{(15 - x)^2 + 1}}{2.5}, \quad 0 \le x \le 15 \]
Going further: set the derivative to zero
Why: The same shape as Example 4.34.
\[ \frac16 = \frac{15 - x}{2.5\sqrt{(15 - x)^2 + 1}} \]
Clear fractions and square
Why: Both sides are positive for x below 15.
\[ 6.25\left[(15 - x)^2 + 1\right] = 36(15 - x)^2 \]
Solve
Why: Collect the squares: 29.75 of them equal 6.25.
\[ (15 - x)^2 = \frac{6.25}{29.75} = \frac{25}{119} \;\Longrightarrow\; x = 15 - \frac{5}{\sqrt{119}} \approx 14.54 \]
Compare with the endpoints
Why: All three candidates.
\[ T(0) \approx 6.013, \quad T(14.54) \approx 2.864, \quad T(15) = 2.9 \text{ h} \]
Check with the speed ratio
Why: At the best point the shore leg over the swim should be the swim speed over the run speed.
\[ \frac{15 - x}{y} \approx \frac{0.4583}{1.1000} \approx 0.4167 = \frac{2.5}{6} \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 386 — Checkpoint 4.33
The checkpoint asks only for the time function, which is the first line. The numbers change but the structure does not: running time is x over 6, and the swim is the hypotenuse of a triangle with legs 15 minus x and 1, divided by 2.5.
The remaining lines finish the problem the same way as the example. After clearing fractions and squaring, the square of 15 minus x comes out as 25 over 119, so you run to within about 0.46 miles of the nearest point before swimming. Both endpoints take longer: swimming almost the whole way takes about 6 hours, and running all the way along the shore takes 2.9.
The check uses the angle rule from the previous slide. The shore leg divided by the swim should equal the swimming speed over the running speed, 2.5 over 6, which is about 0.4167. It does, which confirms the root without redoing the calculus.
Worked example
At a price of p dollars per day, a rental company rents the number of cars below. The owners will charge between 50 and 200 dollars. Which price maximises revenue?
\[ n(p) = 1000 - 5p, \quad 50 \le p \le 200 \]
Revenue is cars times price
Why: Expand the product.
\[ R(p) = (1000 - 5p)\,p = 1000p - 5p^2 \]
Differentiate and set to zero
Why: One linear equation.
\[ R'(p) = 1000 - 10p = 0 \;\Longrightarrow\; p = 100 \]
Evaluate at the critical point
Why: At 100 dollars, 500 cars go out.
\[ R(100) = 500 \times 100 = 50{,}000 \]
Evaluate at the endpoints
Why: At 50 dollars, 750 cars; at 200 dollars, none.
\[ R(50) = 750 \times 50 = 37{,}500, \quad R(200) = 0 \]
Figure (svg): The revenue parabola R of p for prices from 50 to 200 dollars: 37,500 at p equals 50, a peak of 50,000 at p equals 100, and zero at p equals 200.
Check a price on each side
Why: Ten dollars either way earns less.
\[ R(90) = R(110) = 49{,}500 < 50{,}000 \;\Longrightarrow\; p = 100 \text{ dollars} \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 386-387 — Example 4.35
The objective here is revenue, and the model builds in the trade-off. Revenue is the number of cars rented times the price per car. Raise the price and each car earns more, but the linear model says fewer cars go out.
The derivative is linear, so there is one critical point, a price of 100 dollars, which lies inside the owners' range. At that price 500 cars are rented and the revenue is 50,000 dollars a day. The endpoints do worse: 37,500 at 50 dollars and nothing at 200, where no one rents.
The graph shows the balance. On the left of the peak, raising the price gains more from each car than it loses in cars; on the right, the lost customers outweigh the higher price. The check tries 10 dollars either side and gets 49,500 both times, a symmetric drop just as a parabola should give.
Prediction
\[ n(p) = 750 - 5p, \qquad 60 \le p \le 150 \]
Predict first
Revenue is n(p) times p on this interval. Which price maximises it?
Correct: 75 dollars
Why: Revenue is 750p minus 5p squared, whose derivative, 750 minus 10p, is zero at a price of 75, inside the allowed range. Comparing candidates: 27,000 at 60 dollars, 28,125 at 75 and nothing at 150. The best price is 75 dollars. If you picked 100, you reused the previous example's answer without redoing the derivative.
\[ R(60) = 27{,}000, \quad R(75) = 28{,}125, \quad R(150) = 0 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 387 — Checkpoint 4.34
Pick an answer before revealing. The model looks almost the same as the example, which is exactly why it is tempting to reuse the old answer.
Redo the calculation. Revenue is 750 times p minus 5 p squared, whose derivative, 750 minus 10p, is zero at a price of 75 dollars. That lies inside the allowed range of 60 to 150, so it is a genuine candidate.
Then compare with the endpoints, as always: 27,000 at 60 dollars, 28,125 at 75, and nothing at 150. The best price is 75 dollars. When a problem changes a number, the answer usually changes too; never copy an answer across without recomputing.
Worked example
A workshop's weekly revenue from x units is modelled below, but it can make at most 80 units a week. How many should it make?
\[ R(x) = x(200 - x), \quad 0 \le x \le 80 \]
Differentiate
Why: Expand first: 200x minus x squared.
\[ R'(x) = 200 - 2x \]
Solve for a critical point
Why: The only root lies beyond the cap.
\[ R'(x) = 0 \iff x = 100 \notin [0, 80] \]
Only the endpoints remain
Why: No interior candidate, so compare the ends.
\[ R(0) = 0, \quad R(80) = 80 \times 120 = 9600 \]
Figure (svg): The parabola R of x equals x times 200 minus x. The part from 0 to 80 is solid and rising; the part beyond 80 is dashed. The vertex at x equals 100 is a hollow point outside the allowed range; the maximum on the allowed range is at the cap, x equals 80, R equals 9600.
Check with the sign of the derivative
Why: The derivative is positive on the whole interval, so revenue rises all the way to the cap: make 80 units.
\[ R'(x) = 200 - 2x \ge 40 > 0 \quad \text{on } [0, 80] \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 386 — a variant of Example 4.35
This is an example of your own to see the endpoint rule in action. Without the cap, the revenue parabola peaks at 100 units. But the workshop cannot make more than 80, so the vertex is out of reach.
With no critical point inside the interval, the only candidates are the two endpoints, and the cap wins with 9600. The graph makes it obvious: the allowed part of the curve is still climbing when it runs into the cap.
The check with the sign of the derivative explains why. The derivative is at least 40 everywhere on the interval, so revenue rises all the way. In economic language, the constraint binds: the capacity limit, not the market, decides the answer. If someone offers to raise the cap, that is worth money, which is a useful thing to be able to say.
Estimation
Predict first
A 4 ft wire is cut in two: one piece is bent into a square, the other into a circle. To make the total enclosed area as LARGE as possible, how much wire should go into the square?
Correct: None of it
Why: A circle encloses more area than any other shape of the same perimeter, so every inch moved into the square costs area. The largest total, 4 over pi, about 1.273 square feet, comes from making only a circle. The 2.24 ft split is the critical point, and it gives the SMALLEST total, about 0.560.
Make a guess before revealing. Most people guess half and half, or the split where the calculus says the derivative is zero. Both are wrong for this question.
Think about efficiency. Of all shapes with a given perimeter, the circle encloses the most area. So any wire you move from the circle into the square encloses less than it would have in the circle. The largest total comes from not making a square at all.
The split near 2.24 feet in the square is a real critical point, but it is the minimum, not the maximum. The next slide shows all three candidates, and this is one of the clearest examples you will meet of an answer sitting at an endpoint.
Worked example
Cut a 4 ft wire into two pieces; one forms a square of side x, the other a circle of radius r. Find the x that maximises, and the x that minimises, the total area.
Name the pieces
Why: The square uses 4x feet, the circle the rest.
\[ 2\pi r = 4 - 4x \;\Longrightarrow\; r = \frac{2(1 - x)}{\pi} \]
Write the total area
Why: Square plus disc; x may be 0 or 1, since all the wire may go into one shape.
\[ A(x) = x^2 + \pi r^2 = x^2 + \frac{4(1 - x)^2}{\pi}, \quad 0 \le x \le 1 \]
Differentiate
Why: Chain rule on the second term.
\[ A'(x) = 2x - \frac{8(1 - x)}{\pi} \]
Solve for the critical point
Why: Multiply by pi and collect the x terms.
\[ 2\pi x = 8 - 8x \;\Longrightarrow\; x = \frac{4}{\pi + 4} \approx 0.560 \]
Compare all three candidates
Why: Two endpoints and one critical point.
\[ A(0) = \frac{4}{\pi} \approx 1.273, \quad A(0.560) \approx 0.560, \quad A(1) = 1 \]
Figure (svg): The total area A of x for x from 0 to 1, where x is the side of the square: a U-shaped curve starting at 1.273 when all the wire is a circle, dipping to a minimum of about 0.560 at x about 0.560, and rising to 1 when all the wire is a square.
Check which candidate answers which question
Why: The critical point is the minimum; the maximum is the endpoint x equal to 0, all circle. Skipping the endpoints would have given no maximum at all.
\[ \max: x = 0 \;(\text{all circle}), \qquad \min: x = \frac{4}{\pi + 4} \approx 0.560 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 393 — Exercises 335 and 336
The setup has one small trap: the circle's radius has to come from its circumference. The square uses 4x feet, so the circle gets 4 minus 4x feet, which is 2 pi r, and r is 2 times 1 minus x, over pi.
The domain includes both endpoints this time. Putting all the wire into one shape is a real, legal choice, so x equal to 0 and x equal to 1 are genuine candidates, not just a device to invoke the Extreme Value Theorem.
The derivative has one root, 4 over pi plus 4, about 0.560. Now compare all three candidates: the endpoints give 1.273 for all circle and exactly 1 for all square, and the critical point gives about 0.560. So the critical point answers the minimum question, and the maximum is at the endpoint x equal to 0. If you had only solved the derivative equal to zero, you would have reported a minimum as the maximum.
Counterexample
Discussion prompt
Exercise 313 claims: for every continuous nonlinear function, you can find the x that maximises it. Give a counterexample, and name the extra hypothesis that makes a maximum certain.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 390 — Exercises 313 and 314
Write your counterexample before revealing. This is the idea behind Exercises 313 and 314, and it explains a choice the book keeps making.
A continuous function can fail to have a maximum in two ways. It can grow without bound, like x squared on the whole real line. Or it can approach a value that it never reaches, like x on the open interval from 0 to 1, which gets as close to 1 as you like but never equals it.
Both failures are prevented by a closed, bounded interval, which is the hypothesis of the Extreme Value Theorem. That is why the book closes the physical domain before optimising. When the physical domain cannot be closed, as in the next part, you need another argument that the best value exists.
Section
Part 4
Concept
Without a closed, bounded interval the Extreme Value Theorem promises nothing. Some functions still have an absolute extreme, and the ends tell you which.
\[ f(x) = x^2 + 4 \text{ on } (-\infty, \infty): \quad \text{absolute min } 4 \text{ at } x = 0 \]
\[ S(x) \to \infty \text{ as } x \to 0^{+} \text{ and as } x \to \infty \;\Longrightarrow\; S \text{ has an absolute min} \]
A continuous function that is huge at both ends of its interval must come down somewhere in between, and its lowest point is then a critical point.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 388-389 — Solving Optimization Problems when the Interval Is Not Closed or Is Unbounded
Some problems have no natural upper limit. A box of fixed volume can have any positive base width, because the height adjusts to compensate. The domain is then the open, unbounded interval of all positive numbers, and the Extreme Value Theorem says nothing.
You can still find an absolute minimum if you look at what the function does at the ends of the interval. The surface area blows up as the base shrinks toward zero, because the sides become enormously tall, and it blows up as the base grows, because the base itself becomes enormous.
A continuous function that is huge at both ends must dip down somewhere in between, and the lowest point of that dip is where the derivative is zero. So the absolute minimum exists and it is at a critical point. The example of x squared plus 4 on the whole line is the simplest case of the same reasoning.
Concept
A second argument works on any interval: if a continuous function has only one critical point, and that point is a local minimum, it is the absolute minimum.
\[ c \text{ the only critical point}, \quad f''(c) > 0 \;\Longrightarrow\; f(c) \text{ is the absolute min} \]
Why: if some other point were lower, the graph would have to rise out of the valley at c and then come back down to that point, and turning around would create a second critical point. The same holds for a single local maximum.
This is a second tool for open and unbounded intervals, and it is often the quickest. Suppose a continuous function on an interval has only one critical point, and the second derivative says that point is a local minimum.
Could some other point be even lower? If it were, the graph would have to climb out of the valley at the critical point and then come back down to reach that lower point. Coming back down means turning around, and turning around means another critical point. But there is only one. So the local minimum is the absolute minimum.
The same argument works for a single local maximum. In practice, for a function with one critical point, you can use either this test or the look-at-the-ends test; the open box and the can satisfy both.
Notation
Annotate
On: \( S(x) = \frac{864}{x} + x^2, \qquad x > 0 \)
Step through each annotation. The first term comes from the four sides: each side is x by y, and with y equal to 216 over x squared, four of them add up to 864 over x.
The two terms pull in opposite directions, and that is the whole story of the problem. A small base means the sides must be very tall to hold 216 cubic inches, so the side term explodes. A large base makes the base term explode instead.
The last two annotations describe the two ends of the domain. They are the reason a minimum exists at all, and when you write up a solution on an open interval, say this explicitly: the function tends to infinity at both ends, so it has an absolute minimum at a critical point.
Worked example
A box with a square base and an open top must hold 216 cubic inches. Find the dimensions that minimise its surface area, and that area.
Objective: the base plus four sides
Why: Base side x, height y, no top.
\[ S = x^2 + 4xy \]
Constraint: the volume
Why: Solve it for the height.
\[ x^2 y = 216 \;\Longrightarrow\; y = \frac{216}{x^2} \]
Substitute
Why: Four x times 216 over x squared is 864 over x.
\[ S(x) = x^2 + 4x\cdot\frac{216}{x^2} = x^2 + \frac{864}{x} \]
Domain: open and unbounded
Why: Any positive base works, and S blows up at both ends.
\[ x > 0, \quad S(x) \to \infty \text{ as } x \to 0^{+} \text{ or } x \to \infty \]
Differentiate and set to zero
Why: Multiply through by x squared.
\[ S'(x) = 2x - \frac{864}{x^2} = 0 \;\Longrightarrow\; x^3 = 432 \]
Solve
Why: 432 is 216 times 2, and the cube root of 216 is 6.
\[ x = \sqrt[3]{432} = 6\sqrt[3]{2} \approx 7.56 \text{ in} \]
Recover the height
Why: Divide the volume by the base area.
\[ y = \frac{216}{(6\sqrt[3]{2})^2} = 3\sqrt[3]{2} \approx 3.78 \text{ in} \]
Compute the least area
Why: Put the critical point back into S.
\[ S\left(6\sqrt[3]{2}\right) = \frac{864}{6\sqrt[3]{2}} + \left(6\sqrt[3]{2}\right)^2 = 108\sqrt[3]{4} \approx 171.4 \text{ in}^2 \]
Figure (svg): The surface area S of x equals 864 over x plus x squared for x from about 1.4 to 25: very large near zero, falling to a minimum of about 171.4 at x about 7.56, then rising without bound.
Check the minimum and the volume
Why: The second derivative is positive everywhere, and the box really holds 216.
\[ S''(x) = 2 + \frac{1728}{x^3} > 0, \qquad (7.56)^2(3.78) \approx 216 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, pp. 389-390 — Example 4.37
The objective and constraint are exactly as the annotations described. After substituting, the surface area is x squared plus 864 over x on all positive x, with no endpoints to test.
Setting the derivative to zero gives x cubed equal to 432. Since 432 is 216 times 2, and 216 is 6 cubed, the cube root is 6 times the cube root of 2, about 7.56 inches. The height is then 3 times the cube root of 2, about 3.78, and the area simplifies to 108 times the cube root of 4, about 171.4 square inches.
The graph shows why the critical point is the minimum: the curve comes down from very high values on the left, bottoms out, and climbs forever on the right. The check adds the algebraic evidence: the second derivative is positive for every positive x, and the dimensions really do give a volume of 216.
Intuition
Look at the answer: height 3 times the cube root of 2, base 6 times the cube root of 2. Keep the volume as a letter V and the ratio survives.
\[ S(x) = x^2 + \frac{4V}{x}, \qquad S'(x) = 2x - \frac{4V}{x^2} = 0 \;\Longrightarrow\; x^3 = 2V \]
\[ y = \frac{V}{x^2} = \frac{V x}{x^3} = \frac{Vx}{2V} = \frac{x}{2} \]
For every volume, the least-material open box is half as tall as its base is wide. With a lid it would be a cube, as the book remarks; losing the top lets the box grow wider and shorter.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 389 — the remark before Example 4.37
Look at the numbers from the example: the height is exactly half the base. That is not a coincidence. Redo the problem with the volume as a letter and the same relation falls out.
The derivative gives x cubed equal to 2V. Then the height, which is the volume over the base area, simplifies to half of x. So for every volume, the open box that uses least material is half as tall as it is wide.
Compare this with the closed box, which the book says is a cube. Removing the lid means the top no longer costs material, so the box can afford a wider base, and the best shape flattens from a cube to a box half as tall. A symbolic answer like this is often more useful than any single number.
Worked example
The same open box of volume 216 cubic inches, but the base costs 20 cents per square inch and the sides 30. Write the cost in terms of the base side x; then go further and minimise it.
Price each part
Why: One base of area x squared, four sides of area xy each.
\[ C = 20x^2 + 30(4xy) = 20x^2 + 120xy \]
Eliminate y with the volume
Why: y is 216 over x squared.
\[ C(x) = 20x^2 + 120x\cdot\frac{216}{x^2} = 20x^2 + \frac{25{,}920}{x}, \quad x > 0 \]
Going further: differentiate and set to zero
Why: Multiply through by x squared and divide by 40.
\[ C'(x) = 40x - \frac{25{,}920}{x^2} = 0 \;\Longrightarrow\; x^3 = 648 \]
Solve and find the height
Why: 648 is 216 times 3.
\[ x = 6\sqrt[3]{3} \approx 8.65 \text{ in}, \quad y = \frac{216}{x^2} = 2\sqrt[3]{3} \approx 2.88 \text{ in} \]
Compute the least cost
Why: Base term plus side term.
\[ C \approx 1497.7 + 2995.3 \approx 4493 \text{ cents} \approx 44.93 \text{ dollars} \]
Check the neighbours and the shape
Why: Nearby widths cost more, and expensive sides push the box wider and flatter than the 7.56 by 3.78 box.
\[ C(6) = 5040, \quad C(10) = 4592, \quad C(8.65) \approx 4493 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 390 — Checkpoint 4.36
The checkpoint asks for the cost as a function of the base side, which is the second line. Price each part separately: one base at 20 cents per square inch, and four sides at 30 cents. Then eliminate the height using the volume, just as in the example.
The remaining lines finish the problem. The derivative gives x cubed equal to 648, and since 648 is 216 times 3, the base is 6 times the cube root of 3, about 8.65 inches, with height about 2.88. The least cost is about 4493 cents, just under 45 dollars.
Compare the shape with the example. Making the sides more expensive than the base pushes the design wider and flatter, from 7.56 by 3.78 to 8.65 by 2.88, which is exactly what you would expect: use less of the expensive material. The check confirms that widths of 6 and 10 cost more.
Worked example
Find the dimensions of the closed cylinder of volume 16 pi with the least surface area.
\[ V = \pi r^2 h = 16\pi \]
Objective: two discs and the side
Why: The side unrolls into a rectangle of width 2 pi r and height h.
\[ S = 2\pi r^2 + 2\pi r h \]
Eliminate h with the volume
Why: h is 16 over r squared.
\[ S(r) = 2\pi r^2 + 2\pi r\cdot\frac{16}{r^2} = 2\pi r^2 + \frac{32\pi}{r}, \quad r > 0 \]
Differentiate and set to zero
Why: Divide by 4 pi and multiply by r squared.
\[ S'(r) = 4\pi r - \frac{32\pi}{r^2} = 0 \;\Longrightarrow\; r^3 = 8 \]
Solve for r, then h
Why: One real cube root.
\[ r = 2, \quad h = \frac{16}{2^2} = 4 \]
Compute the least area
Why: Two discs plus the side.
\[ S(2) = 8\pi + 16\pi = 24\pi \approx 75.4 \]
Figure (svg): Left: a cylinder of radius 2 and height 4, labelled V equals 16 pi. Right: its surface area S of r equals 2 pi r squared plus 32 pi over r, with the minimum 24 pi, about 75.4, at r equals 2.
Check: one critical point, and S blows up at both ends
Why: So the critical point is the absolute minimum, and nearby radii do worse.
\[ S(1) \approx 106.8, \quad S(3) \approx 90.1, \quad S(2) \approx 75.4 \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 393 — Exercise 345
This is the classic minimal-surface can. The objective is the total surface: two circular ends, each pi r squared, and the side, which unrolls into a rectangle whose width is the circumference.
The volume constraint gives the height as 16 over r squared, and substituting leaves 2 pi r squared plus 32 pi over r. The derivative is zero when r cubed is 8, so the radius is 2 and the height is 4. The least surface is 24 pi, about 75.4.
Look at the picture on the left: the can is exactly as tall as it is wide. The graph on the right shows the same valley shape as the open box, very large for thin cans and for flat ones, with one critical point in between. The check compares a radius of 1 and a radius of 3, both worse.
Tweak it
Parameter explorer
The curve is the surface area of a closed can of volume V against its radius (the horizontal axis is r). Slide V. Where is the lowest point, and at that radius is the height V/(πr²) equal to the diameter?
\[ S(r) = 2\pi r^2 + \frac{2({V})}{r} \]
Start with the volume at 50 and find the lowest point of the curve. Then slide the volume up and watch the valley move to the right and up: a bigger can needs a bigger radius and more material, which is no surprise.
The surprise is in the shape. At each volume, work out the height at the best radius, the volume divided by pi r squared, and compare it with the diameter. They match every time.
The next slide proves that this always happens. The slider is a way to see it first, so that the proof confirms something you already believe.
Concept
Keep the volume as a letter and the can's shape comes out on its own.
\[ S(r) = 2\pi r^2 + \frac{2V}{r}, \qquad S'(r) = 4\pi r - \frac{2V}{r^2} \]
\[ S'(r) = 0 \iff V = 2\pi r^3 \]
\[ h = \frac{V}{\pi r^2} = \frac{2\pi r^3}{\pi r^2} = 2r \]
A 355 cubic centimetre drinks can would be about 3.84 cm in radius and 7.67 cm tall if material were the only cost. Real cans are taller and thinner because rims, seams and hands matter too: the mathematics answers only the question it was asked.
This is the same symbolic trick as for the garden and the open box. Keep the volume as V, differentiate, and the critical point says that V equals 2 pi r cubed. Then the height, V over pi r squared, simplifies to 2r, which is the diameter.
So the least-material closed can is always as tall as it is wide, whatever it holds. For a 355 cubic centimetre drinks can that would mean a radius of about 3.84 centimetres and a height of about 7.67.
Real drinks cans are noticeably taller and thinner than that. That does not mean the calculus is wrong. It means the real objective is not just surface area: the ends are made of thicker metal, the seams and rims cost money, and the can has to fit a hand and a vending machine. The mathematics answered the question it was asked, and asking the right question is part of modelling.
Section
Part 5
Concept
Distances come with square roots, and square roots make derivatives messy. Because the square root is increasing, a distance and its square are smallest at the same point.
\[ D = \sqrt{g(x)}, \qquad D'(x) = \frac{g'(x)}{2\sqrt{g(x)}} \]
\[ D'(x) = 0 \iff g'(x) = 0 \quad (g > 0) \]
Figure (svg): Two curves over x from minus 2.6 to 2.6: the squared distance x to the fourth minus 5x squared plus 9, and the distance itself, its square root. Both dip to their lowest values at the same two x values, plus and minus 1.581, marked by dashed lines.
So optimise the square, find the point, and take the square root only at the very end, when you report the distance.
Distances bring square roots, and derivatives of square roots are messy. This slide gives you permission to avoid them. The square root function is increasing, so whenever one point is closer than another, its squared distance is smaller too. The distance and its square put every point in the same order.
The derivative formula makes the same point algebraically: the derivative of the distance is the derivative of the square divided by something positive, so the two derivatives are zero at exactly the same x.
The graph shows both curves for the parabola problem coming next. They have different heights, but their low points sit at exactly the same x values. So minimise the square, which is a polynomial here, find the point, and take the square root only at the end when you report the distance.
Worked example
Where is the parabola closest to the point Q = (0, 3)?
\[ y = x^2, \qquad Q = (0, 3) \]
Square the distance from (x, x²) to Q
Why: The distance formula without its square root.
\[ D^2 = (x - 0)^2 + (x^2 - 3)^2 \]
Expand
Why: x squared plus x to the fourth minus 6x squared plus 9.
\[ D^2 = x^4 - 5x^2 + 9 \]
Differentiate and factor
Why: Take out 2x.
\[ \frac{d}{dx}\left(D^2\right) = 4x^3 - 10x = 2x(2x^2 - 5) \]
Find the critical points
Why: The domain is every real x, and the square blows up at both ends.
\[ x = 0 \quad\text{or}\quad x = \pm\sqrt{5/2} \approx \pm 1.581 \]
Compare the values
Why: At the outer pair, x squared is five halves.
\[ D^2(0) = 9, \quad D^2\left(\pm\sqrt{5/2}\right) = \tfrac{25}{4} - \tfrac{25}{2} + 9 = \tfrac{11}{4} \]
Take the square root at the end
Why: Report both the points and the distance.
\[ D_{\min} = \frac{\sqrt{11}}{2} \approx 1.658 \text{ at } \left(\pm\sqrt{5/2},\, \tfrac52\right) \]
Figure (svg): The parabola y equals x squared and the point (0, 3) above its vertex. Segments join (0, 3) to the two nearest points, at x equals plus and minus root 2.5, height 2.5. A dashed circle of radius 1.658 centred at (0, 3) touches the parabola at exactly those two points.
Check the geometry
Why: At a nearest point the segment to Q is perpendicular to the tangent: the slopes multiply to minus one.
\[ m_{\text{tan}} = 2\sqrt{5/2} = \sqrt{10}, \quad m_{QP} = \frac{2.5 - 3}{\sqrt{5/2}} = -\frac{1}{\sqrt{10}} \]
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 393 — Exercise 350
Any point on the parabola has the form x, x squared, so the squared distance to the point 0, 3 is a function of x alone. The curve itself is the constraint, built into the point's coordinates.
Expanding gives a polynomial whose derivative factors neatly as 2x times 2x squared minus 5. There are three critical points: 0, and plus or minus root five halves. The domain is every real x, and the squared distance grows without bound at both ends, so the smallest of the critical values is the absolute minimum. At zero the squared distance is 9, and at the outer pair it is eleven quarters.
The figure shows the geometry. The dashed circle around the point 0, 3 with radius about 1.658 just touches the parabola at the two nearest points. The check uses that: at a point of tangency the radius is perpendicular to the curve, so the slope of the segment times the slope of the tangent should be minus one, and it is.
Trap
The factor 2x gives the easiest root, so:
\[ x = 0 \;\Longrightarrow\; (0, 0) \]
is reported as the nearest point, at distance 3. Wrong.
x equal to 0 is a local maximum of the distance: the vertex sits straight below Q but farther away than the sides. Compare every critical value.
\[ D^2(0) = 9 \]
\[ D^2(\pm 1.581) = 2.75 \]
The nearest points are the outer pair, at distance about 1.658.
The factor 2x makes x equal to 0 the easiest critical point to spot, and the vertex looks like an obvious place for the nearest point, directly below. Both instincts are wrong here.
The squared distance at x equal to 0 is 9, a distance of 3, while at the outer pair it is 2.75, a distance of about 1.658. So the vertex is a local maximum of the distance among nearby points: moving sideways from the vertex along the parabola actually brings you closer to the point above.
The lesson is general. A critical point can be a maximum, a minimum or neither, and on an unbounded domain there can be several. List all of them, evaluate the objective at each, and compare, exactly as you would with endpoints on a closed interval.
Error analysis
Annotate
On: \( D^2 \text{ least at } x = \sqrt{5/2} \;\Longrightarrow\; \text{distance} = \tfrac{11}{4} \)
Read the argument and decide what is wrong before revealing. The shortcut itself is fine: minimising the square of the distance gives the same point as minimising the distance.
The mistake is in the last step. Eleven quarters is the value of the squared distance, not the distance. The distance is the square root of eleven, over 2, about 1.658. Reporting the square is one of the most common ways to lose a mark on a distance problem.
There is a second, quieter error. The question asked where the parabola is closest, so the answer is a pair of points, not a number. Always reread the question at the end and check that what you are reporting is what it asked for.
Step zero
Discussion prompt
Exercise 322: poles 10 ft and 20 ft tall stand 30 ft apart. A wire runs from the top of one down to a ground anchor and up to the top of the other. Before differentiating anything, name the variable, write the objective, and give the domain.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 391 — Exercise 322
Write down the variable, objective and domain before revealing. This slide is about the translation steps only; resist the urge to start differentiating.
A natural variable is the anchor's distance from the shorter pole. The wire is then two hypotenuses: one with legs x and 10, and one with legs 30 minus x and 20. The domain is from 0 to 30, and both ends are real placements, at the foot of each pole.
Notice that there is no separate constraint equation this time. The fixed distance between the poles is built into the second hypotenuse. If you do go on to differentiate, you will find the calculus messy; the next slide shows a picture that avoids it completely.
Real world
Figure (svg): Two poles on level ground 30 feet apart, 10 and 20 feet tall. A wire runs from the short pole's top down to an anchor at x equals 10 and up to the tall pole's top. A dashed mirror image of the short pole below the ground, and a dashed line from its top to the anchor, show the wire's first leg reflected into one straight line.
Discussion prompt
Reflect the short pole's top in the ground. Explain why the shortest wire runs to the point where the straight line from the reflected top to the tall pole's top meets the ground, and find that point and the length.
Look at the dashed mirror image of the short pole below the ground. The first leg of the wire, from the short pole's top to the anchor, has exactly the same length as the dashed segment from the mirror image's top to the anchor. So every possible wire has the same length as a path from the mirror image's top to the tall pole's top.
The shortest path between two points is a straight line, so the best anchor is where that straight line crosses the ground. Similar triangles put it at 10 feet from the short pole, and the wire is 30 root 2, about 42.43 feet. You can check it against the calculus: placing the anchor at either foot gives a longer wire.
A light ray reflecting off a mirror follows this same shortest path, which is why the angle of incidence equals the angle of reflection. Optimisation problems often have a geometric shortcut like this, and spotting one is a pleasure.
Comparison
Comparison matrix
| problem | one-variable objective | domain | best value of the variable |
|---|---|---|---|
| garden, 100 ft fence | A = 100x − 2x² | (0, 50) | 25 |
| box, 24 × 36 sheet | V = x(36 − 2x)(24 − 2x) | (0, 12) | 10 − 2√7 ≈ 4.71 |
| car rental | R = 1000p − 5p² | [50, 200] | 100 |
| open box, 216 in³ | S = x² + 864/x | (0, ∞) | 6∛2 ≈ 7.56 |
| closed can, 16π | S = 2πr² + 32π/r | (0, ∞) | 2 |
Fill in each blank before checking. Every row is a problem from this lesson, and the columns follow the strategy: the one-variable objective, the domain, and the value of the variable that answers it.
Two rows have open, unbounded domains, and those are the ones where the argument for a minimum has to come from the ends or from a single critical point, not from the Extreme Value Theorem. The rental problem is the only one with a closed domain whose endpoints are real prices.
If any blank caused trouble, go back to that example and look again at the step that produces it. The domain blanks in particular are worth being able to write without hesitation.
Concept
The critical point is rarely the final answer. Go back to the question and report what it asked for, in its units.
| the question asked for | report |
|---|---|
| the dimensions and the area (Example 4.32) | 25 ft by 50 ft, and 1250 square feet |
| the size of the cut (Example 4.33) | x ≈ 4.71 in, giving about 1825 cubic inches |
| how far to run (Example 4.34) | about 5.19 mi, then swim; 1.368 h in all |
| the price (Example 4.35) | 100 dollars per day, for 50,000 dollars of revenue |
| where the curve is closest (Exercise 350) | the points (±√2.5, 2.5), at distance about 1.658 |
Then sanity-check it: positive lengths, the constraint satisfied, and an answer that makes sense in the story.
The table lists what each problem in the lesson actually asked for, and what a full answer looks like. In nearly every case the value of x is only part of it: a dimension leads to an area, a cut to a volume, a distance run to a total time, a price to a revenue.
Units matter too. The garden's area is in square feet, the box's volume in cubic inches, the time in hours. An answer without units is incomplete in any applied problem.
Finish every problem with a quick sanity check against the story. Are all the lengths positive? Does the answer satisfy the constraint? Is it a sensible size? A box whose cut is bigger than its sheet or a garden that uses more fence than you own is a sign that something went wrong earlier.
Section
Part 6
Pattern
Figure (svg): A flow diagram: from the words, write the objective and the constraint; eliminate a variable to get one function; find the physical domain; then branch. A closed interval leads to comparing critical points with endpoints; an open or unbounded interval leads to checking the ends and the single critical point. Both branches end at answering the question asked, in units.
This is the whole lesson as one procedure. The diagram shows the flow: the first three boxes are translation, from words to a function of one variable on a domain, and only then does the method branch according to the kind of domain.
On a closed interval, compare the function at every critical point and at both ends, and remember that the answer may be an end, as with the wire and the production cap. On an open or unbounded interval, justify that an extreme exists, either because the function blows up at both ends or because there is a single critical point that is a local extreme.
The notes under the first boxes are the two habits that save the most marks: discard candidates outside the domain before evaluating them, and replace a distance by its square when square roots get in the way.
Ranking
Put in order
Order the steps of a complete solution to an optimisation problem.
Why: The domain comes before the derivative, because it decides which critical points survive and which endpoints to test. The calculus is only step five; the answer must return to the story.
Drag the steps into order before checking. The only step people usually misplace is the domain, which belongs before the calculus, not after.
Finding the domain first means you already know which critical points to keep and which endpoints to test when you reach the comparison step. It also tells you which kind of argument you need: a comparison of candidates for a closed interval, or a behaviour-at-the-ends argument for an open one.
The last step returns to the story. A number is not an answer until it has been translated back into what the question asked for, with units.
Check
Check your understanding
A rectangular pen must enclose 1600 ft² (Exercise 321). Which dimensions use the least fence?
Answer: A
Why: With sides x and 1600/x the perimeter is P(x) = 2x + 3200/x on x > 0. P′(x) = 2 − 3200/x² is zero at x = 40, and P blows up at both ends, so the square is best: 160 ft of fence.
This is the reversed garden: now the area is fixed and the fence is the objective. With sides x and 1600 over x, the perimeter is 2x plus 3200 over x on all positive x.
The derivative is zero at x equal to 40, and the perimeter blows up at both ends, so the square is the absolute minimum, needing 160 feet. The other rectangles all enclose the right area but need more fence.
The last option is the reverse of the truth. A long thin pen needs more fence, not less. What has no answer is the opposite problem: the largest fence for a fixed area, since a thin enough rectangle has as large a perimeter as you like.
Check
Check your understanding
Where is the line y = 5 − 2x closest to the origin (Exercise 347)?
Answer: A
Why: Minimise the square of the distance: D² = x² + (5 − 2x)² = 5x² − 20x + 25, whose derivative 10x − 20 is zero at x = 2. Then y = 1, and the distance is √5 ≈ 2.236. The segment from the origin to (2, 1) has slope 1/2, perpendicular to the line's slope −2.
Use the lesson's shortcut: minimise the square of the distance. For a point on the line, the squared distance to the origin is x squared plus 5 minus 2x, squared, which expands to 5x squared minus 20x plus 25.
Its derivative, 10x minus 20, is zero at x equal to 2, so the nearest point is 2, 1, at distance root 5. The two intercepts are on the line too, but farther away.
A geometric check is always available for lines: the segment from the origin to the nearest point must be perpendicular to the line. The segment to 2, 1 has slope one half, the line has slope minus 2, and their product is minus one.
Check
Check your understanding
Why may you minimise D² instead of the distance D?
Answer: A
Why: For non-negative numbers, a smaller D always means a smaller D², and the reverse. So the two functions rank every point the same way and share their minimisers. The values differ: you must take a square root at the end.
The question is about the reason, not the calculation. Squaring is an increasing function on non-negative numbers, so it keeps every comparison between distances the same way round. Whichever point is nearest by distance is nearest by squared distance.
The most tempting wrong option says the minimum values are equal. They are not: the least squared distance in the parabola problem was eleven quarters, while the least distance was about 1.658. Only the location of the minimum is shared, which is exactly why you take the square root at the end.
Explain it to yourself
Discussion prompt
Exercise 312 asks: why do you need to check the endpoints in an optimisation problem? Answer in two or three sentences, using one example from this lesson.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 390 — Exercise 312
Write your answer before revealing. Being able to explain this in your own words is what stops you from forgetting the endpoints under exam pressure.
The core idea is that setting the derivative equal to zero only finds the places where the graph is flat. The best value on a closed interval can be at an end, where the graph may still be rising or falling steeply. The wire problem is the sharpest example from this lesson: its one flat point is the minimum, and the maximum is at an end.
A good answer also says why this happens in practice. Real limits, such as a production cap or a fixed amount of material, often cut a function off while it is still improving, and then the limit itself is the answer.
Exit ticket
Exercise 316: from a 2 m by 4 m sheet, cut equal squares of side x from the corners and fold up an open box.
Discussion prompt
Write the volume, state its domain, and find the dimensions of the largest box.
OpenStax Calculus Volume 1, §4.7 Applied Optimization Problems §4.7, p. 391 — Exercise 316
This brings the whole lesson together on a fresh problem. Write the volume, give the domain with its reason, find the critical points, keep the right one, and report the dimensions.
The shorter side is 2 metres, so the cut must be less than 1. The derivative's roots are 1 plus and minus one over root 3; the plus root is past 1 and is discarded. The best cut is about 0.423 metres, giving a box about 0.423 by 1.155 by 3.155 metres, with volume 8 root 3 over 9, about 1.540 cubic metres.
Did you close the domain and note that the volume is zero at both ends? That one sentence is what turns the critical point into a guaranteed maximum.
Recap
| step | what to remember |
|---|---|
| objective and constraint | optimise the objective; the constraint only eliminates a variable, never differentiate it alone |
| domain | from the physics; discard candidates outside it |
| closed interval | compare f at critical points and both endpoints; the best can be an endpoint |
| open or unbounded | ends blow up, or a single critical point that is a local extreme |
| simplify | minimise D² instead of D; square roots only at the end |
| interpret | answer what was asked, with units; shapes (h = 2r, y = 2x) are answers too |
\[ \text{words} \;\to\; f(x) \text{ on a domain} \;\to\; \text{candidates} \;\to\; \text{compare} \;\to\; \text{answer} \]
Next, Section 4.8 uses derivatives in a completely different way: to evaluate limits that come out as zero over zero.
Stewart, Calculus: Early Transcendentals 8e, §4.7 Optimization Problems §4.7, pp. 330-344 — the same material in Stewart
Every optimisation problem in this section has the same skeleton. Translate the story into an objective and a constraint, use the constraint to reach a single variable, find the physical domain, and then optimise with the tools of Sections 4.3 to 4.5.
The details that decide the answer are in the table. Discard candidates outside the domain. On a closed interval, compare critical points with endpoints, because the answer can be an end. On an open or unbounded interval, justify that a best value exists. Minimise a square instead of a distance when it helps, and always report what the question asked, in its units.
Several problems gave shapes rather than numbers: the garden twice as long as deep, the open box half as tall as wide, the can as tall as it is wide. Solving with letters is how you find those rules. Next, Section 4.8 puts derivatives to a very different use, evaluating limits of the form zero over zero.
Want this taught 1-on-1? Alexander tutors Calculus I — $55/session, free consultation.