Paul's Online Math Notes
Calculus I (Notes) / Applications of Derivatives / More Optimization Problems   [Notes] [Practice Problems] [Assignment Problems]

Calculus I - Notes
Derivatives Previous Chapter   Next Chapter Integrals
Optimization Previous Section   Next Section L'Hospital's Rule and Indeterminate Forms

 More Optimization Problems

Because these notes are also being presented on the web we’ve broken the optimization examples up into several sections to keep the load times to a minimum.  Do not forget the various methods for verifying that we have the optimal value that we looked at in the previous section.  In this section we’ll just use them without acknowledging so make sure you understand them and can use them.  So let’s get going on some more examples.


Example 1  A window is being built and the bottom is a rectangle and the top is a semicircle.  If there is 12 meters of framing materials what must the dimensions of the window be to let in the most light?



Okay, let’s ask this question again in slightly easier to understand terms.  We want a window in the shape described above to have a maximum area (and hence let in the most light) and have a perimeter of 12 m (because we have 12 m of framing material).  Little bit easier to understand in those terms.


Here’s a sketch of the window.  The height of the rectangular portion is h and because the semicircle is on top we can think of the width of the rectangular portion at 2r.



The perimeter (our constraint) is the lengths of the three sides on the rectangular portion plus half the circumference of a circle of radius r.  The area (what we want to maximize) is the area of the rectangle plus half the area of a circle of radius r.  Here are the equations we’ll be working with in this example.



In this case we’ll solve the constraint for h and plug that into the area equation.



The first and second derivatives are,



We can see that the only critical point is,



We can also see that the second derivative is always negative (in fact it’s a constant) and so we can see that the maximum area must occur at this point.  So, for the maximum area the semicircle on top must have a radius of 1.6803 and the rectangle must have the dimensions 3.3606 x 1.6803 (h x 2r).


Example 2  Determine the area of the largest rectangle that can be inscribed in a circle of radius 4.



Huh?  This problem is best described with a sketch.  Here is what we’re looking for.


We want the area of the largest rectangle that we can fit inside a circle and have all of its corners touching the circle.


To do this problem it’s easiest to assume that the circle (and hence the rectangle) is centered at the origin.  Doing this we know that the equation of the circle will be


and that the right upper corner of the rectangle will have the coordinates .  This means that the width of the rectangle will be 2x and the height of the rectangle will be 2y.  The area of the rectangle will then be,



So, we’ve got the function we want to maximize (the area), but what is the constraint?  Well since the coordinates of the upper right corner must be on the circle we know that x and y must satisfy the equation of the circle.  In other words, the equation of the circle is the constraint.


The first thing to do then is to solve the constraint for one of the variables.



Since the point that we’re looking at is in the first quadrant we know that y must be positive and so we can take the “+” part of this.  Plugging this into the area and computing the first derivative gives,



Before getting the critical points let’s notice that we can limit x to the range  since we are assuming that x is in the first quadrant and must stay inside the circle.  Now the four critical points we get (two from the numerator and two from the denominator) are,



We only want critical points that are in the range of possible optimal values so that means that we have two critical points to deal with :  and .  Notice however that the second critical point is also one of the endpoints of our interval.


Now, area function is continuous and we have an interval of possible solution with finite endpoints so,



So, we can see that we’ll get the maximum area if  and the corresponding value of y is,



It looks like the maximum area will be found if the inscribed rectangle is in fact a square.


We need to again make a point that was made several times in the previous section.  We excluded several critical points in the work above.  Do not always expect to do that.  There will often be physical reasons to exclude zero and/or negative critical points, however, there will be problems where these are perfectly acceptable values.  You should always write down every possible critical point and then exclude any that can’t be possible solutions.  This keeps you in the habit of finding all the critical points and then deciding which ones you actually need and that in turn will make it less likely that you’ll miss one when it is actually needed.


Example 3  Determine the point(s) on  that are closest to (0,2).



Here’s a quick sketch of the situation.



So, we’re looking for the shortest length of the dashed line.  Notice as well that if the shortest distance isn’t at  there will be two points on the graph, as we’ve shown above, that will give the shortest distance.  This is because the parabola is symmetric to the y-axis and the point in question is on the y-axis.  This won’t always be the case of course so don’t always expect two points in these kinds of problems.


