Sub topic 8
Maximum or minimum? The second-order condition
This chapter assumes you know the MR = MC rule from the previous chapters and can take a first and second derivative of a polynomial. You should also be comfortable with total revenue, total cost and profit as functions of output q.
Why the first-order condition is not enough
Setting MR = MC is the same as setting the slope of the profit curve to zero. A slope of zero marks the top of a hill, but it also marks the bottom of a valley and the flat spot on a slope. The first-order condition alone cannot tell these apart. It only produces candidates.
The second-order condition separates the cases. It asks how the slope of profit changes as q rises. At a maximum, the slope goes from positive to negative, so profit is rising before the point and falling after it.
The condition in profit form
Write profit as π(q) = R(q) − C(q). The first-order condition is π′(q*) = 0. The second-order condition for a local maximum is:
π″(q*) < 0
Because π″ = R″ − C″, the condition says R″(q) < C″(q). The same statement in marginal terms is the form economists usually quote:
- MR′(q) < MC′(q)
- In words, MC must cut MR from below at the chosen output, so the MC curve is steeper than the MR curve there.
The intuition is the one behind the MR = MC rule. Just below q, MR exceeds MC, so each extra unit adds profit. Just above q, MC exceeds MR, so each extra unit subtracts profit. If the inequality runs the other way, the signs flip. Units just below q lose money and units just above gain money, so q is the worst point nearby.
What the condition means for each type of firm
| Firm | MR slope | Condition becomes | Typical result |
|---|---|---|---|
| Price taker | 0 (MR = P is flat) | MC′(q*) > 0, so MC is rising | Holds on the upward-sloping part of MC |
| Linear demand, P = a − bq | −2b | −2b < MC′(q*) | Holds even with mildly falling MC |
| Linear demand, linear or quadratic cost | −2b | −2b < 2d for C = f + cq + dq² | Holds whenever b > 0 and d ≥ 0 |
A price taker needs rising marginal cost at the optimum. A firm with market power has more room, because its MR falls as output rises. MC may even slope down, as long as it slopes down more gently than MR does.
Example 1: a well-behaved case
Use the firm from the earlier chapters. Inverse demand is P = 100 − 2q and cost is C = 50 + 20q + q². Profit is π(q) = 80q − 3q² − 50, so π′ = 80 − 6q and π″ = −6. The second derivative is the same everywhere, so profit is concave and the single stationary point is the global maximum.
a, b = 100, 2
f, c, d = 50, 20, 1
q_star = (a - c) / (2 * b + 2 * d) # first-order condition: MR = MC
second = -2 * b - 2 * d # pi'' = MR' - MC' = -2b - 2d
print(round(q_star, 2), second)
# 13.33 -6
print("max" if second < 0 else "not a max")
# maxHere MR′ = −4 and MC′ = 2, so MR′ < MC′ holds at every output.
Example 2: a trap with two MR = MC points
Cost curves with a falling stretch of marginal cost can cross the price line twice. Take a price taker with P = 30 and cost C = 10 + 45q − 9q² + q³. Marginal cost is MC = 45 − 18q + 3q². Setting P = MC gives 3q² − 18q + 15 = 0, which factors as 3(q − 1)(q − 5) = 0. So q = 1 and q = 5 both satisfy MR = MC.
def profit(q):
return 30 * q - (10 + 45 * q - 9 * q**2 + q**3)
def d1(q): # pi'(q) = P - MC
return -15 + 18 * q - 3 * q**2
def d2(q): # pi''(q) = -MC'(q)
return 18 - 6 * q
print("q=0 profit:", profit(0))
# q=0 profit: -10
for q in (1, 5):
print(q, d1(q), d2(q), profit(q))
# 1 0 12 -17
# 5 0 -12 15Both points have a first derivative of zero. At q = 1 the second derivative is +12, so profit has a local minimum. The firm earns −17 there, which is worse than producing nothing (−10). At q = 5 the second derivative is −12, so profit has a local maximum of +15. The rule "produce where MR = MC" would have been wrong at q = 1. On the graph, MC is falling at q = 1 and rising at q = 5, and only the rising crossing is a maximum.
Checking numerically
When you cannot differentiate by hand, estimate π″ with a central second difference. For a smooth profit function with a small step h, (π(q+h) − 2π(q) + π(q−h)) / h² approximates π″(q).
def profit(q):
return 30 * q - (10 + 45 * q - 9 * q**2 + q**3)
def second_diff(fn, q, h=1e-3):
return (fn(q + h) - 2 * fn(q) + fn(q - h)) / h**2
print(round(second_diff(profit, 1), 2), round(second_diff(profit, 5), 2))
# 12.0 -12.0This matches the analytic values of +12 and −12.
A decision procedure
The last step uses the shutdown rule from a later chapter. A local maximum that earns a loss larger than the fixed cost is still beaten by closing.
Edge cases
- π″ = 0. The test is inconclusive. Examine higher derivatives or compare profit on both sides of q*. For example, π = −(q − 3)⁴ has π″(3) = 0 yet a clear maximum at q = 3.
- Local versus global. A negative π″ confirms only a local maximum. With several candidates, compare their profits, as in Example 2. If π″ < 0 everywhere (concave profit), the one stationary point is global, so no comparison is needed.
- Corner solutions. If MC exceeds MR at every q > 0, there is no interior stationary point and the best output is q = 0. The calculus conditions apply only to interior optima.
- Capacity limits. If MR > MC all the way up to a capacity limit, the optimum sits at the limit, where π′ may still be positive. The second-order test does not apply there either.
- Kinks and non-differentiable points. If MR or MC jumps, as with a kinked demand curve or step costs, π″ may not exist. Compare MR and MC on each side of the jump instead.
Summary of the test
- Find q* from MR = MC (the first-order condition).
- Compute π″(q) = MR′(q) − MC′(q*).
- If it is negative, q is a local maximum. If it is positive, q is a local minimum. If it is zero, test further.
- With several candidates, compare profits, including q = 0.
Exercise
A price taker faces P = 9 and has cost C = 4 + 18q − 6q² + q³. Find every output where MR = MC, use the second-order condition to classify each one, and state which output maximises profit.
Show answer
MC = 18 − 12q + 3q². Setting 9 = MC gives 3q² − 12q + 9 = 0, so q² − 4q + 3 = 0 and q = 1 or q = 3. Profit is π = 9q − C = −4 − 9q + 6q² − q³, so π″ = 12 − 6q. At q = 1, π″ = 6 > 0, a local minimum (profit −4 − 9 + 6 − 1 = −8). At q = 3, π″ = −6 < 0, a local maximum, with profit −4 − 27 + 54 − 27 = −4. Producing 3 units maximises profit. The loss equals the fixed cost, so the firm is indifferent between producing 3 units and shutting down.
Exercise
A firm faces P = 60 − 2q and has cost C = 30 + 10q + q². Show that π″ is negative everywhere, so the MR = MC output is the global maximum, and find that output.
Show answer
R = 60q − 2q², so MR = 60 − 4q. MC = 10 + 2q. Setting MR = MC gives 50 = 6q, so q = 8.33. The slopes are MR′ = −4 and MC′ = 2, so π″ = −4 − 2 = −6 < 0 at every q. Profit is concave, so q = 8.33 is the global maximum.