Calculus I
Lesson 8: Max and Min Problems 1
In the next three lessons, we demonstrate the solution process for various optimization problems using derivatives.
Example 1
A right circular cylinder is inscribed in a sphere of radius r. Find the
largest possible surface area of such a cylinder.
Here's a diagram of the situation.
> with(plottools): r := 1: h := 1.2*r: cyl := cylinder([0,0,-h/2], sqrt(r^2-h^2/4), h, shading=xyz, style=patchnogrid): ball := sphere([0,0,0], r, color=green): plots[display]([cyl,ball], scaling=constrained, style=wireframe, orientation=[45,74]);
Let r = radius of sphere
a = radius of base of cylinder
b = 1/2 the height of the cylinder
We have:
SA = surface area of cylinder =
(draw a picture) .
Using
we obtain:
.
We want to find a maximum for SA.
> restart;
> SA:= b ->2* Pi *(r^2 - b^2) + 4 * Pi * sqrt( r^2 - b^2) * b;
> D(SA);
> simplify( -4*Pi*b-4*Pi*b^2/sqrt(r^2-b^2)+4*Pi*sqrt(r^2-b^2) );
Set numerator to zero and solve for b.
> soln := solve( b^2 * ( r^2 - b^2 ) = (r^2 - 2* b^2 )^2, b);
> evalf( soln );
We need to check which if any of the above solutions to SA' = 0 lead to a maximal surface area.
As we squared both sides of an equation to solve, we need to check our solutions. Of course,
we are not interested in negative solutions, as b must be positive.
We check whether SA'( ) and SA'( ) are indeed 0.
> g:= b -> b*sqrt(r^2-b^2)+2*b^2-r^2;
> g(.8506508084*r);
> g(.5257311121*r);
Conclusion: SA'( ) is NOT zero and SA'( ) = 0.
Hence the only critical value we have is .
We look at SA'' to determine if SA is max at
> D(D(SA))(.5257311121*r);
We see that SA''( ) < 0 and therefore SA has a maximum
when b = .
> SA(.5257311121*r);
Largest surface area is (numerically given by): .
Example 2 Find the minimum distance from a point on the curve to the point (1,-1).
Is there a point where the distance is a maximum? If yes, find it.
Here's a diagram of the situation
> with(plots):
Warning, the names arrow and changecoords have been redefined
> f2:= x -> x^2 + 1;
> a2:= plot(f2(x), x = -2..3, color = black):
> b2:= line([1,-1], [0, f2(0)], color=red, linestyle=1):
> c2:= line([1,-1], [2, f2(2)], color=red, linestyle=1):
> d2:= line([1,-1], [-1, f2(-1)], color=red, linestyle=1):
> display([a2,b2,c2,d2]);
From the above plot we see that there is NOT going to be a point on the graph of y = x^2 + 1
whose distance to (1,-1) is a maximum. So we search for where this distance is a
minimum.
We need the distance between points:
(1,-1) and ( , ).
Set g2:= .
Minimize g2.
> g2:= x -> (x - 1)^2 + ( x^2 + 2)^2;
Lets see a plot of g2 - remember we are looking for a minimum.
> plot(g2(x), x = 0..5);
> plot(g2(x), x = 0..1);
> fsolve(D(g2)(x) = 0, x = 0..4);
We have one critical value:
> evalf(D(D(g2))(.1969444377));
As the second derivative is >0 at the critical value, g2 has a minimum at
this critical value.
Conclusion: When x = , the distance from the point ( )
to the point (1,-1) is minimum.
Example 3 A manufactureer of tin cans is to make a tin can holding 80 cubic inches.
a) What is the least amount of tin needed for such a can?
b) What is the radius and height of the can requiring the least amount of tin?
We do part (a) first. Let r denote the radius of the base of the can,
h the height of the can, SA the durface area of the can, and V the volume of the can.
Thus, and .
Using we obtain:
We want to minimize SA.
> g3:= r -> 2 * Pi * r^2 + 160/r;
> plot(g3(r), r=1..5);
From the plot of g3, there appears to be a unique minimum. We need to precisely
locate the minimum.
> fsolve(D(g3)(r) = 0, r = 0..4);
> D(D(g3))(2.335088650);
> g3(2.335088650);
Thus, the function g3 has a critical value at r = ;
the second derivative of g3 at the critical value is positive and hence
g3 has a minimum at this critical value.
Conclusion: The minimum amount of tin requried is :
We now do part (b).
> h3:= r -> (80)/(Pi * r^2);
> h3(2.335088650);
Conclusion: At the minimum SA, the tin can has a radius of 2.335088650 and a
height of .
Example 4 A triangle has two sides of length 5 and 8.
a) What is the angle between the two sides so that the the area is largest?
b) What is the perimeter of the triangle when its area is the largest?
We do (a) first. Let A denote the area of the triangle and b denote the
angle between the two given sides of length 5 and 8.
Then
A = (1/2) * 5 * 8 * sin(b) =
We want to maximize A.
> A4:= b -> 20 * sin(b);
> plot(A4(b), b = 0..2*Pi, color = black);
From the plot there appears to be one maximum between 0 and 2Pi.
> fsolve(D(A4)(b) = 0, b = 0..Pi);
> D(D(A4))(1.570796327);
The critical value of A4 between 0 and Pi is:
Also, A4''( ) < 0.
Conclusion: the area of the triangle is a maximum when the angle between the given
sides is radians.
We do part (b).
Let c denote the length of the remaining side of the triangle.
Recall that b denotes the angle between the sides of length 5 and 8.
Law of cosines gives:
= - 2*5*8*cos( b) .
> c:= sqrt(25 + 64 - 80 * cos(1.570796327));
> P:= 9.433981133 + 5 + 8;
>
Perimeter of tirangle with largest area is .