In this case we need to minimize the distance between the point (0,2) and any point that is one the graph (x,y).  Or,



If you think about the situation here it makes sense that the point that minimizes the distance will also minimize the square of the distance and so since it will be easier to work with we will use the square of the distance and minimize that.  If you aren’t convinced of this we’ll take a closer look at this after this problem.  So, the function that we’re going to minimize is,



The constraint in this case is the function itself since the point must lie on the graph of the function.


At this point there are two methods for proceeding.  One of which will require significantly more work than the other.  Let’s take a look at both of them.


Solution 1

In this case we will use the constraint in probably the most obvious way.  We already have the constraint solved for y so let’s plug that into the square of the distance and get the derivatives.



So, it looks like there are three critical points for the square of the distance and notice that this time, unlike pretty much every previous example we’ve worked, we can’t exclude zero or negative numbers.  They are perfectly valid possible optimal values this time.



Before going any farther, let’s check these in the second derivative to see if they are all relative minimums.



So,  is a relative maximum and so can’t possibly be the minimum distance.  That means that we’ve got two critical points. The question is how do we verify that these give the minimum distance and yes we did mean to say that both will give the minimum distance.  Recall from our sketch above that if x gives the minimum distance then so will x and so if gives the minimum distance then the other should as well.


None of the methods we discussed in the previous section will really work here.  We don’t have an interval of possible solutions with finite endpoints and both the first and second derivative change sign.  In this case however, we can still verify that they are the points that give the minimum distance.


First, notice that if we are working on the interval  then the endpoints of this interval (which are also the critical points) are in fact where the absolute minimum of the function occurs in this interval. 


Next we can see that if  then .  Or in other words, if  the function is decreasing until it hits  and so must always be larger than the function at .


Similarly,   then  and so the function is always increasing to the right of   and so must be larger than the function at .


So, putting all of this together tells us that we do in fact have an absolute minimum at .


All that we need to do is to find the value of y for these points.



So, the points on the graph that are closest to (0,2) are,



Solution 2

The first solution that we worked was actually the long solution.  There is a much shorter solution to this problem.  Instead of plugging y into the square of the distance let’s plug in x.  From the constraint we get,


and notice that the only place x show up in the square of the distance it shows up as x2 and let’s just plug this into the square of the distance.  Doing this gives,



There is now a single critical point, , and since the second derivative is always positive we know that this point must give the absolute minimum.  So all that we need to do at this point is find the value(s) of x that go with this value of y.



The points are then,



So, for significantly less work we got exactly the same answer.


This previous example had a couple of nice points.  First, as pointed out in the problem, we couldn’t exclude zero or negative critical points this time as we’ve done in all the previous examples.  Again, be careful to not get into the habit of always excluding them as we do many of the examples we’ll work.


Next, some of these problems will have multiple solution methods and sometimes one will be significantly easier than the other.  The method you use is up to you and often the difficulty of any particular method is dependent upon the person doing the problem.  One person may find one way easier and other person may find a different method easier.


Finally, as we saw in the first solution method sometimes we’ll need to use a combination of the optimal value verification methods we discussed in the previous section.


Now, before we move onto the next example let’s take a look at the claim above that we could find the location of the point that minimizes the distance by finding the point that minimizes the square of the distance.  We’ll generalize things a little bit,



Suppose that we have a positive function, , that exists everywhere then  and  will have the same critical points and the relative extrema will occur at the same points.


This is simple enough to prove so let’s do that here.  First let’s take the derivative of  and see what we can determine about the critical points of .




Let’s plug  into this to get,




By assumption we know that  exists and  and therefore the denominator of this will always exist and will never be zero.  We’ll need this in several places so we can’t forget this.


If  then because we know that the denominator will not be zero here we must also have .  Likewise, if  then we must have . So,   and  will have the same critical points in which the derivatives will be zero.


Next, if  doesn’t exist then  will also not exist and likewise if  doesn’t exist then because we know that the denominator will not be zero then this means that  will also not exist.  Therefore,  and  will have the same critical points in which the derivatives does not exist.


So, the upshot of all this is that   and  will have the same critical points.


Next, let’s notice that because we know that  then  and  will have the same sign and so if we apply the first derivative test (and recalling that they have the same critical points) to each of these functions we can see that the results will be the same and so the relative extrema will occur at the same points.


