Teaching Notes · Math for Social Sciences

Math for Social Sciences

Optimization: Finding the Best Possible Outcome

This is the section every social science student eventually realizes is the real reason the course exists. Up to this point the derivative has measured slope, rate of change, and marginal cost or revenue. Optimization turns that measurement into a method: a reliable way to find the production level, price, or quantity that makes a cost as low as possible or a profit as high as possible. The method itself depends on reading nothing more than the sign of the first derivative, and then the sign of the second.

Reading the sign of the derivative

A function is increasing on an interval where its tangent slopes are positive, and decreasing where they are negative. Formally, f is increasing on an interval if f'(x) > 0 throughout it, and decreasing if f'(x) < 0 throughout it. For f(x) = x², the derivative is f'(x) = 2x, which is negative for every x below 0 and positive for every x above 0, so the function is decreasing on the interval running up to 0 and increasing on the interval beyond it, exactly matching the familiar downward then upward shape of a parabola around its lowest point.

Critical numbers and where to look

A critical number of f is a value c where f'(c) = 0, or where f'(c) is undefined, and these are the only points where a function can switch from increasing to decreasing or back again. The standard procedure is to find f', solve f'(x) = 0 and note any values where f' is undefined, then test the sign of f' on each interval these critical numbers create.

For f(x) = x³ − (3/2)x², the derivative is f'(x) = 3x² − 3x, which factors as 3x(x − 1), giving critical numbers at x = 0 and x = 1. Testing a value in each of the three resulting intervals shows the pattern:

Interval(−∞, 0)(0, 1)(1, ∞)
Test valuex = −1x = 1/2x = 2
Sign of f'(x)positivenegativepositive
Conclusionincreasingdecreasingincreasing

so the function rises, then falls between the two critical numbers, then rises again, a shape that already hints at a local peak at x = 0 and a local valley at x = 1.

The first derivative test

That hint can be made precise. If f'(x) changes from positive to negative at a critical number c, f(c) is a relative (local) maximum; if it changes from negative to positive, f(c) is a relative minimum; if the sign does not change, c is neither. For f(x) = 2x³ − 3x² − 36x + 14, the derivative is f'(x) = 6x² − 6x − 36, which factors as 6(x − 3)(x + 2), giving critical numbers at x = −2 and x = 3. Testing the three resulting intervals shows f' positive on (−∞, −2), negative on (−2, 3), and positive again on (3, ∞). Since f' switches from positive to negative at x = −2, that point is a relative maximum; since it switches from negative to positive at x = 3, that point is a relative minimum.

−4 −2 2 4 6 −80 −40 0 40 relative maximum (−2, 58) relative minimum (3, −67) f(x) = 2x³ − 3x² − 36x + 14
Figure. The graph of f(x) = 2x³ − 3x² − 36x + 14, rising to a relative maximum at x = −2, falling to a relative minimum at x = 3, then rising again, exactly the pattern the sign of f′ predicted.

Absolute extrema on a closed interval

A relative maximum or minimum only describes behavior nearby; a business decision usually needs the single best value over an entire allowed range, the absolute (or global) maximum or minimum. The Extreme Value Theorem guarantees that any function continuous on a closed interval [a, b] actually attains both an absolute minimum and an absolute maximum somewhere on that interval. Finding them only takes three steps: evaluate f at every critical number that falls inside (a, b), evaluate f at the two endpoints a and b, and compare; the smallest value found is the minimum, the largest is the maximum.

For f(x) = x² − 6x + 2 on the interval [0, 5], the derivative f'(x) = 2x − 6 is zero at x = 3, the only critical number, and it falls inside the interval. Evaluating f at that critical number and at both endpoints gives f(3) = −7, f(0) = 2, and f(5) = −3. Comparing the three, the maximum value on this interval is 2, occurring at x = 0, and the minimum is −7, occurring at x = 3, settled by nothing more than three function evaluations.

The second derivative test

There is a faster way to classify a critical number than tracking the sign of f' on either side of it, provided the second derivative is easy to compute. If f'(c) = 0, then f(c) is a relative minimum when f''(c) > 0, a relative maximum when f''(c) < 0, and the test gives no answer at all when f''(c) = 0, in which case the first derivative test has to be used instead.

For f(x) = x³ − 5x² + 7x, the derivative f'(x) = 3x² − 10x + 7 factors as (3x − 7)(x − 1), giving critical numbers at x = 7/3 and x = 1. The second derivative is f''(x) = 6x − 10. At x = 7/3, f''(7/3) = 14 − 10 = 4, which is positive, so f has a relative minimum there, with value f(7/3) = 49/27. At x = 1, f''(1) = 6 − 10 = −4, which is negative, so f has a relative maximum there, with value f(1) = 3.

Three business problems, solved the same way every time

Every optimization problem in business follows the same pattern: write down the quantity to be maximized or minimized as a function of one variable, differentiate it, find the critical numbers, discard any that make no economic sense (a negative production level, for instance), and confirm the remaining one with the second derivative test. Three worked examples show how little actually changes from one business setting to the next.

Maximizing revenue. A company models its total revenue as R = −x³ + 450x² + 52,500x, where x is the number of units produced and sold. Differentiating gives R' = −3x² + 900x + 52,500, which factors as −3(x + 50)(x − 350), so the critical numbers are x = −50 and x = 350. A production level of −50 is meaningless, so it is discarded, leaving x = 350. Checking the second derivative, R''(x) = −6x + 900, gives R''(350) = −1200, which is negative, confirming that a production level of 350 units yields the maximum possible revenue.

Minimizing average cost. A company estimates the total cost of producing x units as C = 800 + 0.04x + 0.0002x². The average cost per unit is C̄ = C/x = 800/x + 0.04 + 0.0002x. Differentiating, C̄' = −800/x² + 0.0002, and setting this to zero gives x² = 800/0.0002 = 4,000,000, so x = ±2000. The negative root is discarded, leaving x = 2000. The second derivative, C̄'' = 1600/x³, is positive at x = 2000, confirming that producing 2000 units minimizes the average cost per unit.

Maximizing profit from a demand curve. A business finds that demand for its product follows p = 50/√x, while the cost of producing x units is C = 0.5x + 500. Revenue is R = xp = x·(50/√x) = 50√x, so profit is P = R − C = 50√x − 0.5x − 500. Differentiating, P' = 25/√x − 0.5, and setting this to zero gives √x = 50, so x = 2500. Checking confirms P''(2500) is negative, so x = 2500 is indeed the production level that maximizes profit, and at that volume the price works out to p = 50/√2500 = 1 per unit, a single price figure that falls directly out of the same three line procedure used in both examples above.

The pattern across all three problems is the whole point: optimization is not three separate techniques for revenue, cost, and profit, but one technique, applied to whichever function happens to represent the quantity a business actually wants to control.

Source: lecture notes for an introductory calculus course for the social sciences, covering increasing and decreasing functions, critical numbers, the first derivative test, absolute extrema on a closed interval, the second derivative test, and three worked problems on optimization in business and economics.

Keywords: first derivative test second derivative test critical numbers calculus absolute extrema closed interval optimization in business maximizing revenue calculus