MATH 150 · Mathematics for Economics I
Finding Maximums and Minimums
Use first and second derivatives to find the best output, the lowest average cost and the best bundle, and avoid the usual optimization traps.
Key takeaways
- At a smooth peak or valley the derivative is zero, so solve the equation f′(x) = 0 to find candidates.
- The second derivative tells which kind of point you have: negative means a peak, and positive means a valley.
- A local maximum is the highest point nearby, but the global maximum might be somewhere else or at the edge of the allowed range.
- A constrained choice, such as spending a fixed budget, can often be reduced to a one-variable problem by substitution.
- Always check the answer in the original problem, because a zero derivative alone does not prove a maximum or a minimum.
A hiker climbing a foggy hill cannot see the summit. But she can feel the ground. When the path tilts upward under her boots, she keeps climbing. When it tilts downward, she has gone over the top. At the exact moment the ground is level, she is standing at a peak, or she is about to cross a ridge, or she is in a dip.
Economists climb hills like this all the time. A firm wants the output with the highest profit. A factory wants the output with the lowest average cost. A household wants the best use of a fixed budget. In every case the hill is a function, and the tilt of the ground is its derivative.
Zero tilt marks the candidates. This lesson shows how to find them, how to tell a peak from a valley, and how to avoid the traps that make a good-looking answer wrong.
Zero slope: where to look
Picture the graph of a smooth function. At the top of a hill, the tangent line is flat. At the bottom of a valley, it is flat too. So both kinds of turning points have slope zero.
A value of x at which f′(x) = 0 is called a critical point. The recipe for finding candidates is:
- Differentiate.
- Set the derivative equal to zero.
- Solve for x.
We did this already without naming it. For Nia's candle profit, π = −0.5q² + 16q − 56, in quadratic functions, revenue and profit:
π′ = −q + 16
−q + 16 = 0
q = 16 It matched the vertex formula −b / 2a. And in the marginal value lesson, setting profit's derivative to zero is the same as setting marginal revenue equal to marginal cost.
Peak or valley? The second derivative
A critical point alone does not tell you which. The ground can be level at the top of a hill, at the bottom of a valley, or on a flat stretch of a rising slope.
The cure is the second derivative, the derivative of the derivative, written f″(x). It tells how the slope itself is changing.
- If f″ is negative at a critical point, the slope goes from positive to negative as you pass: a local maximum.
- If f″ is positive, the slope goes from negative to positive: a local minimum.
- If f″ is zero, the test says nothing, and you check the slope on either side.
A curve that bends downward, like a cap, is concave, and f″ is negative. A curve that bends upward, like a cup, is convex, and f″ is positive.
For Nia, π″ = −1, which is negative everywhere. So q = 16 is a maximum.
If f″ is zero at a critical point, check the slope on both sides instead.
Minimizing average cost
Let's use the test on a minimum. The bagel shop's average cost per dozen is
AC(q) = 50/q + 2 + 0.1q Rewrite it with powers to differentiate: AC = 50q⁻¹ + 2 + 0.1q.
AC′ = −50q⁻² + 0.1 = −50/q² + 0.1
Set to zero: 50/q² = 0.1, so q² = 500, q ≈ 22.36
AC″ = 100q⁻³ = 100/q³ At q = 22.36, AC″ is positive, so it is a minimum. The average cost there is 50/22.36 + 2 + 2.236 = 6.47 dollars per dozen. The firm gets its cheapest dozens near 22 dozen a day. The marginal cost at that point is 2 + 0.2 × 22.36 = 6.47, the same, as the earlier lesson on rules promised.
When one critical point is enough
The cubic example needed a table, but many economic problems do not. If a function is concave everywhere, meaning its second derivative is negative at every point, then any critical point is automatically the global maximum. There is only one hill, and you have found its top.
The same holds in reverse. If a function is convex everywhere, a critical point is the global minimum. The average cost curve for q above zero is convex, which is why a single check at q = 22.36 was enough.
Nia's candle profit was concave everywhere, since π″ = −1 at all quantities. That gave her one clean answer. Economists like models with this property because the answer is unique and easy to defend. When the real world has several hills, as in the cubic profit curve, the careful path is to list every candidate and compare.
A handy test is to sketch the shape. A curve that rises, flattens, then falls has one peak and the second derivative is negative. A curve that rises, flattens, rises again has an inflection with a zero slope and no peak at all. Sketching takes ten seconds and prevents a lot of grief.
A worked example: a profit that is not a simple hill
Real profit curves can have more than one turn. Suppose a small maker's daily profit, in dollars, is
π(q) = −q³ + 12q² − 21q + 10 for q from 0 to 10 units Perhaps the cubic term reflects crowding at high volume. The goal is to find the best q.
Step 1: Differentiate.
π′(q) = −3q² + 24q − 21 Step 2: Set it to zero. Divide by −3:
q² − 8q + 7 = 0
(q − 1)(q − 7) = 0
q = 1 or q = 7 Step 3: Second derivative.
π″(q) = −6q + 24
π″(1) = 18 positive: local minimum
π″(7) = −18 negative: local maximum Step 4: Evaluate profit at the critical points and the ends.
| q | π(q) | What it is |
|---|---|---|
| 0 | 10 | Left end |
| 1 | 0 | Local minimum |
| 7 | 108 | Local maximum |
| 10 | 0 | Right end |
Check q = 7: −343 + 588 − 147 + 10 = 108. Check q = 10: −1,000 + 1,200 − 210 + 10 = 0.
Step 5: Choose. The highest value is 108 at q = 7. That is the global maximum on the range.
Notice the lesson of Step 4. The local minimum at q = 1 is not the lowest point of the whole range, and the left end, q = 0, beats it. If you had stopped at "π′ = 0" and picked q = 1, you would have chosen the worst nearby point. And if you had only checked the ends, you would have missed the 108.
Zero slope at both q = 1 and q = 7, but only one of them is the best choice.
The inflection point
Where does the curve switch from convex to concave? Solve π″ = 0: −6q + 24 = 0, so q = 4. This is an inflection point. At q = 4 the slope π′ = −48 + 96 − 21 = 27, and that is the largest slope the curve ever reaches. Marginal profit peaks there: each added unit is worth more than at any other volume. Past q = 4, units still add profit, but less and less, until q = 7 where the gain falls to zero.
Choosing under a budget: substitution
Many choices have a constraint. A diner has $40 to spend on pizza slices (x) at $2 each and soda (y) at $4 each. Her satisfaction is U = x × y. How should she split it?
Step 1: Write the budget. 2x + 4y = 40.
Step 2: Solve for one variable. y = 10 − 0.5x. Soda is an explicit function of slices.
Step 3: Substitute into utility.
U = x (10 − 0.5x) = 10x − 0.5x² Step 4: Differentiate and set to zero.
U′ = 10 − x = 0
x = 10
y = 10 − 5 = 5 Step 5: Check the second derivative. U″ = −1, negative, so a maximum.
Step 6: Check the budget. 2 × 10 + 4 × 5 = 40 ✓. Satisfaction is U = 50.
Compare nearby choices: x = 8, y = 6 gives U = 48. And x = 12, y = 4 gives 48. Both are worse. This technique, reducing a constrained problem to one variable, appears again and again in microeconomics.
Why economists lean on this
Maximizing and minimizing sit under much of economics. Firms maximize profit. Consumers maximize satisfaction. Planners minimize cost. Even the claim that a competitive market produces an efficient quantity is a statement about a maximum: where the added benefit of one more unit equals the added cost, total net benefit is as high as it can be, which is the logic in consumer surplus, producer surplus and efficiency.
For profit, the first order condition, π′ = 0, is the marginal rule: MR = MC. The second order condition, π″ < 0, says marginal profit is falling at that point, so marginal revenue crosses marginal cost from above. If instead marginal cost were falling faster than marginal revenue, the zero-slope point would be a valley of profit, and the better choice would sit at an edge.
Sometimes there is no interior peak at all. Suppose a seller can sell any amount at a fixed $10 price, and marginal cost is a constant $4. Profit is then π = 6q − F, which keeps rising with q. The first-order condition 6 = 0 has no solution. In real life something stops the climb: a capacity limit, or a market where the price falls as sales grow. The model is telling you that a missing piece matters.
Choosing a price instead of a quantity
A seller can think in either direction. Instead of choosing how many to sell, choose the price and let demand tell the quantity. The answer must agree.
Take Pia's puppet theater from the elasticity lesson: demand Q = 100 − 2P and marginal cost $10 per ticket. Profit as a function of price:
π(P) = (P − 10)(100 − 2P) = −2P² + 120P − 1,000
π′(P) = −4P + 120 = 0
P = 30
π(30) = −1,800 + 3,600 − 1,000 = 800
π″ = −4, negative The price is $30, the quantity is 100 − 60 = 40, and profit is $800. It is the same answer found by setting marginal revenue equal to marginal cost, which is reassuring. You can think of the two views as two roads up the same hill.
Choosing the variable is a matter of convenience. If the formulas are simpler in price, use price. If they are simpler in quantity, use quantity. The result will not change, and agreeing answers from two routes is a good check on your algebra.
The common mistake: trusting the zero
Here are the traps, each of which has caught a good student.
- Stopping at f′ = 0. The cubic y = x³ has slope zero at x = 0, but it is neither a peak nor a valley. The curve flattens briefly, then keeps rising.
- Calling a local peak the global peak. Compare values at all candidates, including the edges of the allowed range.
- Forgetting the range. A quantity cannot be negative. If your critical point is at q = −3, it is outside the problem. The best allowed choice may be q = 0, a corner solution.
- Wrong sign on the second derivative. Check by plugging in a number on each side of the critical point. If the slope goes from positive to negative, it is a peak.
- Dropping units and size. A critical point of 22.36 dozen is a fine answer for a smooth model. If bagels come in whole dozens, compare 22 and 23.
For the bagel average cost, compare: AC(22) = 2.273 + 2 + 2.2 = 6.473 and AC(23) = 2.174 + 2 + 2.3 = 6.474. The two are nearly tied, which is what you expect near a smooth minimum.
Words to know
Critical point an input at which the derivative of a function is zero.
Second derivative the derivative of the derivative, showing how the slope changes.
Local maximum a point higher than all points near it.
Global maximum the highest point over the whole allowed range.
Concave bending downward, with a negative second derivative.
Convex bending upward, with a positive second derivative.
Inflection point a point where a curve changes between concave and convex.
Corner solution a best choice at the edge of the allowed range.
Check yourself
- Find the critical point of f(x) = x² − 10x + 7 and say whether it is a maximum or a minimum.
- Profit is π = −2q² + 40q − 100. Find the profit-maximizing q and the maximum profit.
- For AC = 100/q + 4 + q, find the quantity that minimizes average cost and the minimum value.
- A budget of $60 buys x at $3 and y at $6. If U = x × y, find the best x and y.
- For f(x) = x³ − 3x, find the critical points and classify them.
- Explain why checking the ends of the range matters when searching for a global maximum.
Show the answers
- f′ = 2x − 10 = 0 gives x = 5, and f″ = 2 is positive, so it is a minimum (value −18).
- π′ = −4q + 40 = 0 gives q = 10, and π = −200 + 400 − 100 = $100.
- AC′ = −100/q² + 1 = 0 gives q = 10, and AC = 10 + 4 + 10 = 24, with AC″ = 200/q³ positive.
- y = 10 − 0.5x, so U = 10x − 0.5x², giving x = 10 and y = 5, with U = 50.
- f′ = 3x² − 3 = 0 gives x = ±1, and f″ = 6x shows x = −1 is a local maximum and x = 1 is a local minimum.
- The highest value might sit at an edge, where the slope is not zero, so a search for zero slopes alone would miss it.