Calculus · Grade 12 and undergraduate

Optimization: Maximum and Minimum Problems

Quick answer

An optimization problem asks for the largest or smallest value of a quantity under some condition: the most area for a fixed length of fence, the least metal for a can of fixed volume. The method: name the quantity, use the constraint to write it as a function of one variable, find that function's domain and critical points, and justify that the answer is a maximum or minimum — by comparing endpoints or with a derivative test. Then answer the question that was asked, with units.

What you'll learn

  • Translate a word problem into a function to optimize
  • Use a constraint to reduce it to one variable, with a domain
  • Find and justify the absolute maximum or minimum

The method

  1. Draw the situation and name the variables.
  2. Write the quantity to optimize in terms of those variables.
  3. Use the constraint to eliminate all but one variable.
  4. State the domain of the resulting function.
  5. Find the critical points.
  6. Justify the maximum or minimum: compare with the endpoints on a closed interval, or use a derivative test.
  7. Answer the question that was asked, with units.

Why the constraint does the work

Most problems start with two unknowns. A rectangular pen has a length and a width, and “make the area as big as possible” means nothing until something limits them. That something is the constraint: 240240 meters of fence, a 10001000 cm³ can.

The constraint is an equation between the variables, so it can be solved for one of them. Substituting leaves the target as a function of a single variable, and then the tools of the last few lessons apply directly. The constraint turns a question about two quantities into a question about one function.

Worked examples

Common mistakes

Practice problems

  1. Two positive numbers add to 2020. What is the largest possible product?

    Answer

    100100

    Full solution

    P=x(20−x)P = x(20 - x) on [0,20][0, 20]. P′=20−2x=0P' = 20 - 2x = 0 at x=10x = 10; the endpoints give 00. P(10)=100P(10) = 100.

  2. A rectangle has perimeter 4040 cm. What is its largest possible area?

    Answer

    100100 cm², a 1010 by 1010 square

    Full solution

    2x+2y=402x + 2y = 40 gives y=20−xy = 20 - x, so A=x(20−x)A = x(20 - x). The maximum is at x=10x = 10.

  3. A rectangular pen with area 200200 m² has fence on all four sides. What dimensions use the least fence?

    Answer

    About 14.1414.14 m by 14.1414.14 m, a square

    Full solution

    P=2x+400xP = 2x + \tfrac{400}{x} for x>0x > 0. P′=2−400x2=0P' = 2 - \tfrac{400}{x^2} = 0 at x=200≈14.14x = \sqrt{200} \approx 14.14, and P′′=800x3>0P'' = \tfrac{800}{x^3} > 0, so it is the minimum. The pen is square.

  4. An open box is made from a 1010-inch by 1616-inch sheet by cutting squares of side xx from the corners. Find the xx that maximizes the volume.

    Answer

    x=2x = 2 inches

    Full solution

    V=x(10−2x)(16−2x)=4x3−52x2+160xV = x(10 - 2x)(16 - 2x) = 4x^3 - 52x^2 + 160x on [0,5][0, 5]. V′=12x2−104x+160=4(3x−20)(x−2)V' = 12x^2 - 104x + 160 = 4(3x - 20)(x - 2). Only x=2x = 2 is in the domain; V(2)=144V(2) = 144 beats the endpoint values 00.

  5. Find the point on the line y=2x+1y = 2x + 1 closest to the origin.

    Answer

    (−25,15)\left(-\tfrac{2}{5}, \tfrac{1}{5}\right)

    Full solution

    D=x2+(2x+1)2=5x2+4x+1D = x^2 + (2x + 1)^2 = 5x^2 + 4x + 1. D′=10x+4=0D' = 10x + 4 = 0 at x=−25x = -\tfrac{2}{5}, where y=15y = \tfrac{1}{5}.

  6. A box with a square base and open top must hold 3232 cubic feet. What dimensions use the least material?

    Answer

    Base 44 ft by 44 ft, height 22 ft

    Full solution

    x2h=32x^2 h = 32, and the area is S=x2+4xh=x2+128xS = x^2 + 4xh = x^2 + \tfrac{128}{x}. S′=2x−128x2=0S' = 2x - \tfrac{128}{x^2} = 0 at x3=64x^3 = 64, x=4x = 4, so h=2h = 2.

  7. A rectangle is inscribed under the parabola y=12−x2y = 12 - x^2, with its base on the xx-axis. Find its largest area.

    Answer

    3232

    Full solution

    With corners at (±x,12−x2)(\pm x, 12 - x^2), the area is A=2x(12−x2)=24x−2x3A = 2x(12 - x^2) = 24x - 2x^3 on [0,12][0, \sqrt{12}]. A′=24−6x2=0A' = 24 - 6x^2 = 0 at x=2x = 2, and A(2)=32A(2) = 32.

  8. The cost of producing xx items is C(x)=500+10x+0.02x2C(x) = 500 + 10x + 0.02x^2. What production level minimizes the average cost per item, C(x)x\tfrac{C(x)}{x}?

    Answer

    About 158158 items

    Full solution

    Average cost Cˉ=500x+10+0.02x\bar{C} = \tfrac{500}{x} + 10 + 0.02x. Cˉ′=−500x2+0.02=0\bar{C}' = -\tfrac{500}{x^2} + 0.02 = 0 at x2=25 000x^2 = 25\,000, x≈158.1x \approx 158.1. Cˉ′′>0\bar{C}'' > 0, so it is a minimum.

  9. A window is a rectangle topped by a semicircle, with perimeter 1010 m. Which radius lets in the most light (largest area)?

    Answer

    r=104+π≈1.40r = \tfrac{10}{4 + \pi} \approx 1.40 m

    Full solution

    With radius rr, width 2r2r and rectangle height hh: 2r+2h+πr=102r + 2h + \pi r = 10, so h=5−r−πr2h = 5 - r - \tfrac{\pi r}{2}.

    Area A=2rh+πr22=10r−2r2−πr22A = 2rh + \tfrac{\pi r^2}{2} = 10r - 2r^2 - \tfrac{\pi r^2}{2}. A′=10−4r−πr=0A' = 10 - 4r - \pi r = 0 gives r=104+πr = \tfrac{10}{4 + \pi}, and A′′<0A'' < 0.

  10. For the fence problem, a student answers "x=60x = 60". What is missing?

    Hint

    What did the question ask for?

    Answer

    The question asked for the dimensions: 6060 m by 120120 m, and a justification that this is a maximum.

    Full solution

    x=60x = 60 is one side; the other is y=240−2(60)=120y = 240 - 2(60) = 120.

    A complete answer also shows it is the maximum: A(60)=7200A(60) = 7200 beats A(0)=A(120)=0A(0) = A(120) = 0.

Frequently asked questions

What are the steps for an optimization problem?

Draw and name variables, write the quantity to optimize, use the constraint to reduce it to one variable, find the domain, find critical points, justify the max or min, and answer the question asked.

What is the constraint?

The condition that ties the variables together, such as a fixed perimeter or a fixed volume. It lets you write the target quantity in terms of a single variable.

How do I justify that my answer is a maximum?

On a closed interval, compare the critical points with the endpoints. Otherwise, use the first or second derivative test, or the single-critical-point argument.

What are the dimensions of the cheapest can of a given volume?

The height equals the diameter. Minimizing surface area 2πr² + 2πrh with πr²h fixed gives h = 2r.

Why must I state the domain?

Physical limits — lengths cannot be negative, a cut cannot exceed the sheet — decide which critical points count and which endpoints to compare.

What to learn next