Dove's LibraryDove's Library

5.10 - Introduction to Optimization Problems

What Is Optimization?

Optimize means to make the best or most effective use of a situation or resource. In calculus, that means finding:
  • Maximum values (largest, most, greatest)
  • Minimum values (smallest, least, shortest)
These show up constantly in business, engineering, economics, and physics.

The Optimization Process

This lesson covers the first three steps.
Step 1: Draw a picture (if it applies). Sketch the situation to see the known and unknown quantities.
Step 2: Write an equation to optimize. Figure out what quantity you need to max or min, then write an equation for it.
Step 3: Express it in terms of one variable. Use constraint equations to eliminate extra variables. You need one variable before you can take the derivative.
Steps 4 and 5 (taking derivatives and solving) come in the next lesson. This one is all setup.

Example 1: Product of Two Numbers

Problem: Find two positive numbers whose sum is 24 and whose product is as large as possible.
What to optimize: the product, and we want it as large as possible, so a maximum.
Step 1: No picture needed here.
Step 2: Let the two numbers be xx and yy.
P=xyP = xy
Step 3: The constraint is that the sum is 24.
x+y=24⇒y=24−xx + y = 24 \quad \Rightarrow \quad y = 24 - x
Substitute:
P=x(24−x)=24x−x2P = x(24 - x) = 24x - x^2
Result: the equation to optimize is P(x)=24x−x2P(x) = 24x - x^2, and it’s in one variable.
Next lesson, we’d find P′(x)P'(x), set it equal to zero, and solve.

Example 2: Distance to a Curve

Problem: What point on the graph y=xy = \sqrt{x} is closest to the point (6,0)(6, 0)?
5.10 - Introduction to Optimization Problems
What to optimize: distance, and we want it smallest, so a minimum.
Step 2: Use the distance formula.
d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
The two points are (x,x)(x, \sqrt{x}) on the curve and (6,0)(6, 0).
d=(x−6)2+(x−0)2d = \sqrt{(x - 6)^2 + (\sqrt{x} - 0)^2}
Step 3:
d=(x−6)2+xd = \sqrt{(x - 6)^2 + x}
That’s already one variable. The curve equation y=xy = \sqrt{x} gave us the y-coordinate in terms of xx for free.
Result: d(x)=(x−6)2+xd(x) = \sqrt{(x-6)^2 + x}
Handy trick: it’s often easier to minimize d2d^2 instead of dd, since that kills the square root and they have the same critical points.

Example 3: Box with Maximum Volume

Problem: A rectangular piece of cardboard measuring 20 inches by 32 inches has squares cut from each corner. The sides fold up to make an open-top box. What size squares maximize the volume?
5.10 - Introduction to Optimization Problems
What to optimize: volume, and we want it largest, so a maximum.
Step 2:
V=length×width×heightV = \text{length} \times \text{width} \times \text{height}
Step 3: After cutting squares of side xx from each corner:
  • Length of the base: 32−2x32 - 2x (you lose a square from each end)
  • Width of the base: 20−2x20 - 2x
  • Height of the box: xx (once folded up)
V=(32−2x)(20−2x)(x)V = (32 - 2x)(20 - 2x)(x)
Expand:
V=(640−104x+4x2)(x)=4x3−104x2+640xV = (640 - 104x + 4x^2)(x) = 4x^3 - 104x^2 + 640x
Result: V(x)=4x3−104x2+640xV(x) = 4x^3 - 104x^2 + 640x, one variable.
Domain: since you’re cutting squares from corners, 0<x<100 < x < 10 (half of the shorter side).

Example 4: Minimizing Wire Length

Problem: Two vertical poles stand 40 feet apart. One is 20 feet tall, the other is 15 feet tall. A wire runs from the top of each pole to a single stake on the ground between them. Where do you put the stake to use the least wire?
5.10 - Introduction to Optimization Problems
What to optimize: total wire length, and we want the least, so a minimum.
Step 2:
W=W1+W2W = W_1 + W_2
Step 3: Let xx be the distance from the left pole to the stake, so 40−x40 - x is the distance from the stake to the right pole. Pythagorean theorem on each right triangle:
W1=202+x2=400+x2W_1 = \sqrt{20^2 + x^2} = \sqrt{400 + x^2}W2=152+(40−x)2=225+(40−x)2W_2 = \sqrt{15^2 + (40-x)^2} = \sqrt{225 + (40-x)^2}W=400+x2+225+(40−x)2W = \sqrt{400 + x^2} + \sqrt{225 + (40-x)^2}
Result: W(x)=400+x2+225+(40−x)2W(x) = \sqrt{400 + x^2} + \sqrt{225 + (40-x)^2}, one variable.
Domain: 0≤x≤400 \leq x \leq 40

Key Strategy: Using Constraints

When you have two variables but need one:
  1. Find the constraint equation, usually given in the problem
  1. Solve the constraint for one variable in terms of the other
  1. Substitute into the optimization equation
Pattern: optimize A=xyA = xy subject to x+y=50x + y = 50.
  • From the constraint: y=50−xy = 50 - x
  • Substitute: A=x(50−x)=50x−x2A = x(50 - x) = 50x - x^2
  • Now it’s in one variable

Common Optimization Setups

Scenario
What to Optimize
Common Formula
Area problems
Area
A=lwA = lw or A=πr2A = \pi r^2
Volume problems
Volume
V=lwhV = lwh or V=πr2hV = \pi r^2 h
Distance problems
Distance
d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}
Cost problems
Cost
C=(unit cost)×(quantity)C = (\text{unit cost}) \times (\text{quantity})
Revenue problems
Revenue
R=(price)×(quantity)R = (\text{price}) \times (\text{quantity})
Profit problems
Profit
P=R−CP = R - C

Setup Checklist

Before you take the derivative, make sure you’ve:
  • Identified what quantity to maximize or minimize
  • Drawn a picture if applicable (especially for geometry problems)
  • Labeled known quantities with numbers
  • Labeled unknown quantities with variables
  • Written the primary equation (the thing you’re optimizing)
  • Identified and used the constraint equation
  • Reduced everything to one variable only
  • Simplified the equation (optional but it helps)

Key Takeaways

  • Optimization means finding maximum or minimum values
  • Keywords to watch for: largest, smallest, most, least, greatest, shortest, maximum, minimum
  • Three setup steps: draw a picture, write the equation, convert to one variable
  • The primary equation is the quantity you want to optimize (area, volume, distance, cost, etc.)
  • The constraint equation is extra info that relates the variables
  • Use constraints to eliminate extra variables through substitution
  • You must have one variable before taking the derivative
  • The Pythagorean theorem is useful for distance and geometry problems
  • Domain matters, so think about physical constraints (lengths can’t be negative, etc.)
  • This lesson is setup only, solving comes next

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.