AP® CALCULUS AB & BC · UNIT 5
Introduction to Optimization Problems
Turn a constraint into a one-variable objective. Use derivatives and feasible endpoints to find the best dimensions, smallest cost, or largest value.

1. Identify the objective and constraint
An optimization problem asks for the largest or smallest value of a quantity among the choices that satisfy a constraint. In AP Calculus, write the quantity as a function of one variable, then use the derivative and the feasible domain to justify an absolute extremum.
Objective
The quantity you want to maximize or minimize, such as area, surface area, distance, or profit.
Constraint
A relationship or limit that every allowed choice must satisfy, such as a fixed perimeter or a maximum width.
Decision variable
The input you can choose. Define it with units and write the other dimensions in terms of it.
Feasible domain
All input values allowed by the situation. Check which boundaries represent valid choices.
Report the requested inputs and the resulting value separately. For a fencing problem, the best width is an input measured in feet, and the maximum area is an output measured in square feet.
2. Use a seven-step optimization method
- Identify the goal. Name the quantity to maximize or minimize. Sketch the setup when it helps identify a relationship.
- Define the variables. Assign each variable a meaning and units.
- Write the objective. Use a formula for the quantity the question asks you to optimize.
- Write the constraint. Use the stated relationship, such as a fixed sum, perimeter, volume, or distance from a boundary.
- Reduce to one variable. Substitute using the constraint. Determine the feasible domain from the original problem.
- Find and justify the optimum. For an objective , solve in the interior and include feasible interior inputs where the derivative is undefined. Check included endpoints or analyze derivative signs and limits across the domain.
- Answer in context. Recover any other dimensions, give units, and check the original constraint.
If the objective is continuous on a closed bounded interval , an absolute maximum and minimum exist. Evaluate the objective at each interior critical input and at and . Compare those values.
On open or unbounded domains, analyze behavior across the whole domain. A change from increasing to decreasing over the two sides of a candidate proves an absolute maximum there. A change from decreasing to increasing over the two sides proves an absolute minimum. A local derivative test alone establishes local behavior.
3. Read the feasible interval on a graph
Both graphs use the area model for a garden with feet of fencing. They use the same horizontal and vertical scales. The second garden has a width cap of feet, so its feasible curve stops at that width.
Fence length sets the domain
An included width cap
Determine the feasible interval before choosing a candidate. A derivative of zero inside the unrestricted model can fall outside the domain in a specific situation.
4. Four worked examples
Maximize area with a fixed perimeter
A farmer has feet of fencing to enclose all four sides of a rectangular garden. Find the dimensions that maximize its area and give the maximum area.
1 · Write the objective and the fence equation
Let and be the length and width in feet.
Solving the constraint gives . Both sides must be positive, so .
2 · Find the critical width and justify the maximum
The derivative is zero at . It is positive for and negative for . The area rises up to and falls after it, so the maximum is absolute.
The formula extends to the boundaries for comparison. Those limiting cases give zero area.
| Width (ft) | Area () | Role |
|---|---|---|
| Excluded boundary | ||
| Feasible maximum | ||
| Excluded boundary |
3 · Recover the dimensions and area
The constraint gives . The best dimensions are by .
Minimize the surface area of a closed can
A closed cylinder must hold . Find the radius and height that minimize its total surface area.
1 · Use the fixed volume to find the height
Let and be the radius and height in centimeters. The volume condition makes a function of .
Every gives a positive height.
2 · Write the surface area as one function
The two circular ends contribute . The side contributes .
3 · Solve and check both sides of the candidate
Set . Multiplying by gives .
The sign of is the sign of because . The surface area decreases before this radius and increases after it throughout the feasible domain. This gives the absolute minimum.
4 · Recover the height from the volume constraint
Use the cubic relation to simplify the height.
The radius is about and the height is about . At the minimum, the height equals the diameter.
Surface area versus radius
Maximize a product with a fixed sum
Find the two positive numbers whose sum is and whose product is as large as possible.
1 · Use the fixed sum
If the first number is , the second is . Positivity gives .
This is the same fixed-sum structure as the rectangular garden. Each factor is positive and one falls as the other rises.
2 · Read the signs across the whole interval
The derivative is positive before and negative after on the feasible interval. The absolute maximum occurs at .
3 · State both numbers and their product
The second number is also , so the largest product is .
Product versus the first number
Maximize area with a width cap
Use the -foot fence again. The site can accommodate a width of at most feet. Find the best dimensions.
1 · Restrict the domain
The area formula is still , and now . A width of feet is permitted.
2 · Check the sign of the derivative on that domain
This derivative is positive throughout the interior of the feasible interval. The area increases up to the included endpoint .
3 · Evaluate the included endpoint
The length is . The dimensions by give the largest feasible area.
5. Recognize common optimization models
| Situation | Objective and constraint |
|---|---|
| Fixed fence | Maximize . A perimeter equation gives one side in terms of the other. |
| Fixed volume | Minimize surface area. Use the volume equation to eliminate the height. |
| Profit or revenue | Revenue is price times quantity, . For profit use and express price and cost in terms of quantity. |
| Closest point | Use the curve equation to write both coordinates with one input, then minimize squared distance. |
| Inscribed shape | Use a geometric relationship to express height in terms of width. Common constraints come from circles and similar triangles. |
| Time or cost | For a constant-speed leg use . Express the distances using the route constraint. |
Distance is nonnegative, and squaring preserves the order of nonnegative numbers. Minimizing squared distance therefore gives the same closest point and often a simpler derivative.
6. Use the geometry formulas
| Shape | Useful formulas |
|---|---|
| Rectangle | |
| Circle | |
| Triangle | |
| Closed box | |
| Closed cylinder | |
| Sphere | |
| Cone with base | , with slant height |
For a container, count the faces that are present. An open-top box omits the top face from its surface area. For distance between and , the squared distance is
7. Seven practice questions
1. Product with a sum of twenty
Find two positive numbers with sum and the largest possible product.
Show solution 1
1 · Eliminate the second number
Set with . Then .
2 · Use the derivative sign
The derivative changes from positive to negative at , across the whole feasible interval. The two numbers are both , giving product .
2. Area with a forty-centimeter perimeter
Find the dimensions and maximum area of a rectangle with perimeter .
Show solution 2
1 · Express the area using the width
The constraint gives , so on .
2 · Find the peak
changes from positive to negative at . The dimensions are by , with area .
3. Closest point on a line
Find the point on the line closest to the origin.
Show solution 3
1 · Use squared distance as the objective
The coordinates are . The feasible values of are all real numbers.
2 · Find the minimizing input and recover the point
The derivative changes from negative to positive at . The closest point is .
Closest point and perpendicular segment
4. Material for an open-top box
A box with a square base and open top must have volume . Find the dimensions that minimize its surface area.
Show solution 4
1 · Count the base and four sides
Let be the side of the base and the height, both in centimeters. The volume is , so for .
2 · Solve the derivative equation
Its sign comes from , which increases through zero at . The area falls and then rises, so the absolute minimum is at this base width. The height is , and the base is by .
5. Fencing along a river
A farmer uses meters of fence for three sides of a rectangle. The river forms the fourth side. Find the dimensions that maximize area.
Show solution 5
1 · Use the correct fence constraint
Let be the distance perpendicular to the river and the side parallel to it, in meters. Then and .
2 · Find the dimensions at the maximum
changes from positive to negative at . Use . The best dimensions are perpendicular and parallel, with area .
6. Largest rectangle in a semicircle
A rectangle has its base on the diameter of a semicircle of radius , with its upper corners on the arc. Find the dimensions that maximize its area.
Show solution 6
1 · Use the half-width in the circle equation
Let be the half-width. The height is , and .
2 · Optimize squared area on the feasible interval
The area is positive, so it is largest where its square is largest.
The derivative switches from positive to negative at . The width is , and the height is .
Rectangle at the maximum
7. Minimum poster area
A poster must have of print area. It has margins at the top and bottom and margins on each side. Find the total poster dimensions that minimize area.
Show solution 7
1 · Distinguish print dimensions from poster dimensions
If the print width is , the print height is . Add both margins in each direction.
2 · Use the sign change and add the margins back
The derivative is negative for and positive for . The print area should be by . The total poster is by .
8. Write an AP-style justification
Show how the constraint produces a one-variable objective. Include the domain, the derivative, and a reason the chosen point is best among all feasible choices. A sign change near a candidate gives a local conclusion. Sign information over the full feasible domain or comparison of all closed-interval candidates gives a global conclusion.
Make the absolute conclusion explicit
Give the relevant signs
For the -foot fence, on and on .
Use the entire feasible interval
Area increases up to and decreases afterward throughout . Therefore is the absolute maximum area, and the constraint gives the other side.
- Check the units for both the input and the objective. Length, area, and volume use different units.
- Substitute the final dimensions back into the original constraint.
- For excluded boundaries, use limits to describe the behavior as the input approaches them.
- For an integer-only model, compare allowed integer inputs. If the continuous objective rises to one peak and then falls throughout the domain, compare the closest feasible integer on each side of that peak.
9. Frequently asked questions
Can an endpoint give the absolute maximum?
Yes. If the endpoint is included, compare its objective value with the other candidates. The capped garden reaches its largest area at the allowed width .
What if the derivative is undefined at a feasible input?
If the objective is defined there and the input is interior, it is a critical candidate. Compare its value with the other candidates or check the signs on the surrounding intervals.
Does the Second Derivative Test prove an absolute extremum?
The test classifies local behavior at a stationary input. To establish an absolute extremum, compare all candidates on a closed bounded interval or justify the behavior over the entire feasible domain.
Why check dimensions after finding a critical input?
The input often represents only one dimension. Use the original constraint to recover the others and check that they satisfy the problem.
10. Continue studying calculus
Review the Candidates Test for a closed interval, then use the same setup and justification in the applied problems in Topic 5.11.