Note that we could also use the second derivative test to verify that the critical points will have the same classification if we wanted to.  The second derivative is (and you should see if you can use the quotient rule to verify this),




Then if  is a critical point such that  (and so we can use the second derivative test) we get,




Now, because we know that  and by assumption  we can see that  and  will have the same sign and so will have the same conclusion from the second derivative test.


So, now that we have that out of the way let’s work some more examples.


Example 4  A 2 feet piece of wire is cut into two pieces and once piece is bent into a square and the other is bent into an equilateral triangle.  Where should the wire cut so that the total area enclosed by both is minimum and maximum?



Before starting the solution recall that an equilateral triangle is a triangle with three equal sides and each of the interior angles are  (or  ).


Now, this is another problem where the constraint isn’t really going to be given by an equation, it is simply that there is 2 ft of wire to work with and this will be taken into account in our work. 


So, let’s cut the wire into two pieces.  The first piece will have length x which we’ll bend into a square and each side will have length .  The second piece will then have length  (we just used the constraint here…) and we’ll bend this into an equilateral triangle and each side will have length .  Here is a sketch of all this.



As noted in the sketch above we also will need the height of the triangle.  This is easy to get if you realize that the dashed line divides the equilateral triangle into two other triangles.  Let’s look at the right one.  The hypotenuse  is  while the lower right angle is .  Finally the height is then the opposite side to the lower right angle so using basic right triangle trig we arrive at the height of the triangle as follows.




So, the total area of both objects is then,



Here’s the first derivative of the area.



Setting this equal to zero and solving gives the single critical point of,



Now, let’s notice that the problem statement asked for both the minimum and maximum enclosed area and we got a single critical point.  This clearly can’t be the answer to both, but this is not the problem that it might seem to be.


Let’s notice that x must be in the range  and since the area function is continuous we use the basic process for finding absolute extrema of a function.



So, it looks like the minimum area will arise if we take  while the maximum area will arise if we take the whole piece of wire and bend it into a square.


As the previous problem illustrated we can’t get too locked into the answers always occurring at the critical points as they have to this point.  That will often happen, but one of the extrema in the previous problem was at an endpoint and that will happen on occasion.


Example 5  A piece of pipe is being carried down a hallway that is 10 feet wide.  At the end of the hallway the there is a right-angled turn and the hallway narrows down to 8 feet wide.  What is the longest pipe that can be carried (always keeping it horizontal) around the turn in the hallway?



Let’s start off with a sketch of the situation so we can get a grip on what’s going on and how we’re going to have to go about solving this.


The largest pipe that can go around the turn will do so in the position shown above.  One end will be touching the outer wall of the hall way at A and C and the pipe will touch the inner corner at B.  Let’s assume that the length of the pipe in the small hallway is  while  is the length of the pipe in the large hallway.  The pipe then has a length of .


Now, if  then the pipe is completely in the wider hallway and we can see that as  then .  Likewise, if  the pipe is completely in the narrow hallway and as  we also have .  So, somewhere in the interval  is an angle that will minimize L and oddly enough that is the length that we’re after.  The largest pipe that will fit around the turn will in fact be the minimum value of L.


The constraint for this problem is not so obvious and there are actually two of them.  The constraints for this problem are the widths of the hallways.  We’ll use these to get an equation for L in terms of  and then we’ll minimize this new equation.


So, using basic right triangle trig we can see that,



So, differentiating L gives,



Setting this equal to zero and solving gives,



Solving for  gives,



So, if  radians then the pipe will have a minimum length and will just fit around the turn.  Anything larger will not fit around the turn and so the largest pipe that can be carried around the turn is,



Example 6  Two poles, one 6 meters tall and one 15 meters tall, are 20 meters apart.  A length of wire is attached to the top of each pole and it is also staked to the ground somewhere between the two poles.  Where should the wire be staked so that the minimum amount of wire is used?



As always let’s start off with a sketch of this situation.



The total length of the wire is  and we need to determine the value of x that will minimize this.  The constraint in this problem is that the poles must be 20 meters apart and that x must be in the range .  The first thing that we’ll need to do here is to get the length of wire in terms of x, which is fairly simple to do using the Pythagorean Theorem.




Not the nicest function we’ve had to work with but there it is.  Note however, that it is a continuous function and we’ve got an interval with finite endpoints and so finding the absolute minimum won’t require much more work than just getting the critical points of this function.  So, let’s do that.  Here’s the derivative.




