Educerie

Educerie · AP · Calculus AB and BC

AP Calculus AB and BC 5.10

Introduction to Optimization Problems

How can the derivative, the rate of change at a point, tell you what a whole function is doing?

What you will learn

  • Understand how to turn a context into an objective function and a constraint.
  • Know how to reduce to one variable and state the domain.
  • Know how the domain decides the argument used to justify the best value.
  • Understand how problems from different contexts share a structure.

You must be able to

  1. Write the objective, the constraint and the one-variable function
  2. State the domain with a reason
  3. Find the best value and justify it
  4. Use the squared distance to simplify a distance problem
  5. Answer the question asked, with units

In the exam. Section I (multiple choice), Part A: choose the expression that models the quantity, or find the best value of a given model. In the free-response section an optimization part asks you to write an expression, state the domain, find the best value and justify. Most marks are for the setup. The calculus in the middle is short.

1The steps

  1. Draw and name. Sketch the situation. Give a letter to every quantity that can change.
  2. Objective. Write the formula for the quantity to optimize.
  3. Constraint. Write the fixed condition as an equation.
  4. One variable. Solve the constraint for one letter and put it in the objective.
  5. Domain. Work out which values of the variable make sense.
  6. Optimize. Find critical points and test them (5.5 or 5.7).
  7. Answer. Give what the question asks, with units.

2Worked example: a fenced pen

A farmer has 120 meters of fence. She uses it on three sides of a rectangular pen, with a straight wall on the fourth side. What dimensions give the greatest area?

Figure 1. A rectangular pen against a wall with 120 m of fence: two sides of length x and one of length 120 - 2x wall (no fence needed) x x 120 - 2x area A = x(120 - 2x)
Figure 1 · A rectangular pen against a wall with 120 m of fence: two sides of length x and one of length 120 - 2x

1. Name. Let xx be the length of each of the two sides that touch the wall. Let yy be the side parallel to the wall.

2. Objective. Area A=xyA = xy.

3. Constraint. Fence: 2x+y=1202x + y = 120.

4. One variable. y=120−2xy = 120 - 2x, so

A(x)=x(120−2x)=120x−2x2A(x) = x(120 - 2x) = 120x - 2x^{2}

5. Domain. Lengths cannot be negative, so x≥0x \ge 0 and y=120−2x≥0y = 120 - 2x \ge 0. That gives 0≤x≤600 \le x \le 60, a closed interval.

6. Optimize.

A′(x)=120−4x=0atx=30in (0, 60)A'(x) = 120 - 4x = 0 \quad\text{at}\quad x = 30 \qquad \textcolor{#838c91}{\text{in (0, 60)}}A(0)=0A(30)=30(60)=1800A(60)=0A(0) = 0 \qquad A(30) = 30(60) = 1800 \qquad A(60) = 0
Figure 2. A(x) = x(120 - 2x) on the interval [0, 60]: the largest area, 1800 square meters, is at x = 30 0 60 A (m squared) x (m) 30 1800
Figure 2 · A(x) = x(120 - 2x) on the interval 0 to 60: the largest area, 1800 square meters, is at x = 30

AA is continuous on [0,60][0, 60]. The candidates are 0, 30 and 60, and the largest value is at x=30x = 30.

7. Answer. The sides touching the wall are 30 m each, and the side along the wall is 120−60=60120 - 60 = 60 m. The greatest area is 1800 square meters.

3Worked example: an open box

A box with a square base and no top must hold 500 cubic centimeters. Which dimensions use the least material?

Let xx be the side of the base and hh the height, in centimeters. Material means surface area: one base of area x2x^{2} and four sides each of area xhxh.

S=x2+4xhobjective, to be minimizedS = x^{2} + 4xh \qquad \textcolor{#838c91}{\text{objective, to be minimized}}x2h=500soh=500x2constraintx^{2}h = 500 \quad\text{so}\quad h = \frac{500}{x^{2}} \qquad \textcolor{#838c91}{\text{constraint}}S(x)=x2+4x⋅500x2=x2+2000xS(x) = x^{2} + 4x \cdot \frac{500}{x^{2}} = x^{2} + \frac{2000}{x}

The side xx can be any positive number, so the domain is x>0x > 0. This interval is open. The Candidates Test does not apply, so a single-critical-point argument (5.7) is used.

S′(x)=2x−2000x2=0givesx3=1000, x=10S'(x) = 2x - \frac{2000}{x^{2}} = 0 \quad\text{gives}\quad x^{3} = 1000, \ x = 10S′′(x)=2+4000x3S′′(10)=6>0S''(x) = 2 + \frac{4000}{x^{3}} \qquad S''(10) = 6 > 0

x=10x = 10 is the only critical point of SS on (0,∞)(0, \infty), and S′′(10)>0S''(10) > 0, so it is the absolute minimum. Then h=500100=5h = \dfrac{500}{100} = 5, and the least surface area is S(10)=100+200=300S(10) = 100 + 200 = 300 square centimeters.

4Worked example: a distance

Find the point on the curve y=xy = \sqrt{x} closest to the point (3,0)(3, 0).

A point on the curve is (x,x)(x, \sqrt{x}). The distance squared to (3,0)(3, 0) is

D(x)=(x−3)2+(x)2=(x−3)2+xD(x) = (x - 3)^{2} + (\sqrt{x})^{2} = (x - 3)^{2} + x

Use the square of the distance. The distance is smallest exactly when its square is, and the square has no square root to differentiate. The domain is x≥0x \ge 0.

D′(x)=2(x−3)+1=2x−5=0atx=52D'(x) = 2(x - 3) + 1 = 2x - 5 = 0 \quad\text{at}\quad x = \tfrac{5}{2}D′′(x)=2>0D''(x) = 2 > 0

x=52x = \dfrac{5}{2} is the only critical point in the domain and D′′>0D'' > 0, so it gives the minimum. The closest point is (52,52)\left(\dfrac{5}{2}, \sqrt{\dfrac{5}{2}}\right), and the distance is D(52)=14+52=112≈1.658\sqrt{D\left(\tfrac{5}{2}\right)} = \sqrt{\tfrac{1}{4} + \tfrac{5}{2}} = \dfrac{\sqrt{11}}{2} \approx 1.658.

5Choosing the domain

The domain comes from the situation, not from the formula.

  • Closed domain (such as 0≤x≤600 \le x \le 60): use the Candidates Test (5.5). The ends are part of the interval, and the best value can be there.
  • Open domain (such as x>0x > 0): use the single-critical-point argument (5.7), or a sign chart for the derivative. The ends are not part of the domain.
  • Check what the ends mean. In the pen, x=0x = 0 and x=60x = 60 give a pen with no area. In the box, a tiny xx and a huge xx both use a lot of material.
  • Show it. The ends are usually the worst cases, but you must show it, not assume it.

6Recognizing the structure

Different stories often give the same shape.

StoryObjectiveConstraint
Fence, pen, fieldareatotal fence length
Box, can, tanksurface area or costvolume
Two numberssum, product or sum of squaresa fixed sum or product
Closest pointdistance squaredthe point is on a curve
Cost, profitcost or profitdemand or production rule

In each, a quantity to optimize depends on two variables, and a constraint lets you remove one.

7Writing the setup

On the exam the setup is a graded part. A full setup says:

  • what each letter stands for, with units
  • the objective and the constraint
  • the one-variable function, and its domain

"Let xx be the width in meters. Then the length is 120−2x120 - 2x meters and the area is A(x)=x(120−2x)A(x) = x(120 - 2x) square meters, for 0≤x≤600 \le x \le 60."

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.