Math 165 – worksheet for 4.6, Applied Optimization – solutions Remember the steps: 1. Give names to all relevant quantities. 2. Write the target quantity f as function of the variables from 1. 3. Express f as function of one single variable. 4. Find domain of f (= allowed values of input). 5. Find critical points of f . 6. Find sign pattern of f 0 , or use just a table of values of f to determine min/max. Problem 1 Pig Pens Given 100m of wire fence, build two rectangular pens with a common side with maximal area. Solution Call the length of the common side x, and y the total length in the other direction. Note that the rectangles do not have to be of the same dimensions - the common side can be anywhere between the two other sides parallel to it. But that does not matter for the amount of fence, nor for the total area. The total amount of fence is 100, so 3x + 2y = 100. We know that the area is A = xy. Use the first equation to eliminate y, y= 100 − 3x 2 and we want to maximize A = xy = x(100 − 3x)/2. The domain D for x is [0, 100/3], since both x and y cannot be negative. Calculate all the critical points of the function A on D! For the stationary point(s), solve A0 (x) = 0: A0 (x) = 50 − 3x = 0 gives x = 50/3. Together with the endpoints of D, we have critical points at x = 0, 50/3, 100/3. Evaluate A there – at the endpoints, we get A = 0, so the maximum is not at the endpoints. The value x = 50/3 gives y = 25 and the area A = 1250/3, bigger than 0, so this is the maximum (we have a finite, closed interval as domain, so the maximum has to occur at one of the critical points). Problem 2 Gutter Given a 20cm wide strip of sheet metal, with parallel folds at 5 and at 15 cm, we want to build an open-top gutter by folding up the first and last 5 centimeters, leaving a base of 10 centimeters. At what angle should we fold up the two 5cm sides to give the cross-section maximum area? Solution Call θ the angle of the folded up line segment with the horizontal and h the height of the trapezoid that forms the cross-section. The trapezoid consists of a rectangle in the center, with dimensions 10 × h, and two right triangles on the left and right, with hypotenuse 5, height h, and base (actually at the top) b = 5 cos θ. So the total area is A = 10h + 5h cos θ. Finally, h and θ are related by h = 5 sin θ. We can now express A as a function of θ alone: A = 5 sin θ(10 + 5 cos θ) The domain for θ is [0, π] (OK, angles greater than π/2 do not make much sense for maximizing area, but at least they are technically possible). Now the critical points (we use Pythagoras to simplify, and factor out 25): A0 (θ) = 5 cos θ(10 + 5 cos θ) − 25 sin2 θ = 25(2 cos2 θ + 2 cos θ − 1) = 0 This is a quadratic equation in u = cos θ, and it has solutions √ √ 3 −2 ± 4 + 8 1 u= =− ± . 4 2 2 The negative solution is less than −1, so not a possible value of cos θ. The only critical point besides the endpoints is therefore ! √ 3 − 1 , θ = cos−1 2 and the maximum area must occur there, because at the endpoints, we get area zero (much like Problem 1 on this worksheet). Problem 3 Distance Every 42 years, comet DXDY comes out of hyperspace on an orbit with equation √ y = 5 + x2 . Mothership NEWTON wants to send a space probe to explore comet DXDY. NEWTON is positioned at (1, 0). Which point on the comet’s orbit is closest to the mothership? An earlier version of this worksheet had NEWTON’s position as (0, 1), which gives a problem that can be solved, but the solution is rather obvious (graph the orbit!). Solution Call (x, y) the coordinates of a point on the comet’s orbit. Using the equation for the orbit, the distance z of (x, y) from (0, 1) is p √ √ z = (x − 1)2 + y 2 = x2 − 2x + 1 + x2 + 5 = 2x2 − 2x + 6. The domain for x is (−∞, ∞. We look for critical points: First, z(x) is differentiable everywhere, and 4x − 2 2x − 1 z 0 (x) = √ =√ 2 2x2 − 2x + 6 2x2 − 2x + 6 This equals zero exactly for x = 1/2, with a sign pattern of −+. So √ at x = 1/2, we have our minimum! (the point belonging to x = 1/2 is (1/2, 21/2)). Problem 4 Ladder A ladder needs to be carried around a corner of a hallway. The hallway is 10 feet wide, all angles are right angles, and the ladder is just a line segment. How long can the ladder be so that we can still turn the corner of this hallway? (challenge problem: what if the width of the hallway is a feet on one side and b feet on the other?). The line segment below shows a ladder that is too long. Hint: instead of maximizing the length of the ladder, minimize the length of a line segment that touches the corner and just fits into the hallway at the given angle. Solution Consider a line segment as shown in the plot above, connecting the two outside walls and touching the inner corner. Let L be its length and θ be the angle which it makes with the vertical wall (the angle between 0 and π/2). Then the length of the sub-segment from the North-South wall to the corner is 10 L1 = sin θ and the length of the sub-segment from the corner to the East-West wall is L2 = 10 . cos θ We need to minimize L(θ) = L1 + L2 = 10 1 1 + sin θ cos θ . The domain for θ is (0, π/2). We look for critical points: L0 (θ) = − 10 cos θ 10 sin θ + . cos2 θ sin2 θ To solve L0 (θ) = 0, we bring both terms on to a common denominator, L0 (θ) = 10(sin3 θ − cos3 θ) sin2 θ cos2 θ which is zero exactly for cos3 θ = sin3 θ so cos θ = sin θ, giving θ = π/4. The sign pattern of L0 (θ) is −+, so at θ = π/4 we indeed have the global minimum of L. The biggest possible length of the ladder equals this minimum of L. √ L(π/4) = 10 2 ≈ 14.1. Problem 5 Dolphins Build a dolphin enclosure for the Des Moines Zoo in the shape of a rectangle with two semicircles attached to opposite sides. The area is supposed to be 40,000 square feet. Given that you only need to build the two semicircles and the two other sides of the rectangle (not the sides where the semicircles are attached), which dimensions require the least amount of building material? Solution Let x, y be the dimensions of the rectangle. The semicircles will have diameter x and be attached at the corresponding sides of the rectangle. Then the total area is A= πx2 + xy = 40000. 4 Use this to eliminate y: 160000 − πx2 4x Then the amount of building material is proportional to the length of the boundary, which is y= L = πx + 2y = πx + The domain for x is [0, 160000 − πx2 πx 80000 = + . 2x 2 x p 160000/π]. Differentiate L with regard to x: L0 = π 80000 − . 2 x2 Solving L0 = 0 gives r x= 160000 400 =√ π π which is also one of the endpoints of the domain! The sign pattern of L0 is just −, meaning the minimum occurs at the right endpoint. The optimal dimensions are then given by x as above and y = 0, the shape of the optimal enclosure is just a circle!