This deck walks through the full applied-optimization workflow: name the objective and the constraint, reduce to one variable, state the realistic domain, find the critical points, and justify the maximum or minimum. The worked classics include fences, a cut-corner box, a minimum-metal can, a poster with margins, closest points, revenue and profit, and a least-cost pipeline. It targets the four errors that cost the most points: differentiating the constraint, leaving two variables in, ignoring the physical domain, and never justifying the answer.
Subject: Calculus I · 135 slides · symbolic lesson
Open the interactive version of this deck · Homework for this lesson
Title
Calculus I - Deck 16
One picture, one objective, one variable, one honest maximum.
Objectives
By the end of this deck you can:
Warm-up
Discussion prompt
Before we open Applied Optimization: without looking back, what was the main idea of Concavity, Inflection Points, and Curve Sketching, and what could you do by the end of it that you could not do before?
Hint: One sentence for the idea, one for the skill. If the second one is blank, that is the part to revisit.
Answer:
That deck explains what the second derivative measures and distinguishes concave up from concave down. It covers inflection points and the sign change they require, the Second Derivative Test and its inconclusive case, and first- and second-derivative sign charts, then works the full curve-sketching checklist end to end on a polynomial, a rational function, and an exponential. It targets the classic errors: calling every zero of the second derivative an inflection point, confusing decreasing with concave down, treating an inconclusive test as proof that there is no extremum, and reading features of a function off the graph of its derivative.
Section
Part 1
Concept
Optimization asks one question: among all the shapes, prices, or paths that are actually allowed, which one makes some quantity as large or as small as possible?
You already own the tool. A maximum or minimum of a smooth function happens where the derivative is zero or undefined, or at an endpoint. The hard part of an applied problem is not the calculus - it is building the function.
So the work splits in two: translate the words into a function of one variable, then run the max-min machinery you learned in the last deck.
Counterexample
Discussion prompt
Optimization asks one question: among all the shapes, prices, or paths that are actually allowed, which one makes some quantity as large or as small as possible?
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Picture it
Animation
Shows: What an optimization problem asks — a rendered Manim animation.
Rendered with Manim.
Takeaway: Identify both before writing anything down.
Picture it
Animation
Shows: Prove it is the maximum, do not assume — a rendered Manim animation.
Rendered with Manim.
Takeaway: Finding a critical point is not the same as finding the answer.
Picture it
Figure (svg): A smooth hill-shaped curve with a dot at the top and a dashed horizontal tangent line through it
Discussion prompt
Read the picture before the words. What is this showing, and what is the one thing it is built to make obvious? Commit to an answer, then read on.
Hint: Name the parts, then say what changes between them — and if nothing changes, say what is being held still.
Answer:
Walk up one side of a hill and down the other. On the way up you are climbing, on the way down you are descending, and for one instant at the summit you are walking on level ground.
Intuition
Figure (svg): A smooth hill-shaped curve with a dot at the top and a dashed horizontal tangent line through it
Walk up one side of a hill and down the other. On the way up you are climbing, on the way down you are descending, and for one instant at the summit you are walking on level ground.
That level instant is the derivative being zero. Every optimization problem is the hunt for that instant - after you have written down what the hill actually is.
Analogy
Discussion prompt
Explain Walking over a hill by analogy to something with no Calculus I in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
Walk up one side of a hill and down the other. On the way up you are climbing, on the way down you are descending, and for one instant at the summit you are walking on level ground.
Concept
objective function — The quantity the problem wants to make biggest or smallest, written as an equation. This is the function you differentiate.
Find it by reading the verb. Words like maximize the area, minimize the cost, use the least metal, find the closest point all name the objective.
For a rectangular pen of width and length, the area is the objective:
\[ A = xy \]
Explain it
Discussion prompt
Explain The objective function to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
Find it by reading the verb. Words like maximize the area, minimize the cost, use the least metal, find the closest point all name the objective.
Concept
constraint — The restriction the problem imposes - a fixed amount of fence, a fixed volume, a required printed area. It is an equation you substitute, never the equation you differentiate.
Find it by reading the fixed number. You have 100 meters of fence. The can must hold one liter. The printed area must be 384 square centimeters.
For a rectangular pen with 100 meters of fence on all four sides, the constraint is:
\[ 2x + 2y = 100 \]
Definition probe
Sort into buckets
Every line below is part of the definition of objective function or of constraint — one or the other, never both. Put each where it belongs.
Intuition
Why is there anything to optimize at all? Because the constraint forces a trade. Fence you spend on width is fence you cannot spend on length.
A long skinny pen has plenty of length but almost no width, so it encloses almost nothing. A pen that is all width and no length encloses nothing either. Somewhere between those two bad extremes there is a best deal.
| width (m) | length (m) | area (sq m) |
|---|---|---|
| 5 | 45 | 225 |
| 15 | 35 | 525 |
| 25 | 25 | 625 |
| 35 | 15 | 525 |
| 45 | 5 | 225 |
The table already whispers the answer. Calculus is how you prove it and how you handle problems where no table is obvious.
Pattern
Step through it
Step through The constraint is the trade one row at a time. What is driving the change, and what would the row after the last one be?
Picture it
Animation
Shows: The constraint is the trade — a rendered Manim animation.
Rendered with Manim.
Takeaway: The constraint is what turns two variables into one.
Picture it
Animation
Shows: The four-step optimization procedure, with the endpoint check highlighted.
Step four is the one that gets skipped.
Takeaway: Write the quantity, use the constraint to reduce to one variable, state the domain, then check critical points AND endpoints. Endpoints win more often than expected.
Concept
You cannot differentiate a two-variable objective in this course. The constraint is what rescues you: solve it for one letter and substitute.
\[ 2x + 2y = 100 \;\Longrightarrow\; y = 50 - x \]
\[ A = xy = x(50 - x) = 50x - x^2 \]
Now the objective is a single-variable function. Everything you know about derivatives applies again.
Step zero
Discussion prompt
Warm-up: the best rectangle with 100 m of fence — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Objective: the area
Answer:
Worked example
A rectangular pen is fenced on all four sides with 100 meters of fence. What dimensions give the largest area?
Objective: the area
Why: The problem says largest area, so area is what we maximize.
\[ A = xy \]
Constraint: all 100 meters get used
Why: Any leftover fence could be added to a side and would only make the pen bigger, so the best pen uses it all.
\[ 2x + 2y = 100 \]
Solve the constraint and substitute
Why: Replacing the length turns a two-variable area into a one-variable function of the width.
\[ y = 50 - x \quad\Longrightarrow\quad A(x) = 50x - x^2 \]
State the domain
Why: A width cannot be negative, and it cannot exceed 50 or the length would go negative.
\[ 0 \le x \le 50 \]
Differentiate and solve
Why: A smooth maximum on the inside of an interval happens where the slope is zero.
\[ A'(x) = 50 - 2x = 0 \quad\Longrightarrow\quad x = 25 \]
Justify it is a maximum
Why: The second derivative is negative everywhere, so the graph is concave down and the critical point is the top.
\[ A''(x) = -2 < 0 \]
Answer in context
Why: The pen is 25 meters by 25 meters - a square - and it encloses 625 square meters.
\[ x = 25 \text{ m}, \quad y = 25 \text{ m}, \quad A = 625 \text{ m}^2 \]
Verify by comparing neighbors and the endpoints
Why: Nudging one meter each way loses area, and both endpoints give nothing, so 625 square meters really is the maximum.
| x (m) | y (m) | A (sq m) |
|---|---|---|
| 0 | 50 | 0 |
| 24 | 26 | 624 |
| 25 | 25 | 625 |
| 26 | 24 | 624 |
| 50 | 0 | 0 |
Concept
Every applied variable has a range of values that make physical sense. Writing that range down is not busywork - it is how you throw out impossible critical points and how you know whether to check endpoints.
Ask two questions: how small can this quantity get before the object stops existing, and how large can it get before some other piece goes negative?
| problem | variable | realistic domain |
|---|---|---|
| 100 m of fence, four sides | width x | from 0 to 50 meters |
| 12 in square, corners cut x | cut x | from 0 to 6 inches |
| can of fixed volume | radius r | greater than 0, no upper bound |
Picture it
Animation
Shows: State the domain, then respect it — a rendered Manim animation.
Rendered with Manim.
Takeaway: Outside zero to twelve the model stops meaning anything, whatever the algebra says.
Intuition
Think of the domain as a catalog. Each allowed value of the variable is one object you could really build: one pen, one can, one box.
Optimization is choosing the best item in that catalog. If a number is not in the catalog - a negative width, a cut so deep the cardboard disappears - it cannot be the answer no matter how nicely it solves the equation.
Concept
Finding a critical point is only half the job. A grader wants to see why it is the max or the min. You have three legitimate tools.
One extra fact does a lot of work: if the domain is an open interval and there is exactly one critical point, and the derivative changes sign there, that point is the absolute max or min on the whole interval.
Ranking
Put in order
These are the steps of The master optimization procedure, scrambled. Put them back in order before the next slide shows you.
Why: This is the order the recipe itself gives. Recalling the sequence without the slide in front of you is the difference between recognising the method and being able to run it — most of what goes wrong in practice is a step done out of turn.
Pattern
Every problem in this deck follows the same eight steps. Write them on your formula sheet.
Steps 2 and 3 are where nearly all the lost points live. Get the objective and the constraint on paper before you touch a derivative.
Elimination
Eliminate the wrong options
Which equation is the objective function - the one you differentiate?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: The objective is the quantity being made as large as possible, which is the area. The perimeter equation is the constraint: its only job is to let you replace the length with 120 minus the width so the area becomes a function of one variable.
Check
A farmer will enclose a rectangular pen on all four sides with 240 feet of fence and wants the largest possible area. Let the width and length be two variables.
Check your understanding
Which equation is the objective function - the one you differentiate?
Answer: A
Why: The objective is the quantity being made as large as possible, which is the area. The perimeter equation is the constraint: its only job is to let you replace the length with 120 minus the width so the area becomes a function of one variable.
Section
Part 2
Picture it
Figure (svg): A rectangular pen with three fenced sides drawn as a bold path and the fourth side lying along a heavy line labelled river
Discussion prompt
Read the picture before the words. What is this showing, and what is the one thing it is built to make obvious? Commit to an answer, then read on.
Hint: Name the parts, then say what changes between them — and if nothing changes, say what is being held still.
Answer:
When a barn, a wall, or a river makes one side free, the objective does not change - the area is still width times length. Only the constraint changes, because you build fewer sides.
Concept
Figure (svg): A rectangular pen with three fenced sides drawn as a bold path and the fourth side lying along a heavy line labelled river
When a barn, a wall, or a river makes one side free, the objective does not change - the area is still width times length. Only the constraint changes, because you build fewer sides.
Two sides of length x and one of length y are fenced, so:
\[ 2x + y = 400 \]
This is the single most common variation on the exam. Count the sides in the picture before you write the constraint.
Picture it
Animation
Shows: A wall changes the constraint, not the method — a rendered Manim animation.
Rendered with Manim.
Takeaway: Only the algebra of the constraint moves.
Picture it
Animation
Shows: An area function rising to a single maximum then falling.
Constraint substituted in, one peak remains.
Takeaway: Once the constraint is substituted in, the problem collapses to finding one maximum of one function on a stated interval.
Estimation
Predict first
A rancher has 400 feet of fence and wants a rectangular pen along a straight river. The river side needs no fence. What is the largest area, and what are its dimensions?
Commit before you compute: what does Largest pen with 400 feet of fence along a river come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify by nudging the answer both ways
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Ten feet narrower and ten feet wider both lose exactly 200 square feet, which is what a genuine peak looks like.
Worked example
A rancher has 400 feet of fence and wants a rectangular pen along a straight river. The river side needs no fence. What is the largest area, and what are its dimensions?
Label the picture
Why: Two equal sides run away from the river; one side runs parallel to it. Naming them now prevents a wrong constraint later.
\[ x = \text{side perpendicular to the river}, \qquad y = \text{side parallel to it} \]
Objective: the area
Why: The question asks for the largest area, so the area equation is what we will differentiate.
\[ A = xy \]
Constraint: three sides use 400 feet
Why: Two sides of length x plus one of length y is all the fence there is.
\[ 2x + y = 400 \]
Substitute to get one variable
Why: Solving the constraint for y and putting it into the area removes the second letter.
\[ y = 400 - 2x \quad\Longrightarrow\quad A(x) = x(400 - 2x) = 400x - 2x^2 \]
State the domain
Why: The perpendicular side cannot be negative, and if it exceeds 200 feet there is no fence left for the parallel side.
\[ 0 \le x \le 200 \]
Differentiate and find the critical point
Why: The area is a smooth parabola, so its top is where the slope vanishes.
\[ A'(x) = 400 - 4x = 0 \quad\Longrightarrow\quad x = 100 \]
Justify with the closed-interval method
Why: The domain is closed and bounded and the area is continuous, so comparing the critical point against both endpoints settles it completely.
| x (ft) | y (ft) | A (sq ft) |
|---|---|---|
| 0 | 400 | 0 |
| 100 | 200 | 20000 |
| 200 | 0 | 0 |
Answer in context
Why: The pen measures 100 feet out from the river and 200 feet along it, enclosing twenty thousand square feet.
\[ x = 100\ \text{ft}, \quad y = 200\ \text{ft}, \quad A_{\max} = 20000\ \text{ft}^2 \]
Verify by nudging the answer both ways
Why: Ten feet narrower and ten feet wider both lose exactly 200 square feet, which is what a genuine peak looks like.
| x (ft) | y (ft) | A (sq ft) |
|---|---|---|
| 90 | 220 | 19800 |
| 100 | 200 | 20000 |
| 110 | 180 | 19800 |
Picture it
Animation
Shows: Each line of the worked example "Largest pen with 400 feet of fence along a river", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Ten feet narrower and ten feet wider both lose exactly 200 square feet, which is what a genuine peak looks like.
Anomaly
Predict first
A student writes this, and it looks reasonable:
The fence equation is the one with the given number in it, so differentiate that one.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: Treating the fence total as the function to optimize.
Differentiate the area. The fence equation is only a tool for removing a variable.
Why: Treating the fence total as the function to optimize.
Trap
The fence equation is the one with the given number in it, so differentiate that one.
\[ 2x + y = 400 \]
Differentiate the fence equation with respect to x
Why: Treating the fence total as the function to optimize.
\[ \frac{d}{dx}\left[2x + y\right] = 2 + \frac{dy}{dx} \]
Set it to zero and get a slope, not a pen
Why: This says only that y falls twice as fast as x rises - which is true for every allowed pen, big or small.
\[ 2 + \frac{dy}{dx} = 0 \;\Longrightarrow\; \frac{dy}{dx} = -2 \]
The result carries no information about area at all. The fence total is locked at 400 feet for every candidate pen, so it has no maximum to find.
Differentiate the area. The fence equation is only a tool for removing a variable.
\[ A(x) = x(400 - 2x) = 400x - 2x^2 \]
Differentiate the objective with respect to x
Why: The area is the quantity that actually changes from pen to pen, so it is the quantity with a peak.
\[ A'(x) = 400 - 4x \]
Set it to zero and get a real dimension
Why: One hundred feet is an actual pen, and the area there is twenty thousand square feet.
\[ 400 - 4x = 0 \;\Longrightarrow\; x = 100, \quad A = 20000\ \text{ft}^2 \]
Rule of thumb: the equation containing the fixed given number is the constraint. You substitute it. You never differentiate it.
Notation
Annotate
From Trap: differentiating the constraint — read this one piece at a time. What is each part doing?
On: \( \frac{d}{dx}\left[2x + y\right] = 2 + \frac{dy}{dx} \)
Concept
A good answer teaches you something about the shape, not just a number. In the river problem the fenced side parallel to the river came out at 200 feet - exactly half of all the fence.
That is the general result for a three-sided pen with a fixed amount of fence:
\[ x = \frac{P}{4}, \qquad y = \frac{P}{2}, \qquad A_{\max} = \frac{P^2}{8} \]
Check it against our numbers: four hundred squared divided by eight is twenty thousand. Matching a formula against a number you already trust is free error-checking.
Notice the four-sided answer was a square and the three-sided answer is a double-width rectangle. The shape of the best pen depends on the constraint, which is exactly why you must read the picture.
Missing information
Discussion prompt
A rectangle sits with its base on the horizontal axis and its two upper corners on the curve below. Find the dimensions of the largest such rectangle.
What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.
Hint: Anything you would have to invent to get started is a thing the problem must supply.
Answer:
The curve is symmetric about the vertical axis, so the best rectangle is too. Let the right corner sit at a positive x; then the width is twice that and the height is the curve value there.
Worked example
A rectangle sits with its base on the horizontal axis and its two upper corners on the curve below. Find the dimensions of the largest such rectangle.
\[ y = 9 - x^2 \]
Label using the symmetry
Why: The curve is symmetric about the vertical axis, so the best rectangle is too. Let the right corner sit at a positive x; then the width is twice that and the height is the curve value there.
\[ \text{width} = 2x, \qquad \text{height} = 9 - x^2 \]
Objective: the area, already in one variable
Why: Here the curve itself plays the role of the constraint - it ties the height to the width for free.
\[ A(x) = 2x\left(9 - x^2\right) = 18x - 2x^3 \]
State the domain
Why: The corner must lie on the part of the curve above the axis, and the curve meets the axis at three.
\[ 0 \le x \le 3 \]
Differentiate and solve
Why: Setting the slope of the area to zero finds the flat spot.
\[ A'(x) = 18 - 6x^2 = 0 \;\Longrightarrow\; x^2 = 3 \;\Longrightarrow\; x = \sqrt{3} \]
Discard the negative root
Why: The other solution is the negative square root of three, which would make the width negative. It is not in the domain.
\[ x = -\sqrt{3} \notin [0, 3] \]
Justify with the Second Derivative Test
Why: The second derivative is negative at a positive x, so the curve is concave down there and the critical point is a maximum.
\[ A''(x) = -12x, \qquad A''\!\left(\sqrt{3}\right) = -12\sqrt{3} < 0 \]
Answer in context
Why: The rectangle is about 3.46 units wide and exactly 6 units tall, with area twelve root three, about 20.78 square units.
\[ \text{width} = 2\sqrt{3} \approx 3.46, \quad \text{height} = 6, \quad A_{\max} = 12\sqrt{3} \approx 20.78 \]
Verify against nearby rectangles
Why: Both neighbors fall short of twelve root three, so the critical point really is the peak.
| x | width | height | area |
|---|---|---|---|
| 1.7 | 3.40 | 6.11 | 20.774 |
| 1.732 | 3.464 | 6.000 | 20.785 |
| 1.8 | 3.60 | 5.76 | 20.736 |
Picture it
Animation
Shows: Each line of the worked example "Largest rectangle under a parabola", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Both neighbors fall short of twelve root three, so the critical point really is the peak.
Anomaly
Predict first
A student writes this, and it looks reasonable:
The derivative gave two solutions, so report both as candidates and take whichever looks bigger.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: Substituting the negative square root of three into the area formula.
Write the realistic domain first, then throw out any root that is not in it.
Why: Substituting the negative square root of three into the area formula.
Trap
The derivative gave two solutions, so report both as candidates and take whichever looks bigger.
\[ A'(x) = 18 - 6x^2 = 0 \;\Longrightarrow\; x = \pm\sqrt{3} \]
Test the negative root as if it were a real rectangle
Why: Substituting the negative square root of three into the area formula.
\[ A\!\left(-\sqrt{3}\right) = 18\left(-\sqrt{3}\right) - 2\left(-\sqrt{3}\right)^3 = -12\sqrt{3} \approx -20.78 \]
Report a rectangle of negative width
Why: The width would be about negative 3.46 units and the area about negative 20.78 square units. No such rectangle exists.
Write the realistic domain first, then throw out any root that is not in it.
\[ 0 \le x \le 3 \]
Keep only the root inside the domain
Why: A width must be positive and the upper corner must stay above the axis, so only the positive root survives.
\[ x = \sqrt{3} \in [0,3], \qquad x = -\sqrt{3} \notin [0,3] \]
Report a rectangle you could actually cut out
Why: Width twice root three, height six, area twelve root three - all positive, all buildable.
\[ A_{\max} = 12\sqrt{3} \approx 20.78 \]
A negative length, a negative price, or a can with negative radius is always a signal that you skipped the domain step.
Translation
\( x = \sqrt{3} \in [0,3], \qquad x = -\sqrt{3} \notin [0,3] \)
Draw it
Translate both ways. First write the expression above as a sentence with no symbols in it at all. Then cover it, and write your sentence back as notation. If the two versions disagree, the disagreement is the thing to fix.
Prediction
Predict first
What is the largest possible area of the garden?
Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.
Correct: 450 square feet
Why: The constraint is twice the perpendicular side plus the parallel side equals 60, so the area is x times the quantity 60 minus 2x. Its derivative, 60 minus 4x, is zero at x equals 15, giving a parallel side of 30 and an area of 15 times 30, which is 450 square feet.
Check
A rectangular garden is fenced on three sides; a barn wall forms the fourth. You have 60 feet of fence and want the largest area you can get.
Check your understanding
What is the largest possible area of the garden?
Answer: A
Why: The constraint is twice the perpendicular side plus the parallel side equals 60, so the area is x times the quantity 60 minus 2x. Its derivative, 60 minus 4x, is zero at x equals 15, giving a parallel side of 30 and an area of 15 times 30, which is 450 square feet.
Section
Part 3
Picture it
Figure (svg): A large square sheet with a small dashed square marked at each of the four corners
Discussion prompt
Read the picture before the words. What is this showing, and what is the one thing it is built to make obvious? Commit to an answer, then read on.
Hint: Name the parts, then say what changes between them — and if nothing changes, say what is being held still.
Answer:
Cut a small square of side x from each corner of a flat sheet, fold the four flaps up, and tape them. You get an open-topped box whose height is exactly the size of the cut.
Concept
Figure (svg): A large square sheet with a small dashed square marked at each of the four corners
Cut a small square of side x from each corner of a flat sheet, fold the four flaps up, and tape them. You get an open-topped box whose height is exactly the size of the cut.
Each side of the base loses one cut at each end, so the base side is the sheet side minus two cuts:
\[ \text{height} = x, \qquad \text{base side} = 12 - 2x \]
This problem needs no separate constraint equation. The geometry of the folding already writes the volume in one variable for you.
Intuition
Push the cut to either extreme and the box disappears. A microscopic cut gives a wide tray with essentially no height. A cut of nearly half the sheet gives a tall tower with essentially no floor.
| cut x (in) | base side (in) | volume (cu in) |
|---|---|---|
| 0.5 | 11 | 60.5 |
| 1 | 10 | 100 |
| 2 | 8 | 128 |
| 3 | 6 | 108 |
| 5 | 2 | 20 |
Volume climbs, peaks, and falls. Somewhere in the middle is the cut that trades height against floor area most profitably - and the derivative will name it exactly.
Pattern
Step through it
Step through Too shallow, too deep, or just right one row at a time. What is driving the change, and what would the row after the last one be?
Step zero
Discussion prompt
Largest open box from a 12-inch square sheet — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Objective: the volume
Answer:
Worked example
Squares of side x are cut from the corners of a 12-inch by 12-inch sheet of cardboard, and the flaps are folded up to make an open box. Find the cut that maximizes the volume.
Objective: the volume
Why: Volume of a box is base area times height, and the folding fixes both in terms of the single cut length.
\[ V(x) = x(12 - 2x)^2 \]
Expand before differentiating
Why: A cubic polynomial is easier to differentiate correctly than a product with a squared factor, and expanding removes any chance of a chain-rule slip.
\[ V(x) = x\left(144 - 48x + 4x^2\right) = 144x - 48x^2 + 4x^3 \]
State the domain
Why: A cut of zero leaves no walls, and a cut of six inches eats the whole sheet from both sides, so the base side would be zero.
\[ 0 \le x \le 6 \]
Differentiate and factor
Why: Factoring is faster and safer than the quadratic formula here, and it shows both critical points at once.
\[ V'(x) = 144 - 96x + 12x^2 = 12\left(x^2 - 8x + 12\right) = 12(x-2)(x-6) \]
Read off the critical points
Why: Both are in the domain, so both must be examined - one of them is a boundary case in disguise.
\[ x = 2 \quad \text{or} \quad x = 6 \]
Justify with the closed-interval method
Why: Comparing the two critical points and both endpoints shows the six-inch cut is actually the worst possible choice, tied with the endpoints at zero volume.
| x (in) | base side (in) | V (cu in) |
|---|---|---|
| 0 | 12 | 0 |
| 2 | 8 | 128 |
| 6 | 0 | 0 |
Answer in context
Why: Cut two-inch squares from each corner. The finished box is 8 inches by 8 inches by 2 inches and holds 128 cubic inches.
\[ x = 2\ \text{in}, \qquad V_{\max} = 128\ \text{in}^3 \]
Verify by testing cuts on either side
Why: A tenth of an inch either way loses volume, confirming a genuine peak rather than a flat spot or a minimum.
| x (in) | base side (in) | V (cu in) |
|---|---|---|
| 1.9 | 8.2 | 127.756 |
| 2.0 | 8.0 | 128.000 |
| 2.1 | 7.8 | 127.764 |
Picture it
Animation
Shows: Each line of the worked example "Largest open box from a 12-inch square sheet", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: A tenth of an inch either way loses volume, confirming a genuine peak rather than a flat spot or a minimum.
Anomaly
Predict first
A student writes this, and it looks reasonable:
The derivative factored, so pick a root and go. The bigger cut must give the bigger box.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: A deeper cut means a taller box, so it feels like it should hold more.
Treat both roots as candidates and test them, along with the endpoints.
Why: A deeper cut means a taller box, so it feels like it should hold more.
Trap
The derivative factored, so pick a root and go. The bigger cut must give the bigger box.
\[ V'(x) = 12(x-2)(x-6) = 0 \;\Longrightarrow\; x = 2 \text{ or } x = 6 \]
Choose the larger critical point
Why: A deeper cut means a taller box, so it feels like it should hold more.
\[ x = 6 \]
Compute the volume of that box
Why: The base side is twelve minus twelve, which is zero. The box has no floor and holds nothing.
\[ V(6) = 6\,(12 - 12)^2 = 0\ \text{in}^3 \]
A critical point is only a candidate. This one is the absolute minimum of the problem, and nothing in the algebra warned you.
Treat both roots as candidates and test them, along with the endpoints.
\[ V'(x) = 12(x-2)(x-6), \qquad 0 \le x \le 6 \]
Evaluate the objective at every candidate
Why: The closed-interval method compares real numbers, so guessing which root wins is never necessary.
| x (in) | V (cu in) | verdict |
|---|---|---|
| 0 | 0 | endpoint, minimum |
| 2 | 128 | absolute maximum |
| 6 | 0 | critical point, minimum |
Confirm with the Second Derivative Test
Why: The second derivative is negative at the two-inch cut and positive at the six-inch cut, which labels one a maximum and the other a minimum.
\[ V''(x) = 24x - 96, \quad V''(2) = -48 < 0, \quad V''(6) = 48 > 0 \]
Never let the algebra choose the answer for you. Evaluate, compare, then report.
Comparison
Comparison matrix
From Trap: reporting a critical point you never tested: refill the verdict column from what you know. The rest of the table is as it appeared.
| x (in) | V (cu in) | verdict |
|---|---|---|
| 0 | 0 | endpoint, minimum |
| 2 | 128 | absolute maximum |
| 6 | 0 | critical point, minimum |
Concept
A closed cylindrical can has two independent measurements, the radius and the height. Two formulas describe it: how much it holds and how much metal it takes.
\[ V = \pi r^2 h \qquad \text{(volume, the constraint)} \]
\[ S = 2\pi r^2 + 2\pi r h \qquad \text{(surface area, the objective)} \]
The surface area is two circular ends plus one rectangle that wraps around: unroll the side of a can and it is a rectangle as tall as the can and as wide as the circumference.
Which is objective and which is constraint depends on the sentence. Hold one liter using the least metal fixes the volume and minimizes the surface area.
Picture it
Animation
Shows: A can: two formulas, one constraint — a rendered Manim animation.
Rendered with Manim.
Takeaway: Volume is fixed, surface area is the thing being minimised.
Intuition
Fix the volume and imagine stretching the can. A very tall, very thin can has tiny ends but an enormous wrapper - a long ribbon of metal. A very short, very wide can has a tiny wrapper but two huge discs.
| radius (cm) | height (cm) | metal used (sq cm) |
|---|---|---|
| 3 | 35.37 | 723.2 |
| 4 | 19.89 | 600.5 |
| 5.42 | 10.84 | 553.6 |
| 7 | 6.50 | 593.6 |
| 9 | 3.93 | 731.2 |
Both extremes are wasteful, so the cheapest can is somewhere in the middle. That is the same shape of story as the fence and the box - and it is the reason a derivative has something to find.
Pattern
Step through it
Step through Why a tall skinny can wastes metal one row at a time. What is driving the change, and what would the row after the last one be?
Estimation
Predict first
A closed cylindrical can must hold 1000 cubic centimeters, which is one liter. Find the radius and height that use the least metal.
Commit before you compute: what does The least-metal can that holds one liter come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify by pricing nearby cans
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. A can with radius 5 cm and one with radius 6 cm both cost more metal than the answer, confirming a genuine minimum of about 553.6 square centimeters.
Worked example
A closed cylindrical can must hold 1000 cubic centimeters, which is one liter. Find the radius and height that use the least metal.
Objective: total surface area
Why: Least metal means least surface area: two ends plus the wrapper.
\[ S = 2\pi r^2 + 2\pi r h \]
Constraint: the fixed volume
Why: The can must hold exactly one liter, and that is the equation with the given number in it.
\[ \pi r^2 h = 1000 \]
Solve the constraint for the height and substitute
Why: Height is the easier letter to isolate, and substituting it removes the second variable from the surface area.
\[ h = \frac{1000}{\pi r^2} \;\Longrightarrow\; S(r) = 2\pi r^2 + 2\pi r \cdot \frac{1000}{\pi r^2} = 2\pi r^2 + \frac{2000}{r} \]
State the domain
Why: A radius must be positive; there is no upper limit, because any radius has some height that holds a liter. The domain is an open interval, so there are no endpoints to test.
\[ r > 0 \]
Differentiate, rewriting the fraction as a power first
Why: Writing the second term with a negative exponent makes the power rule apply directly.
\[ S(r) = 2\pi r^2 + 2000r^{-1} \;\Longrightarrow\; S'(r) = 4\pi r - \frac{2000}{r^2} \]
Set the derivative to zero and solve for the radius
Why: Multiplying through by the square of the radius clears the fraction and leaves a simple cubic.
\[ 4\pi r^3 = 2000 \;\Longrightarrow\; r^3 = \frac{500}{\pi} \;\Longrightarrow\; r = \sqrt[3]{\frac{500}{\pi}} \approx 5.419\ \text{cm} \]
Find the matching height
Why: Put the radius back into the constraint, which is the equation that ties the two measurements together.
\[ h = \frac{1000}{\pi (5.419)^2} \approx 10.839\ \text{cm} \]
Justify with the Second Derivative Test
Why: The second derivative is positive for every positive radius, so the curve is concave up everywhere and the single critical point is the absolute minimum.
\[ S''(r) = 4\pi + \frac{4000}{r^3} > 0 \quad \text{for all } r > 0 \]
Verify by pricing nearby cans
Why: A can with radius 5 cm and one with radius 6 cm both cost more metal than the answer, confirming a genuine minimum of about 553.6 square centimeters.
| r (cm) | h (cm) | S (sq cm) |
|---|---|---|
| 5.000 | 12.732 | 557.08 |
| 5.419 | 10.839 | 553.58 |
| 6.000 | 8.842 | 559.53 |
Picture it
Animation
Shows: Each line of the worked example "The least-metal can that holds one liter", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: A can with radius 5 cm and one with radius 6 cm both cost more metal than the answer, confirming a genuine minimum of about 553.6 square centimeters.
Concept
Look at the two numbers from the can problem. The height came out at almost exactly twice the radius, and that is not a coincidence.
\[ h = \frac{1000}{\pi r^2} \quad \text{and} \quad r^3 = \frac{500}{\pi} \;\Longrightarrow\; h = 2r \]
The cheapest closed can is exactly as tall as it is wide - it would fit snugly inside a cube. Real soup cans are taller than this because labels, stacking, and shelf appeal are also constraints that our model ignores.
Memorizing the relationship is useful as a sanity check, but you must still show the derivative work. The relationship is the destination, not the argument.
Anomaly
Predict first
A student writes this, and it looks reasonable:
The surface area is written down, so differentiate it right away and treat the height as just another number.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: Treating the height as a constant, which is exactly the unstated assumption being made.
Substitute the constraint first, so only one letter is left before you differentiate.
Why: Treating the height as a constant, which is exactly the unstated assumption being made.
Trap
The surface area is written down, so differentiate it right away and treat the height as just another number.
\[ S = 2\pi r^2 + 2\pi r h \]
Differentiate with respect to the radius, holding the height fixed
Why: Treating the height as a constant, which is exactly the unstated assumption being made.
\[ \frac{dS}{dr} = 4\pi r + 2\pi h \]
Set it to zero and solve
Why: The result is a negative radius, which no can has.
\[ 4\pi r + 2\pi h = 0 \;\Longrightarrow\; r = -\frac{h}{2} \]
The mistake is physical, not algebraic: when the radius changes, the height is forced to change too, because the can must still hold a liter. The height was never a constant.
Substitute the constraint first, so only one letter is left before you differentiate.
\[ h = \frac{1000}{\pi r^2} \;\Longrightarrow\; S(r) = 2\pi r^2 + \frac{2000}{r} \]
Differentiate the one-variable function
Why: Now every appearance of the height has been replaced, so the derivative accounts for the way the height responds.
\[ S'(r) = 4\pi r - \frac{2000}{r^2} \]
Solve for a radius that exists
Why: The cubic gives one positive radius, about 5.419 centimeters, and the matching height is about 10.839 centimeters.
\[ r = \sqrt[3]{\frac{500}{\pi}} \approx 5.419\ \text{cm} \]
Checklist habit: before you write a derivative, count the letters in the objective. If there is more than one, you are not ready to differentiate.
Notation
Annotate
From Trap: differentiating with two variables still in it — read this one piece at a time. What is each part doing?
On: \( r = \sqrt[3]{\frac{500}{\pi}} \approx 5.419\ \text{cm} \)
Pattern
Pick your justification from the shape of the domain. This little decision tree covers every problem you will meet.
Whatever you choose, write one sentence saying which test you used and what it showed. That sentence is usually worth a point on its own.
Edge cases
Discussion prompt
Which justification should you use? works on the cases you have just seen. Push it to the edge: what is the most degenerate input it still handles — empty, zero, one item, everything equal — and what is the first case where it stops being true? Name the case, not just "it breaks".
Hint: Try the smallest legal input, then the largest, then the one where two things collide. Methods are specified at their edges; the middle takes care of itself.
Answer:
Pick your justification from the shape of the domain. This little decision tree covers every problem you will meet.
Check
A closed cylindrical can must hold 128 times pi cubic centimeters. You want to use as little metal as possible.
\[ V = \pi r^2 h = 128\pi, \qquad S = 2\pi r^2 + 2\pi r h \]
Check your understanding
What radius minimizes the surface area?
Answer: A
Why: The constraint gives a height of 128 divided by the square of the radius, so the surface area becomes two pi r squared plus 256 pi over r. Its derivative, 4 pi r minus 256 pi over r squared, is zero when r cubed equals 64, so the radius is 4 cm and the height is 8 cm, which is the diameter as expected.
Concept
A poster problem hides its constraint in the middle of the page. The printed rectangle has a required area; the margins are fixed strips added around it; the whole poster is what you want to shrink.
Let the printed rectangle be x wide and y tall, with side margins of 4 centimeters each and top and bottom margins of 6 centimeters each.
\[ \text{printed area: } xy = 384 \qquad \text{(constraint)} \]
\[ \text{poster area: } A = (x + 8)(y + 12) \qquad \text{(objective)} \]
The eight and the twelve are two margins each, because every margin appears on both sides of the printed block. Miscounting them is the usual source of a wrong answer here.
Picture it
Animation
Shows: Margins: the printed area is the constraint — a rendered Manim animation.
Rendered with Manim.
Takeaway: The constraint is rarely the thing being optimised.
Step zero
Discussion prompt
The smallest poster with a 384-square-centimeter print area — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Objective: total poster area
Answer:
Worked example
A poster must contain 384 square centimeters of printed material, with 6-centimeter margins at the top and bottom and 4-centimeter margins on each side. Find the poster dimensions that use the least paper.
Objective: total poster area
Why: Least paper means the smallest overall rectangle, which is the printed block plus all four margins.
\[ A = (x+8)(y+12) \]
Constraint: the printed area is fixed
Why: The printed block must always contain 384 square centimeters, no matter how it is shaped.
\[ xy = 384 \;\Longrightarrow\; y = \frac{384}{x} \]
Substitute and expand
Why: Expanding turns the product into a sum whose derivative is immediate, and it exposes the constant 480 that will not matter.
\[ A(x) = (x+8)\left(\frac{384}{x} + 12\right) = 384 + 12x + \frac{3072}{x} + 96 = 480 + 12x + \frac{3072}{x} \]
State the domain
Why: The printed width must be positive; any positive width can be paired with a height that gives 384 square centimeters, so there is no upper bound.
\[ x > 0 \]
Differentiate and solve
Why: Only the positive root is in the domain, so the negative one is discarded immediately.
\[ A'(x) = 12 - \frac{3072}{x^2} = 0 \;\Longrightarrow\; x^2 = 256 \;\Longrightarrow\; x = 16 \]
Justify with the Second Derivative Test
Why: The second derivative is positive for every positive width, so this lone critical point is the absolute minimum on the open domain.
\[ A''(x) = \frac{6144}{x^3} > 0 \quad \text{for } x > 0 \]
Answer the question that was asked
Why: The question asked for poster dimensions, not printed dimensions. The printed block is 16 by 24, so the poster is 24 wide and 36 tall.
\[ \text{poster: } 24\ \text{cm} \times 36\ \text{cm}, \qquad A_{\min} = 864\ \text{cm}^2 \]
Verify with neighboring widths
Why: Printed widths of 15 and 17 centimeters both give a bigger poster than 864 square centimeters, confirming the minimum.
| printed width (cm) | printed height (cm) | poster area (sq cm) |
|---|---|---|
| 15 | 25.6 | 864.80 |
| 16 | 24.0 | 864.00 |
| 17 | 22.588 | 864.71 |
Picture it
Animation
Shows: Each line of the worked example "The smallest poster with a 384-square-centimeter print area", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Printed widths of 15 and 17 centimeters both give a bigger poster than 864 square centimeters, confirming the minimum.
Check
An open box is made from a 10-inch by 10-inch square of cardboard by cutting a square of side x from each corner and folding up the flaps.
\[ V(x) = x(10 - 2x)^2, \qquad 0 \le x \le 5 \]
Check your understanding
Which cut length maximizes the volume?
Answer: A
Why: Expanding gives 100x minus 40x squared plus 4x cubed, whose derivative is 12x squared minus 80x plus 100, which factors as 4 times the quantity 3x minus 5 times the quantity x minus 5. The roots are five thirds and five; the second derivative is negative at five thirds, so that cut is the maximum, giving about 74.07 cubic inches.
Section
Part 4
Concept
Closest-point problems all start with the distance formula, and the distance formula has a square root in it. Differentiating through a square root is legal but messy.
\[ D = \sqrt{(x - a)^2 + (y - b)^2} \]
So minimize the square of the distance instead. Give it a name so the grader knows you did it on purpose.
\[ f(x) = D^2 = (x-a)^2 + (y-b)^2 \]
At the very end, take the square root of the minimum value if the question asked for an actual distance.
Intuition
Squaring is an increasing operation on non-negative numbers: if one distance is smaller than another, its square is smaller too, and the other way around.
So the ordering of all the candidate distances is untouched. Whichever point wins the squared-distance contest is exactly the point that wins the distance contest.
| distance | its square | order preserved? |
|---|---|---|
| 1.5 | 2.25 | smallest |
| 1.66 | 2.75 | middle |
| 3.0 | 9.00 | largest |
The same trick works whenever you compose your objective with any increasing function - a square root, a logarithm, or a constant multiple. The location of the minimum does not move; only the value does.
Pattern
Step through it
Step through Why squaring is safe one row at a time. What is driving the change, and what would the row after the last one be?
Hypothesis
Predict first
Closest point on a parabola to a given point is about to be worked. State your hypothesis first: which rule or definition decides this one, and what is the first move it forces? Then watch whether the example agrees with you.
Correct: Objective: the squared distance
Why: Squaring removes the root without moving the minimum, and the curve equation lets us replace the height immediately.
A hypothesis you wrote down is falsifiable; a vague sense of how it will go is not. If the example opens somewhere else, that gap is the thing worth chasing.
Worked example
Find the point or points on the curve below that lie closest to the point with coordinates zero and three.
\[ y = x^2, \qquad P = (0, 3) \]
Objective: the squared distance
Why: Squaring removes the root without moving the minimum, and the curve equation lets us replace the height immediately.
\[ f(x) = (x - 0)^2 + \left(x^2 - 3\right)^2 \]
Expand into a polynomial
Why: A polynomial is far easier to differentiate and factor than a squared binomial in disguise.
\[ f(x) = x^2 + x^4 - 6x^2 + 9 = x^4 - 5x^2 + 9 \]
State the domain
Why: Every real number gives a point on the parabola, so nothing is excluded and there are no endpoints.
\[ -\infty < x < \infty \]
Differentiate and factor
Why: Factoring out the common factor exposes all three critical points at once.
\[ f'(x) = 4x^3 - 10x = 2x\left(2x^2 - 5\right) \]
Solve for the critical points
Why: The middle one comes from the factor of x; the outer two come from the quadratic factor.
\[ x = 0, \qquad x = \pm\sqrt{\tfrac{5}{2}} = \pm\frac{\sqrt{10}}{2} \approx \pm 1.5811 \]
Compare the values
Why: The origin is actually a local worst case: sitting directly below the point is farther than sliding out to either side.
| x | squared distance | distance |
|---|---|---|
| 0 | 9.000 | 3.000 |
| 1.5811 | 2.750 | 1.658 |
| -1.5811 | 2.750 | 1.658 |
Answer in context
Why: There are two closest points, mirror images across the vertical axis, each at height five halves and each about 1.658 units away.
\[ \left(\pm\frac{\sqrt{10}}{2},\ \frac{5}{2}\right), \qquad D_{\min} = \frac{\sqrt{11}}{2} \approx 1.658 \]
Verify by testing points on either side
Why: Both neighbors have a larger squared distance than 2.75, so the critical points really are the closest approach.
| x | point on curve | squared distance |
|---|---|---|
| 1.5 | (1.5, 2.25) | 2.8125 |
| 1.5811 | (1.5811, 2.5) | 2.7500 |
| 1.7 | (1.7, 2.89) | 2.9021 |
Picture it
Animation
Shows: Each line of the worked example "Closest point on a parabola to a given point", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Both neighbors have a larger squared distance than 2.75, so the critical points really are the closest approach.
Commit first
Predict first
Which point on the line is closest to (5, 0)?
Commit to an answer, then rate it — certain, fairly sure, or guessing — and write the rating down before you turn the page.
Correct: (1, 2)
Why: The squared distance is the quantity x minus 5, squared, plus the quantity 2x, squared, which simplifies to 5x squared minus 10x plus 25. Its derivative, 10x minus 10, is zero at x equals 1, giving the point (1, 2) at a distance of two root five, about 4.472.
The rating matters as much as the answer: confident-and-wrong is the combination that survives revision, because nothing about it feels like it needs revisiting.
Check
Find the point on the line below that is closest to the given point.
\[ y = 2x, \qquad P = (5, 0) \]
Check your understanding
Which point on the line is closest to (5, 0)?
Answer: A
Why: The squared distance is the quantity x minus 5, squared, plus the quantity 2x, squared, which simplifies to 5x squared minus 10x plus 25. Its derivative, 10x minus 10, is zero at x equals 1, giving the point (1, 2) at a distance of two root five, about 4.472.
Concept
demand function — The price you must charge in order to sell a given quantity. Charging more sells fewer, so the price falls as the quantity rises.
Revenue is money coming in: price times quantity. Because the price itself depends on the quantity, revenue is not a straight line.
\[ R(x) = x \cdot p(x) \]
Profit is what is left after costs:
\[ P(x) = R(x) - C(x) \]
In business problems the demand function is usually handed to you, so the constraint is already built in and the objective is already a function of one variable.
Intuition
Charge nothing and you sell a lot but collect nothing. Charge an outrageous price and each sale is worth a fortune but nobody buys. Revenue is zero at both ends, so it has a peak in between.
| quantity sold | price each | revenue |
|---|---|---|
| 10 | 180 | 1800 |
| 30 | 140 | 4200 |
| 50 | 100 | 5000 |
| 70 | 60 | 4200 |
| 90 | 20 | 1800 |
The table uses the demand rule that the price starts at 200 dollars and drops by 2 dollars for every extra unit sold. Notice how symmetric the revenue is around the peak - that is the signature of a downward parabola.
Pattern
Step through it
Step through Raise the price, sell fewer one row at a time. What is driving the change, and what would the row after the last one be?
Ranking
Put in order
Put the moves of Maximizing revenue from a linear demand into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Every unit brings in the current price, and the demand function already ties the price to the quantity, so this is one variable from the start.
Worked example
A shop can sell x units per week at a price given by the demand function below, in dollars. How many units should it sell to maximize revenue, and what price does that mean?
\[ p(x) = 200 - 2x \]
Objective: revenue is price times quantity
Why: Every unit brings in the current price, and the demand function already ties the price to the quantity, so this is one variable from the start.
\[ R(x) = x(200 - 2x) = 200x - 2x^2 \]
State the domain
Why: You cannot sell a negative number of units, and beyond 100 units the demand function would demand a negative price.
\[ 0 \le x \le 100 \]
Differentiate and solve
Why: The derivative of revenue is called marginal revenue: the money the next unit brings in. Revenue peaks where that hits zero.
\[ R'(x) = 200 - 4x = 0 \;\Longrightarrow\; x = 50 \]
Justify with the closed-interval method
Why: The interval is closed and bounded, and both endpoints give zero revenue, so the interior critical point wins outright.
| x (units) | price ($) | revenue ($) |
|---|---|---|
| 0 | 200 | 0 |
| 50 | 100 | 5000 |
| 100 | 0 | 0 |
Answer in context
Why: Sell 50 units at 100 dollars each for 5000 dollars of revenue - exactly half the maximum possible quantity, which is always the answer for a linear demand.
\[ x = 50 \text{ units}, \quad p = \$100, \quad R_{\max} = \$5000 \]
Verify one unit either way
Why: Selling 49 or 51 units both bring in 4998 dollars, two dollars short of the peak, which is what a parabola does near its vertex.
| x (units) | price ($) | revenue ($) |
|---|---|---|
| 49 | 102 | 4998 |
| 50 | 100 | 5000 |
| 51 | 98 | 4998 |
Picture it
Animation
Shows: Each line of the worked example "Maximizing revenue from a linear demand", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Selling 49 or 51 units both bring in 4998 dollars, two dollars short of the peak, which is what a parabola does near its vertex.
Concept
Maximizing revenue ignores what it costs you to make the goods. The quantity that brings in the most money is usually not the quantity that leaves you with the most money.
Suppose each unit costs 40 dollars to produce and the shop pays 800 dollars a week in fixed costs:
\[ C(x) = 40x + 800 \]
Because cost keeps rising while revenue flattens out near its peak, the profit peak sits to the left of the revenue peak. Making the last few units earns less than it costs.
Ranking
Put in order
Put the moves of Maximizing profit for the same product into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Profit is what the question asks about, so profit is the function to differentiate.
Worked example
With the same demand function and the cost function shown, find the quantity that maximizes weekly profit, the price to charge, and the profit itself.
\[ p(x) = 200 - 2x, \qquad C(x) = 40x + 800 \]
Objective: profit equals revenue minus cost
Why: Profit is what the question asks about, so profit is the function to differentiate.
\[ P(x) = \left(200x - 2x^2\right) - (40x + 800) \]
Simplify before differentiating
Why: Collecting like terms first prevents a sign error on the subtracted cost, the most common slip in these problems.
\[ P(x) = -2x^2 + 160x - 800 \]
State the domain
Why: Same reasoning as before: quantities from zero to the point where the price would go negative.
\[ 0 \le x \le 100 \]
Differentiate and solve
Why: Marginal profit is zero exactly when the next unit stops adding anything.
\[ P'(x) = -4x + 160 = 0 \;\Longrightarrow\; x = 40 \]
Justify with the Second Derivative Test
Why: The second derivative is negative everywhere, so the parabola opens downward and the critical point is the maximum.
\[ P''(x) = -4 < 0 \]
Answer in context
Why: Sell 40 units at 120 dollars each for a weekly profit of 2400 dollars. Note the shop deliberately sells ten fewer units than the revenue-maximizing 50.
\[ x = 40 \text{ units}, \quad p = \$120, \quad P_{\max} = \$2400 \]
Verify by comparing with the revenue-maximizing choice
Why: At 50 units the revenue is higher but the profit is 2200 dollars, less than 2400, and one unit either side of 40 gives 2398 dollars. The profit peak is real and it is not at the revenue peak.
| x (units) | revenue ($) | cost ($) | profit ($) |
|---|---|---|---|
| 39 | 4758 | 2360 | 2398 |
| 40 | 4800 | 2400 | 2400 |
| 41 | 4838 | 2440 | 2398 |
| 50 | 5000 | 2800 | 2200 |
Picture it
Animation
Shows: Each line of the worked example "Maximizing profit for the same product", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: At 50 units the revenue is higher but the profit is 2200 dollars, less than 2400, and one unit either side of 40 gives 2398 dollars. The profit peak is real and it is not at the revenue peak.
Concept
Setting the derivative of profit to zero says something an economist would recognize instantly.
\[ P'(x) = R'(x) - C'(x) = 0 \;\Longleftrightarrow\; R'(x) = C'(x) \]
In words: produce right up to the unit whose extra revenue exactly matches its extra cost. Before that point each unit earns more than it costs; after it, each unit loses money.
Check it on our numbers. Marginal revenue is 200 minus 4x and marginal cost is the constant 40, and setting them equal gives 40 units - the same answer the profit derivative gave.
\[ 200 - 4x = 40 \;\Longrightarrow\; x = 40 \]
Two different-looking routes to the same number is a strong sign that neither one has an arithmetic error in it.
Prediction
Predict first
How many units should the firm sell to maximize profit?
Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.
Correct: 40 units
Why: Profit is negative 2x squared plus 160x minus 800, whose derivative is negative 4x plus 160, zero at 40 units. The second derivative is negative 4, so it is a maximum, and the profit there is 2400 dollars at a price of 120 dollars.
Check
A firm faces the demand and cost functions shown, with quantities in units and money in dollars.
\[ p(x) = 200 - 2x, \qquad C(x) = 40x + 800 \]
Check your understanding
How many units should the firm sell to maximize profit?
Answer: A
Why: Profit is negative 2x squared plus 160x minus 800, whose derivative is negative 4x plus 160, zero at 40 units. The second derivative is negative 4, so it is a maximum, and the profit there is 2400 dollars at a price of 120 dollars.
Picture it
Figure (svg): A shaded horizontal band representing a river, with a dot on the upper bank, a bent path crossing the river diagonally and then running along the lower bank to a second dot
Discussion prompt
Read the picture before the words. What is this showing, and what is the one thing it is built to make obvious? Commit to an answer, then read on.
Hint: Name the parts, then say what changes between them — and if nothing changes, say what is being held still.
Answer:
In a minimum-time or minimum-cost path problem, two stretches have different rates: swimming versus running, underwater pipe versus buried pipe, rough ground versus road.
Concept
Figure (svg): A shaded horizontal band representing a river, with a dot on the upper bank, a bent path crossing the river diagonally and then running along the lower bank to a second dot
In a minimum-time or minimum-cost path problem, two stretches have different rates: swimming versus running, underwater pipe versus buried pipe, rough ground versus road.
Straight across is the shortest crossing but leaves a long expensive detour. Aiming directly at the target makes the whole trip expensive. The best route bends - and the derivative finds the bend.
The variable is almost always the landing point: how far along the far side you come ashore. Everything else is Pythagoras.
Intuition
Think of it as shopping. Every kilometer of underwater pipe costs a lot; every kilometer of land pipe costs less. You want to buy as few expensive kilometers as you can, but going straight across wastes cheap kilometers going the wrong way.
So you angle the crossing a bit downstream. The first few degrees of angle add almost nothing to the water distance while cutting real distance off the land run - that is why the straight-across route is never optimal when the land is cheaper.
Push the angle too far and the trade reverses: now each extra degree adds a lot of expensive water. The balance point is the answer.
Explain it
Discussion prompt
Explain Spend your distance where it is cheap to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
Push the angle too far and the trade reverses: now each extra degree adds a lot of expensive water. The balance point is the answer.
Estimation
Predict first
A refinery sits on one bank of a straight river 4 kilometers wide. A storage tank sits on the opposite bank, 10 kilometers downstream. Pipe under water costs 5 million dollars per kilometer; pipe on land costs 3 million. Where should the pipe come ashore?
Commit before you compute: what does The pipeline across the river come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify a tenth of a kilometer either way
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Both neighbors cost about 46.003 million dollars, slightly more than 46, and they cost the same amount more - the symmetric signature of a true minimum.
Worked example
A refinery sits on one bank of a straight river 4 kilometers wide. A storage tank sits on the opposite bank, 10 kilometers downstream. Pipe under water costs 5 million dollars per kilometer; pipe on land costs 3 million. Where should the pipe come ashore?
Name the variable as the landing point
Why: Let x be how far downstream the pipe comes ashore. Then the underwater leg is the hypotenuse of a right triangle with legs 4 and x, and the land leg is whatever is left of the 10 kilometers.
\[ \text{water leg} = \sqrt{16 + x^2}, \qquad \text{land leg} = 10 - x \]
Objective: total cost in millions of dollars
Why: Each leg costs its length times its rate, and the geometry has already reduced everything to the single variable x.
\[ C(x) = 5\sqrt{16 + x^2} + 3(10 - x) \]
State the domain
Why: Coming ashore upstream of the refinery or past the tank would only add pipe, so the sensible landing points run from directly across to directly at the tank.
\[ 0 \le x \le 10 \]
Differentiate, using the chain rule on the root
Why: The outer function is a square root and the inner function is 16 plus x squared, whose derivative is 2x; the 2 cancels the one-half from the root.
\[ C'(x) = \frac{5x}{\sqrt{16 + x^2}} - 3 \]
Set it to zero and clear the root by squaring
Why: Isolating the root before squaring keeps the algebra clean and avoids cross terms.
\[ 5x = 3\sqrt{16 + x^2} \;\Longrightarrow\; 25x^2 = 9\left(16 + x^2\right) \;\Longrightarrow\; 16x^2 = 144 \]
Solve and discard the negative root
Why: Squaring can create false solutions, so keep only the value inside the domain and confirm it satisfies the original equation: five times three is fifteen, and three times the root of twenty-five is also fifteen.
\[ x^2 = 9 \;\Longrightarrow\; x = 3\ \text{km} \]
Justify with the closed-interval method
Why: Both endpoints cost more than the critical point, so landing 3 kilometers downstream is the absolute cheapest route.
| x (km) | water leg (km) | land leg (km) | cost ($M) |
|---|---|---|---|
| 0 | 4.000 | 10 | 50.00 |
| 3 | 5.000 | 7 | 46.00 |
| 10 | 10.770 | 0 | 53.85 |
Answer in context
Why: Come ashore 3 kilometers downstream: 5 kilometers of underwater pipe and 7 kilometers of land pipe, for 46 million dollars.
\[ x = 3\ \text{km}, \qquad C_{\min} = 5(5) + 3(7) = \$46\ \text{million} \]
Verify a tenth of a kilometer either way
Why: Both neighbors cost about 46.003 million dollars, slightly more than 46, and they cost the same amount more - the symmetric signature of a true minimum.
| x (km) | cost ($M) |
|---|---|
| 2.9 | 46.0032 |
| 3.0 | 46.0000 |
| 3.1 | 46.0032 |
Picture it
Animation
Shows: Each line of the worked example "The pipeline across the river", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Both neighbors cost about 46.003 million dollars, slightly more than 46, and they cost the same amount more - the symmetric signature of a true minimum.
Concept
Look at the equation the derivative produced, before any numbers went in.
\[ \frac{5x}{\sqrt{16+x^2}} = 3 \;\Longleftrightarrow\; \frac{x}{\sqrt{16+x^2}} = \frac{3}{5} \]
That fraction on the left is the sine of the angle the underwater pipe makes with the straight-across direction. So the optimal angle depends only on the ratio of the two prices, not on how wide the river is or how far downstream the tank sits.
\[ \sin\theta = \frac{\text{cheap rate}}{\text{expensive rate}} = \frac{3}{5} \;\Longrightarrow\; \theta \approx 36.87^\circ \]
This is the same rule light obeys when it bends entering water. Optimization problems that produce a clean structural statement like this are usually telling you something true about the world, which is a good reason to look at your answer instead of just boxing it.
Analogy
Discussion prompt
Explain What the pipeline answer is really saying by analogy to something with no Calculus I in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
Look at the equation the derivative produced, before any numbers went in.
Section
Part 5
Concept
Not every optimization problem is answered by a critical point. When the objective is concave up across the whole domain, the only interior critical point is a minimum - and the maximum has to live at an endpoint.
This is why the closed-interval method insists on evaluating the endpoints. Skipping them is not a shortcut; it is a way to miss the answer entirely.
Endpoint answers usually mean something concrete: use all of the material for one shape, sell nothing, or take the whole trip on one surface. They are legitimate answers, not degenerate ones.
Counterexample
Discussion prompt
Endpoint answers usually mean something concrete: use all of the material for one shape, sell nothing, or take the whole trip on one surface. They are legitimate answers, not degenerate ones.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Picture it
Animation
Shows: Sometimes the endpoint wins — a rendered Manim animation.
Rendered with Manim.
Takeaway: The interior critical point is a local max; the right endpoint beats it outright.
Picture it
Animation
Shows: The candidate set for a closed-interval extremum problem.
Critical points plus both endpoints. That is the whole list.
Takeaway: On a closed interval a continuous function must attain both extremes, and they can only occur at critical points or at the endpoints.
Step zero
Discussion prompt
Cutting a wire into a circle and a square — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Name the variable as the piece for the circle
Answer:
Worked example
A wire 12 meters long is cut into two pieces. One piece is bent into a circle, the other into a square. How should it be cut to make the total enclosed area as large as possible?
Name the variable as the piece for the circle
Why: If x meters go to the circle, the remaining 12 minus x meters go to the square. One letter now controls both shapes.
\[ \text{circle uses } x, \qquad \text{square uses } 12 - x \]
Turn each perimeter into an area
Why: The circle's circumference gives its radius, and the square's perimeter gives its side; then each area follows from its own formula.
\[ r = \frac{x}{2\pi} \Rightarrow A_{\text{circ}} = \frac{x^2}{4\pi}, \qquad s = \frac{12-x}{4} \Rightarrow A_{\text{sq}} = \frac{(12-x)^2}{16} \]
Objective: total area
Why: Adding the two pieces gives one function of one variable, which is exactly what we need.
\[ A(x) = \frac{x^2}{4\pi} + \frac{(12-x)^2}{16}, \qquad 0 \le x \le 12 \]
Differentiate and find the critical point
Why: Each term needs the chain rule only on the squared binomial, and clearing the fractions turns the equation into a linear one.
\[ A'(x) = \frac{x}{2\pi} - \frac{12-x}{8} = 0 \;\Longrightarrow\; x = \frac{12\pi}{4+\pi} \approx 5.279 \]
Test what kind of critical point it is
Why: The second derivative is a positive constant, so the graph is concave up everywhere and this critical point is the absolute MINIMUM area, not the maximum.
\[ A''(x) = \frac{1}{2\pi} + \frac{1}{8} > 0 \]
Go to the endpoints for the maximum
Why: Since the interior critical point is the low point, the high point must be at one end of the domain: all wire to the square, or all wire to the circle.
| x (m) to circle | what you build | total area (sq m) |
|---|---|---|
| 0 | square of side 3 | 9.000 |
| 5.279 | both shapes | 5.041 |
| 12 | circle of radius about 1.910 | 11.459 |
Answer in context
Why: Do not cut the wire at all: bend the whole 12 meters into a circle for about 11.46 square meters, which beats the all-square option of exactly 9 square meters.
\[ x = 12\ \text{m}, \qquad A_{\max} = \frac{36}{\pi} \approx 11.46\ \text{m}^2 \]
Verify the circle really beats the square
Why: A circle of circumference 12 has radius 6 over pi, so its area is pi times that squared, which is 36 over pi, about 11.459 - larger than the 9 square meters of a 3-by-3 square using the same 12 meters.
\[ \pi\left(\frac{6}{\pi}\right)^2 = \frac{36}{\pi} \approx 11.459 > 9 \]
Picture it
Animation
Shows: Each line of the worked example "Cutting a wire into a circle and a square", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: A circle of circumference 12 has radius 6 over pi, so its area is pi times that squared, which is 36 over pi, about 11.459 - larger than the 9 square meters of a 3-by-3 square using the same 12 meters.
Concept
You cannot sell two-thirds of a laptop. If the variable counts real objects, the derivative may hand you a fractional critical point - and the answer is one of the two whole numbers beside it.
Suppose the price drops 3 dollars per extra unit instead of 2, with the same costs:
\[ P(x) = -3x^2 + 160x - 800 \;\Longrightarrow\; P'(x) = -6x + 160 = 0 \;\Longrightarrow\; x = \frac{80}{3} \approx 26.67 \]
Evaluate at both neighbors and compare, rather than rounding by habit:
| x (units) | profit ($) |
|---|---|
| 26 | 1332 |
| 27 | 1333 |
Twenty-seven units wins by a single dollar. Rounding down would have cost you the point, and there is no rule that says the nearer integer always wins - you have to check.
Comparison
Comparison matrix
From When the variable has to be a whole number: refill the profit ($) column from what you know. The rest of the table is as it appeared.
| x (units) | profit ($) |
|---|---|
| 26 | 1332 |
| 27 | 1333 |
Concept
The variable you differentiated is almost never the thing the problem wanted. Read the last sentence of the problem again before you box anything.
| problem asks for | you found | what to report |
|---|---|---|
| the maximum area | the width x | substitute back and give the area |
| the poster dimensions | the printed width | add the margins first |
| the price to charge | the quantity sold | put the quantity into the demand function |
| the minimum distance | the squared distance | take the square root at the end |
Then attach units: square feet, cubic inches, dollars per week, kilometers. A number without units is an unfinished answer, and in an applied problem it is usually worth a point.
Comparison
Comparison matrix
From Answer the question that was asked: refill the you found column from what you know. The rest of the table is as it appeared.
| problem asks for | you found | what to report |
|---|---|---|
| the maximum area | the width x | substitute back and give the area |
| the poster dimensions | the printed width | add the margins first |
| the price to charge | the quantity sold | put the quantity into the demand function |
| the minimum distance | the squared distance | take the square root at the end |
Anomaly
Predict first
A student writes this, and it looks reasonable:
The poster problem: the calculus is finished and the critical point is found, so report it.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: These are the printed dimensions, not the poster dimensions - the margins were never added back.
Finish the translation back into the real object, then attach units.
Why: These are the printed dimensions, not the poster dimensions - the margins were never added back.
Trap
The poster problem: the calculus is finished and the critical point is found, so report it.
\[ A'(x) = 12 - \frac{3072}{x^2} = 0 \;\Longrightarrow\; x = 16 \]
Report the poster as 16 by 24
Why: These are the printed dimensions, not the poster dimensions - the margins were never added back.
Report a bare number with no units
Why: Writing sixteen with nothing after it leaves the reader guessing between centimeters, square centimeters, and inches.
\[ \text{Answer: } 16 \text{ by } 24 \]
Every derivative on the page was correct, and the answer is still wrong. This is the cheapest way to lose points in the whole unit.
Finish the translation back into the real object, then attach units.
\[ x = 16\ \text{cm} \;\Longrightarrow\; y = \frac{384}{16} = 24\ \text{cm} \]
Add the margins to get the poster itself
Why: Four centimeters on each side adds eight to the width; six on the top and bottom adds twelve to the height.
\[ \text{poster} = (16+8) \times (24+12) = 24\ \text{cm} \times 36\ \text{cm} \]
State the quantity that was requested, with units
Why: If the question asked for the least paper, give the area; if it asked for dimensions, give both lengths.
\[ A_{\min} = 24 \cdot 36 = 864\ \text{cm}^2 \]
Habit to build: underline the final question in the problem before you start, and look back at it before you box your answer.
Two truths and a lie
Sort into buckets
Some of these hold up and some are the exact mistakes this lesson is built to prevent. Sort them.
Ranking
Put in order
These are the steps of The exam checklist, scrambled. Put them back in order before the next slide shows you.
Why: This is the order the recipe itself gives. Recalling the sequence without the slide in front of you is the difference between recognising the method and being able to run it — most of what goes wrong in practice is a step done out of turn.
Pattern
Run this list on every optimization problem. It is the difference between full credit and half credit.
If you run out of time on an exam, still write the objective, the constraint, and the domain. Those three lines usually carry most of the credit.
Real world
Discussion prompt
Outside this lesson: where does Applied Optimization actually turn up? Name one concrete situation — a job, a piece of software someone ships, a decision somebody has to make — and say which part of The exam checklist is doing the work in it.
Hint: Vague is the failure mode here. "Engineering" is not a situation; "deciding whether this build is fast enough to ship" is.
Answer:
The full applied-optimization workflow: name the objective and the constraint, reduce to one variable, state the realistic domain, find critical points, and justify the max or min. Worked classics include fences, a cut-corner box, a minimum-metal can, a poster with margins, closest points, revenue and profit, and a least-cost pipeline.
Elimination
Eliminate the wrong options
What is the largest total area that can be enclosed?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: The second derivative is positive everywhere, so the critical point is the minimum and the maximum must be at an endpoint. All wire to the square gives 9 square meters; all wire to the circle gives 36 over pi, about 11.46, which is larger.
Check
A 12-meter wire is cut into two pieces, one bent into a circle and one bent into a square. The total area has exactly one interior critical point, and there the total area is about 5.04 square meters.
\[ A(x) = \frac{x^2}{4\pi} + \frac{(12-x)^2}{16}, \qquad A''(x) = \frac{1}{2\pi} + \frac{1}{8} > 0 \]
Check your understanding
What is the largest total area that can be enclosed?
Answer: A
Why: The second derivative is positive everywhere, so the critical point is the minimum and the maximum must be at an endpoint. All wire to the square gives 9 square meters; all wire to the circle gives 36 over pi, about 11.46, which is larger.
Check
A student maximizes the area of a rectangular pen fenced on three sides with 100 feet of fence, and writes this work.
\[ 2x + y = 100, \qquad A = xy, \qquad \frac{dA}{dx} = y = 0 \]
Check your understanding
What is the error in this solution?
Answer: A
Why: The length depends on the width through the constraint, so it is not a constant. Substituting first gives the area as 100x minus 2x squared, whose derivative is 100 minus 4x, zero at x equals 25, giving a length of 50 and a maximum area of 1250 square feet.
Connect it up
Draw it
One page, no notation unless you need it: draw how these connect — The Optimization Mindset · Fences and Rectangles · Boxes, Cans, and Posters · Distance, Money, and Time · Endpoints and Sense-Making. Put an arrow wherever one of them is what makes another possible, and label the arrow with why.
Recap
Optimization is one procedure wearing many costumes. Fences, cans, posters, pipelines, and profit all reduce to the same eight steps.
| problem | objective | constraint | answer |
|---|---|---|---|
| 400 ft of fence along a river | area | two widths plus a length is 400 | 100 by 200 ft, 20000 sq ft |
| 12-inch square sheet | volume | folding geometry | cut 2 in, 128 cubic in |
| one-liter can | surface area | volume is 1000 cubic cm | radius about 5.42 cm, height twice that |
| poster, 384 sq cm printed | poster area | printed area is 384 | 24 by 36 cm, 864 sq cm |
| pipeline across a 4 km river | cost | geometry of the crossing | land 3 km downstream, 46 million dollars |
Next up: antiderivatives and the definite integral, where the derivative machinery you have been building gets run in reverse.
Want this taught 1-on-1? Alexander tutors Calculus I — $55/session, free consultation.