1. Home
  2. Explore
  3. Mathematics
  4. Calculus Optimization Problems

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

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:

  1. What is known? These are the conditions or constraints that the solution must satisfy.
  2. 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)=0f'(c)=0f′(c)=0 and f′′(c)>0f''(c)>0f′′(c)>0, the graph is concave up at ccc, so fff has a local minimum there. If f′(c)=0f'(c)=0f′(c)=0 and f′′(c)<0f''(c)<0f′′(c)<0, the graph is concave down, so fff 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 100010001000 square meters, and the goal is to make its perimeter as small as possible.

Let its side lengths be xxx and yyy. The known area gives the constraint

xy=1000.xy=1000.xy=1000.

The perimeter is

P=2x+2y.P=2x+2y.P=2x+2y.

The perimeter depends on two variables, but the area constraint allows one to be expressed in terms of the other:

y=1000x.y=\frac{1000}{x}.y=x1000​.

Substitution gives a one-variable objective:

P(x)=2x+2000x,x>0.P(x)=2x+\frac{2000}{x}, \qquad x>0.P(x)=2x+x2000​,x>0.

The derivative is

P′(x)=2−2000x2.P'(x)=2-\frac{2000}{x^2}.P′(x)=2−x22000​.

Setting the derivative equal to zero gives

2−2000x2=0,x2=1000.2-\frac{2000}{x^2}=0, \qquad x^2=1000.2−x22000​=0,x2=1000.

Side lengths must be positive, so

x=1000=1010.x=\sqrt{1000}=10\sqrt{10}.x=1000​=1010​.

To confirm that this critical number gives a minimum, calculate the second derivative:

P′′(x)=4000x3.P''(x)=\frac{4000}{x^3}.P′′(x)=x34000​.

This is positive for every positive xxx, including x=1010x=10\sqrt{10}x=1010​. Therefore, the perimeter has a minimum at that value. The other side is

y=10001010=1010.y=\frac{1000}{10\sqrt{10}}=10\sqrt{10}.y=1010​1000​=1010​.

Thus the rectangle with the smallest perimeter is a square, with dimensions

1010 m by 1010 m.10\sqrt{10}\text{ m}\ \text{by}\ 10\sqrt{10}\text{ m}.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 240024002400 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 xxx be the length of each side perpendicular to the river, and let yyy be the side parallel to the river that needs fencing. Only three sides require fencing, so the constraint is

2x+y=2400.2x+y=2400.2x+y=2400.

The area is

A=xy.A=xy.A=xy.

Solving the constraint for yyy gives

y=2400−2x.y=2400-2x.y=2400−2x.

Therefore,

A(x)=x(2400−2x)=2400x−2x2.A(x)=x(2400-2x)=2400x-2x^2.A(x)=x(2400−2x)=2400x−2x2.

Differentiate and find the critical number:

A′(x)=2400−4x,A'(x)=2400-4x,A′(x)=2400−4x, 2400−4x=0⟹x=600.2400-4x=0 \quad\Longrightarrow\quad x=600.2400−4x=0⟹x=600.

The second derivative is

A′′(x)=−4<0,A''(x)=-4<0,A′′(x)=−4<0,

so the area is maximized at x=600x=600x=600. The remaining fenced side is

y=2400−2(600)=1200.y=2400-2(600)=1200.y=2400−2(600)=1200.

The field should therefore have dimensions

600 ft by 1200 ft.600\text{ ft}\ \text{by}\ 1200\text{ ft}.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 384384384 square centimeters. The margins are 444 centimeters on each side and 666 centimeters at the top and bottom. The goal is to minimize the total area of the poster.

Let xxx and yyy be the width and height of the printed region. Its fixed area gives

xy=384,y=384x.xy=384, \qquad y=\frac{384}{x}.xy=384,y=x384​.

The poster itself is larger than the printed region because of the margins. Its overall width is x+8x+8x+8, and its overall height is y+12y+12y+12. Thus the total area is

A=(x+8)(y+12).A=(x+8)(y+12).A=(x+8)(y+12).

Substitute y=384/xy=384/xy=384/x:

A(x)=(x+8)(384x+12).A(x)=(x+8)\left(\frac{384}{x}+12\right).A(x)=(x+8)(x384​+12).

Expanding makes differentiation straightforward:

A(x)=480+12x+3072x.A(x)=480+12x+\frac{3072}{x}.A(x)=480+12x+x3072​.

The derivative is

A′(x)=12−3072x2.A'(x)=12-\frac{3072}{x^2}.A′(x)=12−x23072​.

