Calculus3Analyzing Functions5 of 6
Analyzing Functions · 5

Optimization Problems

1

Turning a word problem into a function

We already know how to find the largest value of a function f(x)f(x) on a closed interval [a,b][a, b]. In word problems, nobody hands us the function or the interval. We have to build them from the problem.

Say we have 120 m\gr{120}\text{ m} of fence to build a rectangular pen along a straight river. The river acts as one side, so that side needs no fence. Which pen encloses the most area? Let's call the two sides running away from the river x\bl{x}, and the side along the river y\gr{y}.

river\text{river}
x\htmlClass{lc-blue}{x}
x\htmlClass{lc-blue}{x}
y\htmlClass{lc-green}{y}
Find the dimensions of the pen with the largest area from 120 m120\text{ m} of fence along a river
river\text{river}
120 m of fence\htmlClass{lc-green}{120\text{ m}}\text{ of fence}
Text solution
Use the fence to get rid of y\gr{y}The area xy\bl{x}\gr{y} has two variables, but two sides of x\bl{x} and one side of y\gr{y} use up all 120 m\gr{120}\text{ m} of fence.
2x+y=120  →  y=120−2x\displaystyle {\bl{2x} + \gr{y} = \gr{120}} \;\to\; {\gr{y} = \gr{120 - 2x}}
A(x)\displaystyle \pk{A(\bl{x})} =x(120−2x)\displaystyle = \bl{x}\gr{(120 - 2x)} =120x−2x2\displaystyle = 120x - 2x^2
Find the intervalAt x=0\bl{x} = 0 and at x=60\bl{x} = 60 the pen is flat and encloses no area, but including those two pens gives a closed interval.
0\displaystyle 0 ≤x\displaystyle \le \bl{x} ≤60\displaystyle \le 60
Compare the critical point with the endsThe only critical point is x=30\bl{x} = 30, and there y=120−2(30)=60\gr{y} = \gr{120 - 2(30)} = 60.
A′(x)\displaystyle A'(x) =120−4x\displaystyle = 120 - 4x =0  →  x\displaystyle = 0 \;\to\; \bl{x} =30\displaystyle = 30
A(0)\displaystyle \pk{A(0)} =0\displaystyle = 0
A(30)\displaystyle \pk{A(30)} =1800\displaystyle = 1800
A(60)\displaystyle \pk{A(60)} =0\displaystyle = 0

Here's the whole process for the pen.

