Calculus Optimization Problems
Single-Variable Calculus: Optimization
Optimization means finding the largest or smallest possible value of some quantity while obeying given conditions. In everyday terms, it is the mathematics of making something as large, small, efficient, or inexpensive as possible.
Many optimization problems involve geometric quantities such as area, perimeter, volume, or surface area. The main challenge is often not taking a derivative; it is translating the situation into equations that describe what can vary and what must stay fixed.
A reliable method for optimization
A useful way to organize an optimization problem is to identify two things:
- What is known? These are the conditions or constraints that the solution must satisfy.
- What is wanted? This is the quantity to maximize or minimize, called the objective function.
The objective function may initially depend on several variables. A derivative is most useful when the objective has been rewritten in terms of just one variable. The constraint equation usually allows one variable to be replaced by another.
A typical solution proceeds as follows:
- Draw and label a diagram when the problem describes a shape.
- Write the constraint equation from the information that must remain fixed.
- Write a formula for the quantity to optimize.
- Use the constraint to rewrite that formula in one variable.
- Find critical numbers by setting the derivative equal to zero or checking where it is undefined.
- Determine whether a critical number gives a maximum or minimum.
- Check that the result is physically meaningful and lies in the allowed domain.
- Substitute back to find all requested dimensions.
A critical number is a value in the domain where the derivative is zero or does not exist. A critical number is a candidate for an optimum, not automatically the answer. The derivative tests and the physical context help determine its role.
If f′(c)=0 and f′′(c)>0, the graph is concave up at c, so f has a local minimum there. If f′(c)=0 and f′′(c)<0, the graph is concave down, so f has a local maximum there. The first derivative test instead examines whether the derivative changes sign: a change from positive to negative indicates a maximum, while a change from negative to positive indicates a minimum.
A sound optimization solution connects three pieces: the physical situation, the constraint, and the one-variable objective function.
Fixed area and the smallest perimeter
Suppose a rectangle must have area 1000 square meters, and the goal is to make its perimeter as small as possible.
Let its side lengths be x and y. The known area gives the constraint
xy=1000.The perimeter is
P=2x+2y.The perimeter depends on two variables, but the area constraint allows one to be expressed in terms of the other:
y=x1000.Substitution gives a one-variable objective:
P(x)=2x+x2000,x>0.The derivative is
P′(x)=2−x22000.Setting the derivative equal to zero gives
2−x22000=0,x2=1000.Side lengths must be positive, so
x=1000=1010.To confirm that this critical number gives a minimum, calculate the second derivative:
P′′(x)=x34000.This is positive for every positive x, including x=1010. Therefore, the perimeter has a minimum at that value. The other side is
y=10101000=1010.Thus the rectangle with the smallest perimeter is a square, with dimensions
1010 m by 1010 m.This result illustrates a useful geometric principle: among rectangles with a fixed area, a square has the smallest perimeter.
Think About It
Why does the area constraint let the perimeter be written using only one variable?
A field beside a river: largest area with limited fencing
Now suppose a farmer has 2400 feet of fencing and wants to enclose a rectangular field beside a straight river. The river forms one side of the rectangle, so that side does not need fencing. The goal is to make the enclosed area as large as possible.
Let x be the length of each side perpendicular to the river, and let y be the side parallel to the river that needs fencing. Only three sides require fencing, so the constraint is
2x+y=2400.The area is
A=xy.Solving the constraint for y gives
y=2400−2x.Therefore,
A(x)=x(2400−2x)=2400x−2x2.Differentiate and find the critical number:
A′(x)=2400−4x, 2400−4x=0⟹x=600.The second derivative is
A′′(x)=−4<0,so the area is maximized at x=600. The remaining fenced side is
y=2400−2(600)=1200.The field should therefore have dimensions
600 ft by 1200 ft.The river matters because it changes the constraint: the farmer needs fencing on only three sides, not four. That is why the optimal rectangle is not found by treating the fencing as a full perimeter.
A poster with fixed printing area: smallest total area
Consider a rectangular poster whose printed region must have area 384 square centimeters. The margins are 4 centimeters on each side and 6 centimeters at the top and bottom. The goal is to minimize the total area of the poster.
Let x and y be the width and height of the printed region. Its fixed area gives
xy=384,y=x384.The poster itself is larger than the printed region because of the margins. Its overall width is x+8, and its overall height is y+12. Thus the total area is
A=(x+8)(y+12).Substitute y=384/x:
A(x)=(x+8)(x384+12).Expanding makes differentiation straightforward:
A(x)=480+12x+x3072.The derivative is
A′(x)=12−x23072.Setting this equal to zero gives
12−x23072=0,x2=256.Since a width is positive, x=16. The second derivative is
A′′(x)=x36144>0for positive x, so this critical number gives a minimum. The printed region’s height is
y=16384=24.The requested dimensions are the dimensions of the whole poster, not just its printed region. Adding the margins gives
x+8=24,y+12=36.The poster should measure
24 cm by 36 cm.This problem highlights an important modeling detail: the quantity being optimized is the area of the entire poster, while the fixed-area condition applies only to the printed portion.
Think About It
In the poster problem, why would using x and y directly as the poster’s dimensions produce the wrong objective function?
A rectangle beneath a parabola: largest area
A rectangle has its base on the x-axis, and its two upper vertices lie on the parabola
y=12−x2.The aim is to find the rectangle with the largest area.
Because the parabola is symmetric about the y-axis, the rectangle can be described using its right upper vertex (x,y). The left upper vertex is then (−x,y). Here, x is only half the rectangle’s width, so the full width is 2x. The height is y=12−x2. Thus the area is
A=2xy=2x(12−x2).In one variable,
A(x)=24x−2x3.The rectangle has positive height only when 12−x2>0, so the relevant values satisfy 0<x<12. Differentiate:
A′(x)=24−6x2.The critical point satisfies
24−6x2=0,x2=4.The positive value is x=2. The second derivative is
A′′(x)=−12x,so A′′(2)=−24<0: the area has a maximum there. The height is
y=12−22=8.Since x is half the width, the full width is 2x=4. The rectangle’s dimensions are therefore
4 by 8.The distinction between the half-width and the full width is essential. The coordinate x=2 locates a top corner; it is not the rectangle’s entire base.
A cylinder inscribed in a sphere: largest volume
A right circular cylinder is placed inside a sphere of radius 4. The goal is to find the cylinder’s largest possible volume.
A cross-section through the sphere’s center and the cylinder’s axis forms a circle of radius 4. Let x be the cylinder’s radius and let y be half its height. The sphere’s cross-section satisfies
x2+y2=16.Thus
y=16−x2.The cylinder’s full height is 2y, so its volume is
V=πx2(2y).Substituting for y gives
V(x)=2πx216−x2,0≤x≤4.The square root appears because the sphere’s equation relates the cylinder’s radius to its half-height. The full height must be twice the half-height, which accounts for the factor of 2.
Differentiating by the product rule and chain rule gives
V′(x)=16−x264πx−6πx3.For interior values of the domain, the denominator is positive. The derivative is zero when its numerator is zero:
64πx−6πx3=0, 2πx(32−3x2)=0.The value x=0 gives a degenerate cylinder with zero volume. The relevant critical value instead satisfies
3x2=32,x=332.For positive x, the derivative is positive before this value and negative after it, so the volume changes from increasing to decreasing. The cylinder therefore has maximum volume there.
Its half-height is
y=16−332=316=34,so the full height is
h=2y=38.The maximum volume is
Vmax=2π(332)(34)=33256π.The cross-section is what makes the geometry manageable: the sphere’s three-dimensional constraint becomes the familiar equation of a circle.
A package with a square cross-section: largest volume
A rectangular package has a square cross-section. The postal limit is that its length plus its girth—the distance around the square cross-section—must total 90 inches. The goal is to maximize its volume.
Let x be the side length of the square cross-section and y be the package’s length. The girth is the sum of the four sides of the square, so the constraint is
4x+y=90.The volume equals the cross-sectional area times the length:
V=x2y.Solving the constraint for y gives
y=90−4x.Therefore,
V(x)=x2(90−4x)=90x2−4x3.Differentiate:
V′(x)=180x−12x2=12x(15−x).The critical numbers are x=0 and x=15. A cross-section with x=0 has zero volume, so it cannot be the desired package. For 0<x<15, the derivative is positive; for x>15 within the feasible range, it is negative. Thus the volume increases and then decreases at x=15, giving a maximum.
The length is
y=90−4(15)=30.The package should have a square cross-section measuring 15 inches by 15 inches and a length of 30 inches.
Here, interpreting “girth” correctly is the key setup step: it is the perimeter of the square cross-section, not one side of it.
Think About It
Why does the postal constraint contain 4x rather than 2x when the cross-section is a square?
An open box cut from cardboard: largest volume
A square sheet of cardboard measures 6 feet by 6 feet. Squares of side length x are cut from all four corners, and the remaining sides are folded upward to make an open-top box. The goal is to maximize the volume.
After each corner is cut, the box’s height is x. Each side of its square base loses a length x at both ends, so the base side length is
6−2x.The volume is consequently
V(x)=x(6−2x)2.A box requires x>0 and 6−2x>0, so the feasible interval is 0<x<3. Expanding first gives
V(x)=36x−24x2+4x3.Its derivative is
V′(x)=36−48x+12x2=12(x−1)(x−3).The critical numbers are x=1 and x=3. The value x=3 makes the base side length zero, so it produces no box with positive volume; it is a boundary limit, not a usable cut size. For 0<x<1, the derivative is positive, and for 1<x<3, it is negative. The volume therefore reaches a maximum at x=1.
The base side length is
6−2(1)=4,and the height is 1. The box’s dimensions are 4 feet by 4 feet by 1 foot, giving a maximum volume of
1⋅42=16 ft3.The domain matters here: solving the derivative equation produces a candidate at x=3, but the geometry shows that it creates a collapsed base rather than a useful box.
An open box with a square base: least material
An open-top box has a square base and must have volume 32,000 cubic centimeters. The goal is to minimize the amount of material used, which means minimizing its surface area.
Let x be the side length of the square base and y the height. The volume constraint is
x2y=32,000.The box has one square bottom with area x2 and four rectangular sides, each with area xy. There is no top, so its surface area is
S=x2+4xy.Solve the volume constraint for the height:
y=x232,000.Substitution gives a one-variable surface-area function:
S(x)=x2+4x(x232,000)=x2+x128,000,x>0.Differentiate:
S′(x)=2x−x2128,000.Setting this equal to zero and multiplying by x2 gives
2x3−128,000=0,x3=64,000.Therefore,
x=40.The second derivative is
S′′(x)=2+x3256,000>0for every positive x, so the critical point gives a minimum. The height is
y=40232,000=20.The box should have a base measuring 40 centimeters by 40 centimeters and a height of 20 centimeters.
This problem differs from the previous box problem: the volume is fixed, and the goal is to minimize surface area. Because the box is open at the top, the surface-area formula includes the bottom and four sides but no top.
Comprehensive review
Optimization problems begin with a real situation and become manageable once the quantities are represented by variables and equations. The constraint captures what must remain fixed; the objective function captures what must be optimized. Substituting the constraint into the objective turns a multi-variable problem into a one-variable calculus problem.
The examples show why careful modeling matters:
- In the river-field problem, only three sides require fencing.
- In the poster problem, the margins make the total dimensions larger than the printed region.
- In the parabola problem, the coordinate x is half the rectangle’s width.
- In the cylinder problem, the cross-section connects the cylinder’s radius and height through the sphere.
- In the package problem, girth is the perimeter of the square cross-section.
- In the cut-cardboard problem, corner cuts change both the box’s height and base dimensions.
- In the open-box problem, the surface area excludes a top.
After differentiating, a critical number must still be interpreted. The derivative tests establish whether the objective is locally increasing or decreasing around a candidate, while the domain and geometry rule out impossible or degenerate values. The final dimensions must be recovered from the original variables and constraints, with attention to whether the question asks for an internal region, an overall object, a base, a height, or a volume.

Ask anything
We've read this whole study set, so questions about it get the best answers.