MATH 250 · Mathematics for Economics II
Second-Order Conditions, Concavity and Convexity
Sort peaks from valleys and saddles with a short test on the second partial derivatives, and learn when a flat spot is a global best.
Key takeaways
- The second-order test uses the second partial derivatives. For two variables, the key number is D = f_xx × f_yy − (f_xy)².
- If D > 0 and f_xx < 0, the point is a local maximum. If D > 0 and f_xx > 0, it is a local minimum.
- If D < 0, the point is a saddle. If D = 0, the test is silent.
- A concave function curves downward everywhere; a critical point of a concave function is a global maximum.
- A convex function curves upward everywhere; a critical point of a convex function is a global minimum.
You are hiking in fog. Your altimeter says the ground is flat under your feet: no uphill, no downhill. Are you on a summit? In a hollow? Or on a pass between two peaks? The flat reading alone cannot tell you. You need one more fact: how the ground curves around you.
That is the job of second-order conditions. Last lesson, you set every first partial derivative to zero and found flat spots. This lesson gives the test that says what each flat spot is. It also introduces concavity and convexity, two shapes that make life easy, because for them a flat spot is always the global best.
The one-variable warm-up
With one variable, you already know the test. If f′(x) = 0 and f″(x) < 0, the slope is falling through zero, which is the top of a hill. If f″(x) > 0, the slope is rising through zero, so it is the bottom of a bowl. The second derivative measures curvature.
Two shapes get names. A function is concave if the curve bends downward, so a straight line (a chord) joining any two points on it lies below the curve. It is convex if it bends upward, so every chord lies above the curve. For example, f = −0.4x² + 4x has f″ = −0.8, always negative, so it is concave, with its peak at x = 5 where f = 10. And g = 0.4x² − 4x + 10 has g″ = +0.8, so it is convex, with its lowest point at x = 5 where g = 0.
With two or more variables, curvature has several directions at once. The ground may curve down north to south and up east to west. So we need a test built from all the second partials, which we met in the partial derivatives lesson.
The two-variable test
Compute the second partials at the critical point: f_xx, f_yy and the cross partial f_xy. Combine them into one number:
D = f_xx × f_yy − (f_xy)² Think of D as asking whether the curvatures in the two main directions agree and are strong enough to beat the twist from the cross term. Then:
- D > 0 and f_xx < 0: local maximum (curves down in all directions).
- D > 0 and f_xx > 0: local minimum (curves up in all directions).
- D < 0: saddle (curves up one way and down another).
- D = 0: inconclusive. Check by other means.
Worked example: Maya's peak
Maya's profit from last lesson was π = 40x + 50y − x² − y² − xy, with a critical point at (10, 20). The second partials come from π_x = 40 − 2x − y and π_y = 50 − 2y − x:
π_xx = −2
π_yy = −2
π_xy = −1 (derivative of 40 − 2x − y with respect to y)
D = (−2)(−2) − (−1)² = 4 − 1 = 3 D = 3 > 0 and π_xx = −2 < 0. So it is a local maximum. The second partials here are constants, so the same holds everywhere: Maya's profit surface is a single smooth dome. The peak is the global maximum, not just a local one.
Worked example: a saddle by strong interaction
Now change the cross term. Suppose the cart's profit were π = 40x + 50y − x² − y² − 3xy, where the two drinks fight over customers three times as hard. First-order conditions:
π_x = 40 − 2x − 3y = 0
π_y = 50 − 2y − 3x = 0 From the first, x = (40 − 3y) ÷ 2. Substitute: 50 − 2y − 1.5 × (40 − 3y) = 0, so 50 − 2y − 60 + 4.5y = 0, so 2.5y = 10 and y = 4. Then x = (40 − 12) ÷ 2 = 14. Check the second condition: 50 − 8 − 42 = 0. It works. Profit at (14, 4) is 560 + 200 − 196 − 16 − 168 = 380.
Second partials: π_xx = −2, π_yy = −2, π_xy = −3. So D = 4 − 9 = −5 < 0. Saddle! Verify with neighbors: at (15, 3), profit is 600 + 150 − 225 − 9 − 135 = 381, higher than 380. At (15, 5): 600 + 250 − 225 − 25 − 225 = 375, lower. Profit rises in one direction and falls in another. The flat spot is no summit. A manager who stopped at the first-order conditions would be sure of a best plan that is not best at all.
The lesson: the cross term can overpower the individual curvatures. Even though each drink alone has diminishing returns (π_xx and π_yy are negative), the strong interaction twists the surface into a saddle.
Own curvatures multiplied, minus the cross effect squared.
Concave and convex in several variables
The idea of a chord below the surface carries over. A function of several variables is concave if the surface has no dents: every straight line segment between two points on it lies on or below the surface. It is convex if every segment lies on or above.
For two variables with constant second partials, as in a quadratic, the test becomes simple. The function is concave if f_xx ≤ 0, f_yy ≤ 0 and D ≥ 0. Convex if f_xx ≥ 0, f_yy ≥ 0 and D ≥ 0. Maya's original profit passes the first test (−2, −2, D = 3), so it is concave. The saddle version fails, since D = −5, so it is neither concave nor convex.
Why do economists care? Because of the payoff:
- If the objective is concave, any critical point is a global maximum. You do not need to check the neighborhood or hunt for other peaks.
- If the objective is convex, any critical point is a global minimum.
That is a huge convenience. Firms with a concave profit function can find the best plan by solving the first-order conditions alone. Models in economics are often built with concave utility and convex cost on purpose: it guarantees that the first-order conditions give the answer. In a later lesson, Lagrange multipliers will use the same curvature ideas when a budget limits the choice.
Local is not always global
A critical point that passes the test is a local maximum or minimum, the best among its neighbors. Whether it is also the best everywhere depends on the shape of the whole function. A one-variable example shows the danger. Take f(x) = x³ − 3x. Then f′ = 3x² − 3, which is zero at x = −1 and x = 1. The second derivative is f″ = 6x. At x = −1, f″ = −6 < 0, so it is a local maximum with f = −1 + 3 = 2. At x = 1, f″ = 6 > 0, so it is a local minimum with f = 1 − 3 = −2. But the function keeps rising without limit as x grows, and falling without limit as x shrinks, so neither point is a global best. This function is neither concave nor convex, since f″ changes sign.
That is why concavity is such a gift. Without it, you must compare every local peak and also check the edges. With it, one critical point settles the matter.
A cost-minimizing check
Let's run the test on a cost problem. A workshop's weekly cost, in hundreds of dollars, of running x machines and hiring y workers is
C(x, y) = 2x² + 3y² + xy − 19x − 22y + 100 (The squared terms are congestion, the −19x and −22y terms are savings that come from producing more, and the xy term is a small interaction.) First-order conditions:
C_x = 4x + y − 19 = 0
C_y = 6y + x − 22 = 0 From the first, y = 19 − 4x. Substitute: 6(19 − 4x) + x − 22 = 0, so 114 − 24x + x − 22 = 0, so 23x = 92 and x = 4. Then y = 19 − 16 = 3. Check: 18 + 4 − 22 = 0. Good.
Second partials: C_xx = 4, C_yy = 6, C_xy = 1, so D = 4 × 6 − 1² = 23. D > 0 and C_xx > 0, so a local minimum. Because these second partials are constants, the same signs hold everywhere, so the function is convex and this is the global minimum. Cost there: 2 × 16 + 3 × 9 + 12 − 76 − 66 + 100 = 32 + 27 + 12 − 76 − 66 + 100 = 29. Check neighbors: at (5, 3) the cost is 50 + 27 + 15 − 95 − 66 + 100 = 31, and at (4, 4) it is 32 + 48 + 16 − 76 − 88 + 100 = 32. Both are higher than 29.
For a firm, the global claim matters. The manager does not need to wonder whether a cheaper plan hides somewhere else. The answer is 4 machines and 3 workers, at a cost of 29 hundred dollars.
A quick table for the two-variable test.
When the test is silent
Sometimes D = 0. Take f(x, y) = x⁴ + y⁴. The first partials are 4x³ and 4y³, so the origin is a critical point. All second partials are 12x² and 12y², which are zero at the origin, so D = 0. The test says nothing. Yet the origin is clearly a minimum, because f is a sum of fourth powers, never negative, and zero only at the origin. When D = 0, you must examine the function directly, as we just did.
A common mistake
The most common slip is forgetting to square the cross partial. D = f_xx × f_yy − (f_xy)², not minus f_xy. If f_xy = −3, then (f_xy)² = 9, positive. Dropping the square flips the sign and yields nonsense.
A second slip: testing only f_xx and f_yy. A student sees both negative and shouts "maximum." In the saddle example, both were −2, but the cross term sank the test. Always compute D.
A third: using the test at a point that is not critical. The test classifies flat spots only. If the first partials are not zero, the second-order test has nothing to say.
Words to know
Second-order condition a test on second derivatives that tells whether a critical point is a peak, valley or saddle.
Curvature how fast the slope of a function changes; measured by second derivatives.
Concave function a function whose graph bends downward, with chords lying on or below it.
Convex function a function whose graph bends upward, with chords lying on or above it.
Local maximum a point higher than all its neighbors, though maybe not the highest overall.
Global maximum the highest point of the whole function.
Saddle point a critical point that is a peak in some directions and a valley in others.
Check yourself
- For f = 12x + 8y − x² − 2y², find f_xx, f_yy, f_xy and D. What kind of critical point does it have?
- Classify the critical point of g = x² + y² + 4xy.
- For C = x² + y² − 4x − 6y + 20, find D and say whether it is a minimum.
- A manager says "both own second partials are negative, so we have a maximum." Give a reason this can fail.
- Why does concavity make the first-order conditions enough for a global maximum?
- For h = x⁴ + y⁴, why does the second-order test fail at the origin, and how do we still classify it?
Show the answers
- f_xx = −2, f_yy = −4, f_xy = 0, so D = (−2)(−4) − 0 = 8 > 0 with f_xx < 0: a maximum (at x = 6, y = 2).
- The critical point is (0, 0); g_xx = 2, g_yy = 2, g_xy = 4, so D = 4 − 16 = −12 < 0: a saddle.
- C_xx = 2, C_yy = 2, C_xy = 0, so D = 4 > 0 with C_xx > 0: a minimum, at (2, 3).
- A large cross partial can make D negative (for example −2 and −2 with cross −3 gives D = −5), which turns the point into a saddle.
- A concave surface lies below its tangent plane everywhere, and at a critical point that plane is flat, so no point can be higher.
- All second partials are zero at the origin, so D = 0 and the test is silent; but x⁴ + y⁴ ≥ 0 with equality only at the origin, so it is a minimum.