Setting this equal to zero gives,



It’s probably been quite a while since you’ve been asked to solve something like this.  To solve this we’ll need to square both sides to get rid of the roots, but this will cause problems as well soon see.  Let’s first just square both sides and solve that equation.




Note that if you can’t do that factoring don't worry, you can always just use the quadratic formula and you’ll get the same answers. 


Okay two issues that we need to discuss briefly here.  The first solution above (note that I didn’t call it a critical point…) doesn’t make any sense because it is negative and outside of the range of possible solutions and so we can ignore it. 


Secondly, and maybe more importantly, if you were to plug  into the derivative you would not get zero and so is not even a critical point.  How is this possible?  It is a solution after all.  We’ll recall that we squared both sides of the equation above and it was mentioned at the time that this would cause problems.  We’ll we’ve hit those problems.  In squaring both sides we’ve inadvertently introduced a new solution to the equation.  When you do something like this you should ALWAYS go back and verify that the solutions that you get are in fact solutions to the original equation.  In this case we were lucky and the “bad” solution also happened to be outside the interval of solutions we were interested in but that won’t always be the case.


So, if we go back and do a quick verification we can in fact see that the only critical point is  and this is nicely in our range of acceptable solutions.


Now all that we need to do is plug this critical point and the endpoints of the wire into the length formula and identify the one that gives the minimum value.



So, we will get the minimum length of wire if we stake it to the ground  feet from the smaller pole.


Let’s do a modification of the above problem that asks a completely different question.


Example 7  Two poles, one 6 meters tall and one 15 meters tall, are 20 meters apart.  A length of wire is attached to the top of each pole and it is also staked to the ground somewhere between the two poles.  Where should the wire be staked so that the angle formed by the two pieces of wire at the stake is a maximum?



Here’s a sketch for this example.



The equation that we’re going to need to work with here is not obvious.  Let’s start with the following fact.



Note that we need to make sure that the equation is equal to  because of how we’re going to work this problem.  Now, basic right triangle trig tells us the following,



Plugging these into the equation above and solving for  gives,


Note that this is the reason for the  in our equation.  The inverse tangents give angles that are in radians and so can’t use the 180 that we’re used to in this kind of equation.


Next we’ll need the derivative so hopefully you’ll recall how to differentiate inverse tangents.



Setting this equal to zero and solving give the following two critical points.


The first critical point is not in the interval of possible solutions and so we can exclude it.


It’s not difficult to show that if  that  and if  that  and so when  we will get the maximum value of .


Example 8  A trough for holding water is be formed by taking a piece of sheet metal 60 cm wide and folding the 20 cm on either end up as shown below.  Determine the angle  that will maximize the amount of water that the trough can hold.



Now, in this case we are being asked to maximize the volume that a trough can hold, but if you think about it the volume of a trough in this shape is nothing more than the cross-sectional area times the length of the trough.  So for a given length in order to maximize the volume all you really need to do is maximize the cross-sectional area.


To get a formula for the cross-sectional area let’s redo the sketch above a little.



We can think of the cross-sectional area as a rectangle in the middle with width 20 and height h and two identical triangles on either end with height h, base b and hypotenuse 20.  Also note that basic geometry tells us that the angle between the hypotenuse and the base must also be the same angle  that we had in our original sketch.

Also, basic right triangle trig tells us that the base and height can be written as,



The cross-sectional area for the whole trough, in terms of , is then,



The derivative of the area is,



So, we have either,



However, we can see that  must be in the interval  or we won’t get a trough in the proper shape.  Therefore, the second critical point makes no sense and also note that we don’t need to add on the standard “ ” for the same reason.


Finally, since the equation for the area is continuous all we need to do is plug in the critical point and the end points to find the one that gives the maximum area.




So, we will get a maximum cross-sectional area, and hence a maximum volume, when .

Optimization Previous Section   Next Section L'Hospital's Rule and Indeterminate Forms
Derivatives Previous Chapter   Next Chapter Integrals

Calculus I (Notes) / Applications of Derivatives / More Optimization Problems    [Notes] [Practice Problems] [Assignment Problems]

[Contact Me] [Downloads] [Privacy Statement] [Site Help] [Site Map] [Terms of Use]      [Switch to Mobile View]

© 2003 - 2016 Paul Dawkins