Setting this equal to zero gives

12−3072x2=0,x2=256.12-\frac{3072}{x^2}=0, \qquad x^2=256.12−x23072​=0,x2=256.

Since a width is positive, x=16x=16x=16. The second derivative is

A′′(x)=6144x3>0A''(x)=\frac{6144}{x^3}>0A′′(x)=x36144​>0

for positive xxx, so this critical number gives a minimum. The printed region’s height is

y=38416=24.y=\frac{384}{16}=24.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.x+8=24, \qquad y+12=36.x+8=24,y+12=36.

The poster should measure

24 cm by 36 cm.24\text{ cm}\ \text{by}\ 36\text{ cm}.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 xxx and yyy 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 xxx-axis, and its two upper vertices lie on the parabola

y=12−x2.y=12-x^2.y=12−x2.

The aim is to find the rectangle with the largest area.

Because the parabola is symmetric about the yyy-axis, the rectangle can be described using its right upper vertex (x,y)(x,y)(x,y). The left upper vertex is then (−x,y)(-x,y)(−x,y). Here, xxx is only half the rectangle’s width, so the full width is 2x2x2x. The height is y=12−x2y=12-x^2y=12−x2. Thus the area is

A=2xy=2x(12−x2).A=2xy=2x(12-x^2).A=2xy=2x(12−x2).

In one variable,

A(x)=24x−2x3.A(x)=24x-2x^3.A(x)=24x−2x3.

The rectangle has positive height only when 12−x2>012-x^2>012−x2>0, so the relevant values satisfy 0<x<120<x<\sqrt{12}0<x<12​. Differentiate:

A′(x)=24−6x2.A'(x)=24-6x^2.A′(x)=24−6x2.

The critical point satisfies

24−6x2=0,x2=4.24-6x^2=0, \qquad x^2=4.24−6x2=0,x2=4.

The positive value is x=2x=2x=2. The second derivative is

A′′(x)=−12x,A''(x)=-12x,A′′(x)=−12x,

so A′′(2)=−24<0A''(2)=-24<0A′′(2)=−24<0: the area has a maximum there. The height is

y=12−22=8.y=12-2^2=8.y=12−22=8.

Since xxx is half the width, the full width is 2x=42x=42x=4. The rectangle’s dimensions are therefore

4 by 8.4\ \text{by}\ 8.4 by 8.

The distinction between the half-width and the full width is essential. The coordinate x=2x=2x=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 444. 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 444. Let xxx be the cylinder’s radius and let yyy be half its height. The sphere’s cross-section satisfies

x2+y2=16.x^2+y^2=16.x2+y2=16.

Thus

y=16−x2.y=\sqrt{16-x^2}.y=16−x2​.

The cylinder’s full height is 2y2y2y, so its volume is

V=πx2(2y).V=\pi x^2(2y).V=πx2(2y).

Substituting for yyy gives

V(x)=2πx216−x2,0≤x≤4.V(x)=2\pi x^2\sqrt{16-x^2}, \qquad 0\leq x\leq 4.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 222.

Differentiating by the product rule and chain rule gives

V′(x)=64πx−6πx316−x2.V'(x)=\frac{64\pi x-6\pi x^3}{\sqrt{16-x^2}}.V′(x)=16−x2​64π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,64\pi x-6\pi x^3=0,64πx−6πx3=0, 2πx(32−3x2)=0.2\pi x(32-3x^2)=0.2πx(32−3x2)=0.

The value x=0x=0x=0 gives a degenerate cylinder with zero volume. The relevant critical value instead satisfies

3x2=32,x=323.3x^2=32, \qquad x=\sqrt{\frac{32}{3}}.3x2=32,x=332​​.

For positive xxx, 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−323=163=43,y=\sqrt{16-\frac{32}{3}} =\sqrt{\frac{16}{3}} =\frac{4}{\sqrt{3}},y=16−332​​=316​​=3​4​,

so the full height is

h=2y=83.h=2y=\frac{8}{\sqrt{3}}.h=2y=3​8​.

The maximum volume is

Vmax⁡=2π(323)(43)=256π33.V_{\max} =2\pi\left(\frac{32}{3}\right)\left(\frac{4}{\sqrt{3}}\right) =\frac{256\pi}{3\sqrt{3}}.Vmax​=2π(332​)(3​4​)=33​256π​.

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 909090 inches. The goal is to maximize its volume.

Let xxx be the side length of the square cross-section and yyy be the package’s length. The girth is the sum of the four sides of the square, so the constraint is

