Optimization
Translate practical constraints into functions, then justify the best feasible choice using derivatives, endpoints and interpretation.
From a rate to a best choice
A derivative describes how an output changes. Optimization uses that information to decide which feasible input produces the greatest or least output. Before differentiating, identify what is being optimized and which choices are actually allowed.
Absolute and local extrema
Absolute extremum
An absolute maximum is a function value at least as large as every other value on the specified domain. An absolute minimum is at most as large as every other value on that domain.
The domain is part of the question. A locally best choice may be worse than an endpoint or a value on another part of the domain.
The same formula, different feasible choices
Find the absolute extrema of \(f(x)=x^2\) on [−1,2].
Show worked solution
The minimum is 0 at x=0. Comparing endpoint values gives f(−1)=1 and f(2)=4, so the maximum is 4 at x=2. On the entire real line there is still a minimum, but no maximum.
The closed-interval method
Extreme Value Theorem
A continuous real-valued function on a closed, bounded interval attains both an absolute maximum and an absolute minimum.
For a differentiable function, find interior critical numbers and evaluate the function at these and the endpoints. Include interior points where the derivative does not exist. Compare values, not derivative values.
Compare all candidates
Find the absolute extrema of \(f(x)=x^3-3x\) on [−2,3].
Show worked solution
| Candidate x | f(x) |
|---|---|
| −2 | −2 |
| −1 | 2 |
| 1 | −2 |
| 3 | 18 |
The absolute minimum −2 occurs at both −2 and 1. The absolute maximum 18 occurs at 3. The local maximum at −1 is not the absolute maximum.
A sharp minimum
Find the absolute extrema of \(f(x)=|x-2|\) on [0,5].
Hint
The derivative is undefined at 2, but the function is defined there.
Show worked solution
Evaluate f(0)=2, f(2)=0 and f(5)=3. The absolute minimum is 0 at 2; the absolute maximum is 3 at 5.
Do not ignore the boundary
When a best value is not attained
The closed-interval theorem gives sufficient conditions, not a conclusion for every domain. On an open or unbounded interval, study derivative signs and boundary behavior directly.
Approaching is not attaining
Does \(f(x)=x\) have an absolute maximum or minimum on (0,1)?
Show worked solution
Neither exists. Values can be arbitrarily close to 0 and 1, but these endpoints are excluded. Every permitted value has a smaller and a larger permitted value.
A minimum on an unbounded domain
Minimize \(f(x)=x+9/x\) for x>0.
Show worked solution
The derivative is negative on (0,3) and positive on (3,∞). Thus f decreases to x=3 and increases thereafter: its absolute minimum is f(3)=6. This sign argument establishes the global result.
Keep in mind
A positive second derivative at a stationary point establishes a local minimum. To claim an absolute minimum, also justify behavior over the entire feasible domain.
Build the model before differentiating
Objective and constraint
The objective is the quantity to maximize or minimize. A constraint restricts the feasible choices. Use constraints to express the objective in one variable when possible.
Name the variables and units, write the objective, apply the constraint, state the feasible domain, find candidates, justify the best one, and interpret it in the original setting.
A rectangular garden
A gardener has 40 m of fencing for all four sides of a rectangular garden. Which dimensions maximize its area?
Show worked solution
Let x and y be positive side lengths in meters. The constraint 2x+2y=40 gives y=20−x. Thus A(x)=x(20−x) for 0<x<20. Since A′=20−2x, area increases until x=10 and decreases afterward. The maximizing garden is 10 m by 10 m, with area 100 m².
Balancing opposing costs
A simplified annual batch cost is K(q)=400/q+q for q>0. The first term models setup costs spread over larger batches, while the second models holding cost. Choose q to minimize total cost.
Show worked solution
The derivative is negative for 0
Keep in mind
A transformed objective is useful only if it preserves ordering. Squaring a nonnegative distance and taking the logarithm of a positive objective preserve the optimizing inputs. Squaring a profit that can be negative does not: it can favor a large loss.
Revenue and price-demand models
Revenue model
If x units are sold at price p(x) per unit, total revenue is \(R(x)=xp(x)\). Specify the demand model’s valid domain.
Price affects how many units sell
A shop models demand by p(x)=120−0.5x dollars per unit, for 0≤x≤240. Choose x and the corresponding price to maximize revenue.
Show worked solution
Revenue increases up to x=120 and decreases after it. Both endpoints give zero revenue. Sell 120 units at $60 per unit for maximum revenue $7,200. Revenue does not subtract operating costs.
Read the decision correctly
In this model, does x=120 mean the recommended price is $120?
Hint
Check how x was defined.
Show worked solution
No. It means 120 units. Substitute into p(x) to obtain the price $60.
Profit includes cost
Profit
\(P(x)=R(x)-C(x)\), where revenue and cost refer to the same quantity of output and time period.
A different best quantity
For the same demand p(x)=120−0.5x, total cost is C(x)=1,000+20x dollars. Maximize profit on 0≤x≤240.
Show worked solution
Profit increases before x=100 and decreases afterward. At 100 units the price is $70 and profit is $4,000. Endpoint profits are −$1,000 and −$5,800. The profit-maximizing quantity differs from the revenue-maximizing quantity because additional units also incur cost.
Keep in mind
An interior stationary profit satisfies marginal revenue = marginal cost. This equality identifies a candidate; derivative signs or another valid global argument must still justify the maximum.
Geometric constraints and units
Fence three sides along a river
A farmer has 120 m of fence for a rectangular field beside a straight river. The river side needs no fence. Find the dimensions of largest area.
Show worked solution
Let x be each perpendicular side and y the side parallel to the river. Then 2x+y=120, so A=x(120−2x), with 0<x<60. A′=120−4x changes from positive to negative at x=30. Thus y=60 and the maximum area is 1,800 m².
An open box from a square sheet
Cut equal squares of side x cm from each corner of a 30 cm square sheet and fold up the sides. Maximize the box volume.
Show worked solution
The interior critical number is x=5. The derivative is positive on (0,5) and negative on (5,15), so it gives the absolute maximum. The box is 20 cm by 20 cm by 5 cm, with volume 2,000 cm³. The value x=15 would collapse the base and is excluded.
A rectangular sheet gives two algebraic candidates
Cut squares from the corners of a 14 cm by 10 cm sheet to make an open box. Find the cut size giving maximum volume.
Show worked solution
Only x=4−√39/3≈1.918 cm is feasible. The derivative is positive before this value and negative afterward within (0,5). Thus it gives the absolute maximum. The other root is outside the permitted interval and cannot describe a box.
Build the largest river field
Discrete choices and model limitations
Calculus typically treats the decision variable as continuous. If the real decision requires whole units, use the continuous solution to identify nearby integer candidates and compare their actual objective values.
Choose a whole number of units
A production model gives \(P(x)=-2x^2+43x-100\) dollars for integer output 0≤x≤20. What output maximizes profit?
Show worked solution
The continuous maximum is at x=43/4=10.75. Compare P(10)=130 and P(11)=131. Because the parabola rises to 10.75 and falls after it, other integers are worse. Choose 11 units.
Keep in mind
A mathematically optimal answer is conditional on the model. Capacity, minimum order sizes, demand uncertainty and excluded costs can change the practical decision. State the assumptions with the recommendation.
References
Raymond A. Barnett, Michael R. Ziegler, Karl E. Byleen and Christopher J. Stocker, Calculus for Business, Economics, Life Sciences, and Social Sciences, 14th Global Edition, chapters on limits, differentiation and applications. Mark D. Tomenes, Applied Calculus for Business and Economics I, teaching notes and assessment materials (2025–2026).
Further reading: Gilbert Strang and Edwin Herman, Calculus, Volume 1, OpenStax, chapters 2–4.