Quantity to maximize
A\displaystyle \pk{A} =xy\displaystyle = \bl{x}\gr{y}
Eliminate a variable
y=120−2x  →  A(x)=x(120−2x)\displaystyle {\gr{y} = \gr{120 - 2x}} \;\to\; {\pk{A(\bl{x})} = \bl{x}\gr{(120 - 2x)}}
y=120−2x\displaystyle {\gr{y} = \gr{120 - 2x}}
→  A(x)=x(120−2x)\displaystyle {\to\; \pk{A(\bl{x})} = \bl{x}\gr{(120 - 2x)}}
Interval
0\displaystyle 0 ≤x\displaystyle \le \bl{x} ≤60\displaystyle \le 60
Largest value
A′(30)=0;A(0)=0, A(30)=1800, A(60)=0\displaystyle {A'(30) = 0};\quad {\pk{A(0)} = 0},\ {\pk{A(30)} = 1800},\ {\pk{A(60)} = 0}
→  30 m by 60 m\displaystyle {\to\; 30\text{ m by }60\text{ m}}
A′(30)=0;\displaystyle {A'(30) = 0};
A(0)=0, A(30)=1800,\displaystyle {\pk{A(0)} = 0},\ {\pk{A(30)} = 1800},
A(60)=0\displaystyle {\pk{A(60)} = 0}
→  30 m by 60 m\displaystyle {\to\; 30\text{ m by }60\text{ m}}

A square pen, 40 m40\text{ m} on each side, encloses only 1600 m21600\text{ m}^2. Because the river gives one side for free, the side along the river is twice as long as the sides running away from it. Try a few pens yourself.

2

Making an open box

Take a 5\gr{5} by 8\gr{8} inch sheet of cardboard, cut a square of side x\bl{x} from each corner, and fold up the four flaps. That makes an open box. What size cut gives the largest volume?

5\htmlClass{lc-green}{5}
8\htmlClass{lc-green}{8}
x\htmlClass{lc-blue}{x}
Find the cut xx that gives an open box with the largest volume from a 55 by 88 inch sheet
5\htmlClass{lc-green}{5}
8\htmlClass{lc-green}{8}
x\htmlClass{lc-blue}{x}
Text solution
Write the volumeThe flaps stand x\bl{x} tall, and each edge loses a square at both ends.
V\displaystyle \pk{V} =x(5−2x)(8−2x)\displaystyle = \bl{x}\gr{(5 - 2x)}\gr{(8 - 2x)}
V\displaystyle \pk{V} =4x3−26x2+40x\displaystyle = 4x^3 - 26x^2 + 40x
Find the interval firstThe shorter 5\gr{5}-inch edge runs out of cardboard first, so the two cuts on it can take up at most 5\gr{5} inches.
2x≤5  →  0≤x≤52\displaystyle {\bl{2x} \le \gr{5}} \;\to\; {0 \le \bl{x} \le \frac52}
Cross out the cut that can't fitOf the two critical points, 103\mut{\frac{10}{3}} is larger than 52\frac52. The volume is 00 at both ends, so x=1\bl{x} = 1 gives the largest box, 1×3×61 \times 3 \times 6.
V′\displaystyle V' =4(3x−10)(x−1)\displaystyle = 4(3x - 10)(x - 1) =0\displaystyle = 0
x=1  or  x=103\displaystyle {\bl{x} = 1} \ \text{ or } \ {\bl{x} = \mut{\frac{10}{3}}}
V(1)\displaystyle \pk{V(1)} =18 in3\displaystyle = 18\text{ in}^3

The picture to keep in mind is the 5\gr{5}-inch edge in three pieces: a cut, the base, and another cut.

x\htmlClass{lc-blue}{x}
5−2x\htmlClass{lc-green}{5 - 2x}
x\htmlClass{lc-blue}{x}
3

When there are no endpoints to check

Now let's find the radius r\bl{r} and height h\gr{h} of a closed cylindrical can holding 16π cm3\gr{16\pi}\text{ cm}^3 that uses the least metal. Using the least metal means finding the smallest possible surface area: two circular lids, and a side that unrolls into a rectangle.

πr2\pi \htmlClass{lc-blue}{r}^2
πr2\pi \htmlClass{lc-blue}{r}^2
2πr2\pi \htmlClass{lc-blue}{r}
h\htmlClass{lc-green}{h}

This time the radius can be any positive number. A very thin can and a very flat can both use lots of metal, and there's no smallest or largest radius, so there are no endpoints to compare. We need another way to be sure we've found the minimum.

Find the radius and height of a closed can holding 16π cm316\pi\text{ cm}^3 with the smallest surface area
Text solution
Use the volume to get rid of h\gr{h}The surface area is S=2πr2+2πrh\pk{S} = 2\pi \bl{r}^2 + 2\pi \bl{r}\gr{h}, and the fixed volume gives h\gr{h} in terms of r\bl{r}.
πr2h=16π  →  h=16r2\displaystyle {\pi \bl{r}^2 \gr{h} = \gr{16\pi}} \;\to\; {\gr{h} = \gr{\frac{16}{r^2}}}
S(r)\displaystyle \pk{S(\bl{r})} =2πr2+32πr,r>0\displaystyle = 2\pi \bl{r}^2 + \frac{32\pi}{\bl{r}}, \qquad {\bl{r} > 0}
Find the critical pointOver a common denominator, S′S' is 00 only when r3=8r^3 = 8.
S′(r)\displaystyle S'(r) =4πr−32πr2\displaystyle = 4\pi r - \frac{32\pi}{r^2} =4π(r3−8)r2\displaystyle = \frac{4\pi(r^3 - 8)}{r^2} =0  →  r\displaystyle = 0 \;\to\; \bl{r} =2\displaystyle = 2
Check the sign on each sideThe sign of S′S' is the sign of r3−8r^3 - 8, so S\pk{S} decreases the whole way to r=2\bl{r} = 2 and increases the whole way after. That makes r=2\bl{r} = 2 the absolute minimum, and then h=4\gr{h} = 4.
0<r<2: S′(r)<0\displaystyle 0 < \bl{r} < 2:\ \dec{S'(r) < 0}
r>2: S′(r)>0\displaystyle \bl{r} > 2:\ \inc{S'(r) > 0}
S(2)\displaystyle \pk{S(2)} =24π cm2\displaystyle = 24\pi\text{ cm}^2
Or use the second derivativeS′′S'' is positive for every r>0\bl{r} > 0, so the graph of S\pk{S} is concave up everywhere and its only critical point is the absolute minimum.
S′′(r)\displaystyle S''(r) =4π+64πr3>0(r>0)\displaystyle = {4\pi + \frac{64\pi}{r^3} > 0 \quad (r > 0)}

The best can is 2 cm2\text{ cm} in radius and 4 cm4\text{ cm} tall, so it's as tall as it is wide. Could a taller or wider can use less metal?

4

Minimizing the squared distance

Let's find the point on the curve y=x\gr{y = \sqrt{x}} that's closest to (1,0)(1, 0). The points (1,1)(1, 1) and (0,0)(0, 0) are both on the curve, and both are a distance 11 from (1,0)(1, 0). A point in between might be even closer.

xx
yy
y=x\htmlClass{lc-green}{y = \sqrt{x}}
(1,0)(1, 0)
(0,0)\htmlClass{lc-mute}{(0, 0)}
1\htmlClass{lc-mute}{1}
(1,1)\htmlClass{lc-mute}{(1, 1)}
1\htmlClass{lc-mute}{1}
(x,x)(\htmlClass{lc-blue}{x}, \htmlClass{lc-green}{\sqrt{x}})
d\htmlClass{lc-pink}{d}
Find the point on y=xy = \sqrt{x} closest to (1,0)(1, 0)
xx
yy
y=x\htmlClass{lc-green}{y = \sqrt{x}}
(1,0)(1, 0)
Text solution
Write the distanceAny point on the curve is (x,x)(\bl{x}, \gr{\sqrt{x}}), so the distance formula gives
d\displaystyle \pk{d} =(x−1)2+(x)2\displaystyle = \sqrt{(\bl{x} - 1)^2 + (\gr{\sqrt{x}})^2}
Minimize the squared distance insteadDistance is never negative, so d\pk{d} and d2\pk{d^2} are smallest at the same x\bl{x}, and d2\pk{d^2} has no square root to differentiate.
D(x)\displaystyle \pk{D(\bl{x})} =d2\displaystyle = \pk{d^2} =x2−x+1,x≥0\displaystyle = x^2 - x + 1, \qquad {\bl{x} \ge 0}
D′(x)\displaystyle D'(x) =2x−1\displaystyle = 2x - 1 =0  →  x\displaystyle = 0 \;\to\; \bl{x} =12\displaystyle = \frac12
Check the sign on each sideThere's no right endpoint, so as with the can we check D′D' on each side of x=12\bl{x} = \frac12. Then y=12=22\gr{y} = \sqrt{\frac12} = \frac{\sqrt2}{2}.
0≤x<12: D′(x)<0\displaystyle {0 \le \bl{x} < \frac12}:\ \dec{D'(x) < 0}
x>12: D′(x)>0\displaystyle \bl{x} > \frac12:\ \inc{D'(x) > 0}
d\displaystyle \pk{d} =34\displaystyle = \sqrt{\frac34} =32\displaystyle = \frac{\sqrt3}{2}
closest point: (12,22)\displaystyle \pk{\text{closest point: }} \Big(\frac12, \frac{\sqrt2}{2}\Big)
5

Getting home fastest

Let's find where to land on the shore to get home in the shortest time. We're on an island 3 km\gr{3}\text{ km} straight out from a point PP on the shore, and home is 6 km\gr{6}\text{ km} down the shore from PP. We row at 3 km/h3\text{ km/h} and walk at 5 km/h5\text{ km/h}. Walking is faster than rowing, but rowing straight to PP makes the walk as long as possible. Rowing straight home avoids walking entirely, but we row much farther.

island\text{island}
PP
3\htmlClass{lc-green}{3}
home\text{home}
6\htmlClass{lc-green}{6}
x\htmlClass{lc-blue}{x}
9+x2\htmlClass{lc-green}{\sqrt{9 + x^2}}
6−x\htmlClass{lc-green}{6 - x}
Find where to land to get home in the shortest time
island\text{island}
PP
3\htmlClass{lc-green}{3}
home\text{home}
6\htmlClass{lc-green}{6}
row 3 km/h\text{row }3\text{ km/h}
walk 5 km/h\text{walk }5\text{ km/h}
Text solution
Write the total timeLanding x\bl{x} km from PP, we row the hypotenuse 9+x2\gr{\sqrt{9 + x^2}} and walk 6−x\gr{6 - x}. Time is distance divided by speed.
T(x)\displaystyle \pk{T(\bl{x})} =9+x23+6−x5,0≤x≤6\displaystyle = \frac{\gr{\sqrt{9 + x^2}}}{3} + \frac{\gr{6 - x}}{5}, \qquad {0 \le \bl{x} \le 6}
Find the critical pointSetting T′(x)=0T'(x) = 0 gives 5x=39+x25x = 3\sqrt{9 + x^2}, which needs x>0\bl{x} > 0. Both sides are positive, so we can square them. Squaring also brings in x=−94\mut{x = -\frac94}, which is outside the interval.
T′(x)\displaystyle T'(x) =x39+x2−15\displaystyle = \frac{x}{3\sqrt{9 + x^2}} - \frac15
5x=39+x2  →  16x2=81  →  x=94\displaystyle {5x = 3\sqrt{9 + x^2}} \;\to\; {16x^2 = 81} \;\to\; {\bl{x} = \frac94}
Compare with the endsSince 22=4<52^2 = 4 < 5, the critical point gives the shortest time: land 94 km\frac94\text{ km} from PP, and get home in 2 hours2\text{ hours}.
T(94)\displaystyle \pk{T\Big(\frac94\Big)} =54+34\displaystyle = \frac54 + \frac34 =2\displaystyle = 2
T(0)\displaystyle \pk{T(0)} =115\displaystyle = \frac{11}{5}
T(6)\displaystyle \pk{T(6)} =5\displaystyle = \sqrt5
If home is only 2 km\gr{2}\text{ km} awayT′(x)T'(x) is the same expression, so its only zero is still 94\mut{\frac94}, now past home. T′T' starts negative and never reaches 00 on [0,2][0, 2].
T′(0)=−15<0  →  T′(x)<0 on [0,2]\displaystyle \dec{T'(0) = -\frac15 < 0} \;\to\; \dec{T'(x) < 0 \text{ on } [0, 2]}
T(2)\displaystyle \pk{T(2)} =133<T(0)\displaystyle = {\frac{\sqrt{13}}{3} < \pk{T(0)}} =75\displaystyle = \frac75

The critical point only matters when it lies inside the interval. With home 2 km\gr{2}\text{ km} from PP, the critical point 94\mut{\frac94} is past home, so T(x)\pk{T(\bl{x})} decreases across the whole interval, and the fastest trip is to row straight home.

Summary

Setting up an optimization problem
Quantity to maximize
A\displaystyle \pk{A} =xy\displaystyle = \bl{x}\gr{y}
Use the fixed amount
2x+y=120  →  A(x)=x(120−2x)\displaystyle {\bl{2x} + \gr{y} = \gr{120}} \;\to\; {\pk{A(\bl{x})} = \bl{x}\gr{(120 - 2x)}}
2x+y=120\displaystyle {\bl{2x} + \gr{y} = \gr{120}}
→  A(x)=x(120−2x)\displaystyle {\to\; \pk{A(\bl{x})} = \bl{x}\gr{(120 - 2x)}}
Find the interval
0\displaystyle 0 ≤x\displaystyle \le \bl{x} ≤60\displaystyle \le 60
Solve and answer what was asked
A(30)=1800  →  30 m by 60 m\displaystyle {{\pk{A(30)} = 1800} \;\to\; 30\text{ m by }60\text{ m}}
A(30)=1800\displaystyle {\pk{A(30)} = 1800}
→  30 m by 60 m\displaystyle {\to\; 30\text{ m by }60\text{ m}}

Write the quantity you want to maximize or minimize, solve the fixed-amount equation for one variable and substitute, and find the interval of allowed values. Once you find where the function is largest or smallest, check what the problem asks for. The dimensions are 30 m30\text{ m} by 60 m60\text{ m}, not just x=30\bl{x} = 30.

Checking critical points on a closed interval
0≤x≤52:\displaystyle {0 \le \bl{x} \le \frac52}:
x=1 ✓,x=103>52\displaystyle {{\bl{x} = 1} \ \checkmark, \qquad {\bl{x} = \mut{\frac{10}{3}} > \frac52}}

On a closed interval, compare the value at each critical point inside the interval with the values at the endpoints. For the open box, the two cuts along the 5\gr{5}-inch edge take 2x\bl{2x}, so x\bl{x} can't be more than 52\frac52. The critical point x=103\bl{x} = \frac{10}{3} is larger than 52\frac52, so it's outside the interval and can't be a solution. An endpoint can also be the answer.

An interval without endpoints
S′(r)=4π(r3−8)r2:\displaystyle {S'(r) = \frac{4\pi(r^3 - 8)}{r^2}}:
S′<0 for 0<r<2,\displaystyle \dec{S' < 0 \text{ for } 0 < \bl{r} < 2},
S′>0 for r>2\displaystyle \inc{S' > 0 \text{ for } \bl{r} > 2}

When an interval is missing an endpoint and has only one critical point, check the sign of the derivative on each side. If the derivative changes from negative to positive, the function decreases before the critical point and increases after it, so that critical point gives the smallest value on the entire interval. If the derivative changes from positive to negative, the critical point gives the largest value.

Minimizing distance
d2\displaystyle \pk{d^2} =(x−1)2+(x)2\displaystyle = (\bl{x} - 1)^2 + (\gr{\sqrt{x}})^2 =x2−x+1\displaystyle = x^2 - x + 1

To find the closest point, minimize the square of the distance instead of the distance itself. Distance is never negative, so d\pk{d} and d2\pk{d^2} are smallest at the same point. Minimizing d2\pk{d^2} gets rid of the square root before differentiating. Take the square root at the end if the problem asks for the actual distance.

6

Practice

Give exact answers unless a problem asks for an approximation.

1
A farmer has 60 m of fence to make a rectangular pen, divided into two smaller pens by a fence parallel to one pair of sides. What is the largest total area the pen can enclose?

How many pieces of fence have length xx, and how many have length yy?

If you got 225225 Check whether you included the dividing fence. The 60 m of fence has to cover 3 pieces of length xx and 2 pieces of length yy, not just the outer rectangle.

Use the fixed amount of fenceThe pen has two sides of length y\gr{y}, and two outer sides plus one divider of length x\bl{x}, so the five pieces add to 60\gr{60}.
3x+2y=60  →  y=30−32x\displaystyle {\bl{3x} + \gr{2y} = \gr{60}} \;\to\; {\gr{y} = \gr{30 - \frac32 x}}
Write the area in terms of xxThe area is xy\bl{x}\gr{y}, and y≥0\gr{y} \ge 0 means x\bl{x} can't be larger than 2020.
A(x)\displaystyle \pk{A(\bl{x})} =xy\displaystyle = \bl{x}\gr{y} =30x−32x2,0≤x≤20\displaystyle = 30x - \frac32 x^2, \qquad {0 \le \bl{x} \le 20}
Set the derivative equal to 00 to find the critical point.
A′(x)\displaystyle A'(x) =30−3x\displaystyle = 30 - 3x =0  →  x=10,y=15\displaystyle = 0 \;\to\; {\bl{x} = 10}, \quad {\gr{y} = 15}
Compare the area at the critical point with the ends of the interval.
A(0)=0,A(10)=150,A(20)=0\displaystyle {\pk{A(0)} = 0}, \qquad {\pk{A(10)} = 150}, \qquad {\pk{A(20)} = 0}
A(0)=0,\displaystyle {\pk{A(0)} = 0},
A(10)=150,\displaystyle {\pk{A(10)} = 150},
A(20)=0\displaystyle {\pk{A(20)} = 0}
2
A rectangle has its base on the xx-axis and its two upper corners on the parabola y=12−x2y = 12 - x^2. What is the largest possible area of the rectangle?

If the right corner is on the curve y=12−x2y = 12 - x^2, what are its coordinates, and what is the rectangle's width from −x-x to xx?

If you got 1616 Check the width of the rectangle. The base goes from −x-x to xx, so its width is 2x2x, not xx.

Find the dimensions of the rectangleThe upper right corner lies on the parabola, so its height is 12−x2\gr{12 - x^2}, and symmetry across the y-axis gives a base running from −x-\bl{x} to x\bl{x}.
corner (x,12−x2),width 2x\displaystyle \text{corner } (\bl{x}, \gr{12 - x^2}), \qquad \text{width } \bl{2x}
The area is width times height, and the height is at least 0 when x≤23\bl{x} \le 2\sqrt3.
A(x)\displaystyle \pk{A(\bl{x})} =2x(12−x2)\displaystyle = \bl{2x}\gr{(12 - x^2)} =24x−2x3,0≤x≤23\displaystyle = 24x - 2x^3, \qquad {0 \le \bl{x} \le 2\sqrt3}
Set the derivative equal to 00 to find the critical point.
A′(x)\displaystyle A'(x) =24−6x2\displaystyle = 24 - 6x^2 =0  →  x\displaystyle = 0 \;\to\; \bl{x} =2\displaystyle = 2
Evaluate the area at the ends and at x=2\bl{x} = 2.
A(0)=0,A(2)=4⋅8=32,A(23)=0\displaystyle {\pk{A(0)} = 0}, \qquad {\pk{A(2)} = 4 \cdot 8 = 32}, \qquad {\pk{A(2\sqrt3)} = 0}
A(0)=0,\displaystyle {\pk{A(0)} = 0},
A(2)=4⋅8=32,\displaystyle {\pk{A(2)} = 4 \cdot 8 = 32},
A(23)=0\displaystyle {\pk{A(2\sqrt3)} = 0}
3
An open-top box with a square base must hold 8 ft38\text{ ft}^3. The material for the base costs $2 per ft², and the material for the sides costs $1 per ft². What is the least possible cost of the box? Justify your answer.

Which faces make up an open-top box, and what does each face cost?

If you got 124312\sqrt[3]{4} Check the cost of the base. The base costs $2 per square foot, so its cost is 2x22x^2, not x2x^2.

Use the fixed volumeThe box has a square base of side x\bl{x} and height h\gr{h}, so the volume x2h=8\bl{x}^2 \gr{h} = \gr{8} gives h\gr{h} in terms of x\bl{x}.
x2h=8  →  h=8x2\displaystyle {\bl{x}^2 \gr{h} = \gr{8}} \;\to\; {\gr{h} = \gr{\frac{8}{x^2}}}
Write the total costThe box has an open top, so the cost comes from one base at $2 per square foot and four sides at $1 per square foot.
C\displaystyle \pk{C} =2x2+1⋅4xh\displaystyle = 2\bl{x}^2 + 1 \cdot 4\bl{x}\gr{h} =2x2+32x,x>0\displaystyle = 2x^2 + \frac{32}{x}, \qquad {\bl{x} > 0}
Set the derivative equal to 00 to find the critical point.
C′(x)\displaystyle C'(x) =4x−32x2\displaystyle = 4x - \frac{32}{x^2} =4(x3−8)x2\displaystyle = \frac{4(x^3 - 8)}{x^2} =0  →  x\displaystyle = 0 \;\to\; \bl{x} =2\displaystyle = 2
Check the sign of the derivativeThe side length x\bl{x} can be any positive value, so we check the sign of C′C' on either side of x=2\bl{x} = 2.
0<x<2: C′(x)<0;x>2: C′(x)>0\displaystyle 0 < \bl{x} < 2:\ \dec{C'(x) < 0}; \qquad \bl{x} > 2:\ \inc{C'(x) > 0}
The cost decreases up to x=2\bl{x} = 2 and increases after, so x=2\bl{x} = 2 gives the least cost.
C(2)=8+16=24,h=2\displaystyle {\pk{C(2)} = 8 + 16 = 24}, \qquad {\gr{h} = 2}
4
A wire 4 m long is cut into two pieces. One piece is bent into a square and the other into a circle. (a) How much of the wire should go into the square to make the total area as small as possible? (b) How much should go into the square to make the total area as large as possible?

If the square uses xx meters of wire, the remaining 4−x4 - x meters form the circumference of the circle. What is the radius?

What is the total area when x=16π+4x = \frac{16}{\pi + 4}, when x=0x = 0, and when x=4x = 4?

If you got 16π+4\dfrac{16}{\pi + 4} for (b) Check the area at the ends. The critical point gives the smallest total area, not the largest.

Find the side and the radiusIf x\bl{x} meters make the square, each side is x4\bl{\frac{x}{4}}, and the remaining 4−x\gr{4 - x} meters make the circumference 2πr\gr{2\pi r}.
square side x4,2πr=4−x  →  r=4−x2π\displaystyle \text{square side } \bl{\frac{x}{4}}, \qquad {\gr{2\pi r} = \gr{4 - x}} \;\to\; {\gr{r} = \gr{\frac{4 - x}{2\pi}}}
Add the area of the square to the area of the circle.
A(x)\displaystyle \pk{A(\bl{x})} =x216+(4−x)24π,0≤x≤4\displaystyle = \frac{x^2}{16} + \frac{(4 - x)^2}{4\pi}, \qquad {0 \le \bl{x} \le 4}
Set the derivative equal to 00 to find the critical point.
A′(x)\displaystyle A'(x) =x8−4−x2π\displaystyle = \frac{x}{8} - \frac{4 - x}{2\pi} =0  →  πx\displaystyle = 0 \;\to\; \pi x =16−4x  →  x\displaystyle = 16 - 4x \;\to\; \bl{x} =16π+4\displaystyle = \frac{16}{\pi + 4}
Compare the critical point with the endsEvaluate the total area at the critical point and at the two ends where all the wire goes into one shape.
A(16π+4)=4π+4,A(0)=4π,A(4)=1\displaystyle {\pk{A\Big(\frac{16}{\pi + 4}\Big)} = \frac{4}{\pi + 4}}, \qquad {\pk{A(0)} = \frac{4}{\pi}}, \qquad {\pk{A(4)} = 1}
A(16π+4)=4π+4,\displaystyle {\pk{A\Big(\frac{16}{\pi + 4}\Big)} = \frac{4}{\pi + 4}},
A(0)=4π,\displaystyle {\pk{A(0)} = \frac{4}{\pi}},
A(4)=1\displaystyle {\pk{A(4)} = 1}
4π+4<1<4π(π+4>4, π<4)\displaystyle \frac{4}{\pi + 4} < 1 < \frac{4}{\pi} \qquad (\pi + 4 > 4, \ \pi < 4)
The critical point gives the smallest area, and putting all the wire into the circle gives the largest area.
(a) x=16π+4,(b) x=0\displaystyle \text{(a) } {\bl{x} = \frac{16}{\pi + 4}}, \qquad \text{(b) } {\bl{x} = 0}
5
An oil rig is 4 km offshore from the nearest point PP on a straight shore. A refinery is on the shore, 2 km from PP. A pipe costs $5 million per km underwater and $3 million per km on land. The pipe runs underwater to a point on the shore between PP and the refinery, then along the shore to the refinery. What is the least possible cost?

If the pipe reaches the shore at distance xx from PP, does x=3x = 3 lie between PP and the refinery?

If you got 2222 Check the interval for xx. The refinery is only 2 km from PP, so the critical point x=3x = 3 lies past the refinery.

Write the cost functionIf the pipe reaches the shore x\bl{x} km from PP, the underwater pipe is the hypotenuse of a right triangle with legs 4 and x\bl{x}, and the land pipe runs the remaining distance 2−x\gr{2 - x}.
C(x)\displaystyle \pk{C(\bl{x})} =516+x2+3(2−x),0≤x≤2\displaystyle = 5\gr{\sqrt{16 + x^2}} + 3\gr{(2 - x)}, \qquad {0 \le \bl{x} \le 2}
Set the derivative equal to 00 and square both sides to find the critical point.
C′(x)\displaystyle C'(x) =5x16+x2−3\displaystyle = \frac{5x}{\sqrt{16 + x^2}} - 3 =0:5x\displaystyle = 0: \quad 5x =316+x2  →  16x2\displaystyle = 3\sqrt{16 + x^2} \;\to\; 16x^2 =144  →  x\displaystyle = 144 \;\to\; \bl{x} =3\displaystyle = 3
Check the intervalThe critical point x=3\mut{x = 3} lies past the refinery, so C′(x)C'(x) has no zeros on [0,2][0, 2] and stays negative.
3>2,C′(0)=−3<0  →  C′(x)<0 on [0,2]\displaystyle \mut{3} > 2, \qquad {\dec{C'(0) = -3 < 0}} \;\to\; \dec{C'(x) < 0 \text{ on } [0, 2]}
Because the cost decreases all the way to x=2\bl{x} = 2, running the pipe straight underwater to the refinery costs the least.
C(0)=20+6=26,C(2)=520=105\displaystyle {\pk{C(0)} = 20 + 6 = 26}, \qquad {\pk{C(2)} = 5\sqrt{20} = 10\sqrt5}
C(0)=20+6=26,\displaystyle {\pk{C(0)} = 20 + 6 = 26},
C(2)=520=105\displaystyle {\pk{C(2)} = 5\sqrt{20} = 10\sqrt5}
6
Find the points on the parabola y=x2y = x^2 that are closest to the point (0,2)(0, 2). Justify your answer.

What is the squared distance at each of the three critical points?

If you got (0,0)(0, 0) Check the sign change of the derivative at x=0x = 0. The derivative changes from positive to negative there, so the distance has a local maximum at (0,0)(0, 0), not a minimum.

Write the squared distanceA point on the curve is (x,x2)(\bl{x}, \gr{x^2}), and minimizing the distance is the same as minimizing the squared distance D(x)\pk{D(\bl{x})}.
(x,x2),D(x)\displaystyle (\bl{x}, \gr{x^2}), \qquad \pk{D(\bl{x})} =x2+(x2−2)2\displaystyle = \bl{x}^2 + (\gr{x^2} - 2)^2 =x4−3x2+4\displaystyle = x^4 - 3x^2 + 4
Differentiate and factor to find all three critical points.
D′(x)\displaystyle D'(x) =4x3−6x\displaystyle = 4x^3 - 6x =2x(2x2−3)\displaystyle = 2x(2x^2 - 3) =0  →  x=0, x=±62\displaystyle = 0 \;\to\; {\bl{x} = 0}, \ {\bl{x} = \pm\frac{\sqrt6}{2}}
Test the critical pointsChecking the sign of D′D' shows that D\pk{D} decreases until x=−62\bl{x} = -\frac{\sqrt6}{2}, increases until x=0\bl{x} = 0, decreases until x=62\bl{x} = \frac{\sqrt6}{2}, and increases after.
D′<0 for x<−62;D′>0 on (−62,0);\displaystyle {\dec{D' < 0 \text{ for } \bl{x} < -\frac{\sqrt6}{2}}; \quad \inc{D' > 0 \text{ on } \Big(-\frac{\sqrt6}{2}, 0\Big)};}
D′<0 on (0,62);D′>0 for x>62\displaystyle {\dec{D' < 0 \text{ on } \Big(0, \frac{\sqrt6}{2}\Big)}; \quad \inc{D' > 0 \text{ for } \bl{x} > \frac{\sqrt6}{2}}}
D′<0 for x<−62;\displaystyle {\dec{D' < 0 \text{ for } \bl{x} < -\frac{\sqrt6}{2}};}
D′>0 on (−62,0);\displaystyle {\inc{D' > 0 \text{ on } \Big(-\frac{\sqrt6}{2}, 0\Big)};}
D′<0 on (0,62);\displaystyle {\dec{D' < 0 \text{ on } \Big(0, \frac{\sqrt6}{2}\Big)};}
D′>0 for x>62\displaystyle {\inc{D' > 0 \text{ for } \bl{x} > \frac{\sqrt6}{2}}}
D(0)=4,D(±62)=94−92+4=74\displaystyle {\pk{D(0)} = 4}, \qquad {\pk{D\Big(\pm\frac{\sqrt6}{2}\Big)} = \frac94 - \frac92 + 4 = \frac74}
D(0)=4,\displaystyle {\pk{D(0)} = 4},
D(±62)=94−92+4=74\displaystyle {\pk{D\Big(\pm\frac{\sqrt6}{2}\Big)} = \frac94 - \frac92 + 4 = \frac74}
The minimum squared distance is 74\frac74, and that gives two closest points on the parabola.
(±62,32),d\displaystyle \Big(\pm\frac{\sqrt6}{2}, \frac32\Big), \qquad \pk{d} =72\displaystyle = \frac{\sqrt7}{2}
7
A right circular cylinder stands inside a cone of radius 3 and height 6. The cylinder stands on the cone's base and has the same axis. What is the largest possible volume of the cylinder?

At height hh, what is the radius of the cone?

If you got 54π54\pi Check the relation between rr and hh. The cone's radius decreases as height increases, so h=6−2rh = 6 - 2r, not h=2rh = 2r. The cone's total volume is only 18π18\pi, so the cylinder can't exceed that.

Relate the radius and heightBy similar triangles, the cone's radius decreases linearly from 3\gr{3} at the base to 00 at height 6\gr{6}.
cone radius at height h\displaystyle \text{cone radius at height } \gr{h} =3−h2,r=3−h2  →  h=6−2r\displaystyle = \gr{3 - \frac{h}{2}}, \qquad {\bl{r} = \gr{3 - \frac{h}{2}}} \;\to\; {\gr{h} = \gr{6 - 2r}}
The volume of the cylinder is πr2h\pi \bl{r}^2 \gr{h}, and r\bl{r} can go from 00 up to the cone's base radius of 3\gr{3}.
V(r)\displaystyle \pk{V(\bl{r})} =πr2(6−2r)\displaystyle = \pi \bl{r}^2 \gr{(6 - 2r)} =π(6r2−2r3),0≤r≤3\displaystyle = \pi(6r^2 - 2r^3), \qquad {0 \le \bl{r} \le 3}
Set the derivative equal to 00 to find the critical point.
V′(r)\displaystyle V'(r) =π(12r−6r2)\displaystyle = \pi(12r - 6r^2) =6πr(2−r)\displaystyle = 6\pi r(2 - r) =0  →  r=2,h=2\displaystyle = 0 \;\to\; {\bl{r} = 2}, \quad {\gr{h} = 2}
Compare the volume at r=2\bl{r} = 2 with the ends r=0\bl{r} = 0 and r=3\bl{r} = 3.
V(0)=0,V(2)=8π,V(3)=0\displaystyle {\pk{V(0)} = 0}, \qquad {\pk{V(2)} = 8\pi}, \qquad {\pk{V(3)} = 0}
V(0)=0,\displaystyle {\pk{V(0)} = 0},
V(2)=8π,\displaystyle {\pk{V(2)} = 8\pi},
V(3)=0\displaystyle {\pk{V(3)} = 0}