4x+y=90.4x+y=90.4x+y=90.

The volume equals the cross-sectional area times the length:

V=x2y.V=x^2y.V=x2y.

Solving the constraint for yyy gives

y=90−4x.y=90-4x.y=90−4x.

Therefore,

V(x)=x2(90−4x)=90x2−4x3.V(x)=x^2(90-4x)=90x^2-4x^3.V(x)=x2(90−4x)=90x2−4x3.

Differentiate:

V′(x)=180x−12x2=12x(15−x).V'(x)=180x-12x^2=12x(15-x).V′(x)=180x−12x2=12x(15−x).

The critical numbers are x=0x=0x=0 and x=15x=15x=15. A cross-section with x=0x=0x=0 has zero volume, so it cannot be the desired package. For 0<x<150<x<150<x<15, the derivative is positive; for x>15x>15x>15 within the feasible range, it is negative. Thus the volume increases and then decreases at x=15x=15x=15, giving a maximum.

The length is

y=90−4(15)=30.y=90-4(15)=30.y=90−4(15)=30.

The package should have a square cross-section measuring 151515 inches by 151515 inches and a length of 303030 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 4x4x4x rather than 2x2x2x when the cross-section is a square?

An open box cut from cardboard: largest volume

A square sheet of cardboard measures 666 feet by 666 feet. Squares of side length xxx 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 xxx. Each side of its square base loses a length xxx at both ends, so the base side length is

6−2x.6-2x.6−2x.

The volume is consequently

V(x)=x(6−2x)2.V(x)=x(6-2x)^2.V(x)=x(6−2x)2.

A box requires x>0x>0x>0 and 6−2x>06-2x>06−2x>0, so the feasible interval is 0<x<30<x<30<x<3. Expanding first gives

V(x)=36x−24x2+4x3.V(x)=36x-24x^2+4x^3.V(x)=36x−24x2+4x3.

Its derivative is

V′(x)=36−48x+12x2=12(x−1)(x−3).V'(x)=36-48x+12x^2 =12(x-1)(x-3).V′(x)=36−48x+12x2=12(x−1)(x−3).

The critical numbers are x=1x=1x=1 and x=3x=3x=3. The value x=3x=3x=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<10<x<10<x<1, the derivative is positive, and for 1<x<31<x<31<x<3, it is negative. The volume therefore reaches a maximum at x=1x=1x=1.

The base side length is

6−2(1)=4,6-2(1)=4,6−2(1)=4,

and the height is 111. The box’s dimensions are 444 feet by 444 feet by 111 foot, giving a maximum volume of

1⋅42=16 ft3.1\cdot4^2=16\text{ ft}^3.1⋅42=16 ft3.

The domain matters here: solving the derivative equation produces a candidate at x=3x=3x=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,00032{,}00032,000 cubic centimeters. The goal is to minimize the amount of material used, which means minimizing its surface area.

Let xxx be the side length of the square base and yyy the height. The volume constraint is

x2y=32,000.x^2y=32{,}000.x2y=32,000.

The box has one square bottom with area x2x^2x2 and four rectangular sides, each with area xyxyxy. There is no top, so its surface area is

S=x2+4xy.S=x^2+4xy.S=x2+4xy.

Solve the volume constraint for the height:

y=32,000x2.y=\frac{32{,}000}{x^2}.y=x232,000​.

Substitution gives a one-variable surface-area function:

S(x)=x2+4x(32,000x2)=x2+128,000x,x>0.S(x)=x^2+4x\left(\frac{32{,}000}{x^2}\right) =x^2+\frac{128{,}000}{x}, \qquad x>0.S(x)=x2+4x(x232,000​)=x2+x128,000​,x>0.

Differentiate:

S′(x)=2x−128,000x2.S'(x)=2x-\frac{128{,}000}{x^2}.S′(x)=2x−x2128,000​.

Setting this equal to zero and multiplying by x2x^2x2 gives

2x3−128,000=0,x3=64,000.2x^3-128{,}000=0, \qquad x^3=64{,}000.2x3−128,000=0,x3=64,000.

Therefore,

x=40.x=40.x=40.

The second derivative is

S′′(x)=2+256,000x3>0S''(x)=2+\frac{256{,}000}{x^3}>0S′′(x)=2+x3256,000​>0

for every positive xxx, so the critical point gives a minimum. The height is

y=32,000402=20.y=\frac{32{,}000}{40^2}=20.y=40232,000​=20.

The box should have a base measuring 404040 centimeters by 404040 centimeters and a height of 202020 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 xxx 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.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent