Video: Optimization Using Derivatives

In this video, we will learn how to apply derivatives to real-world problems to optimize a function under certain constraints.

17:56

Video Transcript

In this video, we will see one of the practical applications of differentiation to optimization problems. That is, problems where we’re asked to determine the maximum or minimum value of a given function such as time, area, or perimeter. We’ll be able to answer questions like what does the maximum area I can enclose with a given length of fencing or what is the highest point reached by a rocket following a given curve. In some examples, we’ll also see how to form the optimization function and any constraints ourselves from a worded description.

We recall, first of all, some key facts about using differentiation to find the critical points of a function. The critical points of a function are those points in its domain where its first derivative, 𝑓 prime of π‘₯, is equal to zero or is undefined. To find the π‘₯-value at a critical point, we can differentiate the function to find its gradient, or slope, function and then set this equal to zero and solve the resulting equation. We can find the value of the function itself at the critical point by substituting our π‘₯-value or values into the function.

We must also remember to confirm that our critical point is indeed a maximum or a minimum by applying the second derivative test. We recall that at a local maximum, the second derivative 𝑓 double prime of π‘₯ will be negative, whereas at a local minimum, the second derivative 𝑓 double prime of π‘₯ will be positive. We’ll now see how to apply these key principles to some optimization problems.

A rocket is launched in the air. Its height, in meters, as a function of time is given by β„Ž of 𝑑 equals negative 4.9𝑑 squared plus 229𝑑 plus 234. Find the maximum height the rocket attains.

So, we’ve been given an equation for the height β„Ž of this rocket in terms of 𝑑 time. And we’re asked to determine the maximum height that the rocket attains. We can follow some key steps in order to do so. First, we need to find an expression for the first derivative of our function. In this case, that’s β„Ž prime of 𝑑. By applying the power rule of differentiation, we see that β„Ž prime of 𝑑 is equal to negative two multiplied by 4.9𝑑 plus 229, which simplifies to negative 9.8𝑑 plus 229.

Next, we recall that at the critical points of the function, the first derivative is equal to zero. So, we’re going to take that expression we’ve found for β„Ž prime of 𝑑, set it equal to zero, and then solve the resulting equation for 𝑑. We add 9.8𝑑 to both sides and then divide by 9.8 to give 𝑑 equals 229 over 9.8, which, as a decimal, is 23.36734, or 23.37 to two decimal places. Now, this is the value of 𝑑 at which our function β„Ž of 𝑑 has a critical point. We don’t yet know whether it is a maximum. And we don’t yet know the height that the rocket attains at this point.

Our next step, then, is to evaluate the function β„Ž of 𝑑 when 𝑑 is equal to 23.37. Substituting into our equation β„Ž of 𝑑 gives β„Ž of 23.37 equals negative 4.9 multiplied by 23.37 squared plus 229 multiplied by 23.37 plus 234. Which evaluates to 2909.56119, or 2909.56 correct to two decimal places. So, we believe that this is the maximum height that the rocket attains as this occurs at the only critical point of the function. But we must confirm that it is indeed a maximum.

To do so, we’ll perform the second derivative test. We’ll evaluate the second derivative β„Ž double prime of 𝑑 at this critical point. Differentiating our expression for β„Ž prime of 𝑑, which was negative 9.8𝑑 plus 229, we find that β„Ž double prime of 𝑑 is equal to negative 9.8. And in fact, we don’t need to evaluate the second derivative when 𝑑 equals 23.37 because it is a constant. The second derivative is the same for all values of 𝑑.

We note though, that this value is negative. And therefore, by the second derivative test, our critical point is a maximum. Now, we could also have seen this if we considered that the expression we were given for β„Ž in terms of 𝑑 is a quadratic expression with a negative leading coefficient. And therefore, the graph of 𝑑 against β„Ž would be an inverted parabola. And we know that it will therefore have a maximum point rather than a minimum. So, we can conclude that the maximum height the rocket attains, and we have confirmed that it is indeed a maximum, is 2909.56 meters, correct to two decimal places.

Now, it’s just worth pointing out that in this question, each of the derivatives also have practical interpretations. The first derivative of our function, that’s negative 9.8𝑑 plus 229, gives the velocity of the rocket, which we see is decreasing as time increases. The second derivative, which we saw is just the constant negative 9.8, gives the acceleration of the rocket, or in fact the deceleration. Which, we see, is equal to negative 9.8 meters per second squared. And that’s the deceleration due to gravity.

In this problem, the function we needed to optimize was given to us. But it will more often be the case in optimization problems that we’ll need to form these functions ourselves from a worded description. Let’s see how this works in our next example.

Find two numbers whose sum is 156 and the sum of whose squares is the least possible.

Let’s allow these two numbers, which we don’t yet know, to be π‘₯ and 𝑦. Then, we can express the fact that their sum is 156 as π‘₯ plus 𝑦 equals 156. We want to minimize the sum of their squares, which we can call 𝑠. 𝑠 is equal to π‘₯ squared plus 𝑦 squared. In order to do so, we need to find the values of π‘₯ and 𝑦 for which the rate of change of 𝑠 with respect to either π‘₯ or 𝑦, is equal to zero. This means that we need to differentiate 𝑠 with respect to either π‘₯ or 𝑦.

First, though, we need to write 𝑠 in terms of one variable only. The choice is entirely arbitrary in this problem. We could perform a simple rearrangement of our first equation to give 𝑦 equals 156 minus π‘₯ and then substitute this expression for 𝑦 into our equation for 𝑠 to give an equation in terms of π‘₯ only. Distributing the parentheses and then simplifying gives 𝑠 is equal to two π‘₯ squared minus 312π‘₯ plus 24336.

Remember, we’re looking to minimize this sum of squares, so we need to find the critical points of 𝑠. To do so, we need to find where the first derivative of 𝑠 with respect to π‘₯, that’s d𝑠 by dπ‘₯, is equal to zero. We can use the power rule to find this derivative. And we see that d𝑠 by dπ‘₯ is equal to four π‘₯ minus 312. We then set this derivative equal to zero and solve for π‘₯. We first add 312 to each side and then divide by four, giving π‘₯ equals 78.

So, we found the value of π‘₯ at which 𝑠 has a critical point. But there are two things we need to do. In a moment, we’ll confirm that this is indeed a minimum. But first, we also need to find the value of 𝑦, which we can do by substituting the value of π‘₯ into our linear equation. We see that 𝑦 is equal to 156 minus 78, which is equal to 78.

To confirm that this critical point is indeed a minimum. We need to find the second derivative of the function 𝑠 with respect to π‘₯. Differentiating d𝑠 by dπ‘₯ again gives d two 𝑠 by dπ‘₯ squared is equal to four. The second derivative of 𝑠 with respect to π‘₯ is, therefore, constant for all values of π‘₯. And more importantly, it is positive, which confirms that this critical point is indeed a minimum. The two numbers then whose sum is 156, which have the minimum sum of squares, are 78 and 78.

In this example, we saw how to set up the optimization function and any constraints ourselves from information given in the question. We’ll, now see how to do this again with a more practical example.

A wire of length 41 centimeters is used to make a rectangle. What dimensions give its maximum area?

Now, it’s important that we don’t just attempt trial and error here. We need to use a proper optimization method to find the dimensions which will give the largest possible area for this rectangle, subject to the constraint that we only have 41 centimeters of wire.

Let’s consider then a rectangle with a length of 𝑙 centimeters and a width of 𝑀 centimeters. We need to maximize its area, which for a rectangle is its length multiplied by its width. Subject to the constraint which is that the perimeter of this rectangle must be equal to 41. The perimeter of a rectangle is twice its length plus twice its width. So, we have the constraint two 𝑙 plus two 𝑀 equals 41.

Now, in order to maximize this area, we’re going to need to use differentiation to find the critical points of this function 𝐴. But before we can do that, we need to write 𝐴 in terms of one variable only. The choice of whether we use 𝑙 or 𝑀 is entirely arbitrary. So, I’ve chosen to rearrange the linear equation to give 𝑙 equals 41 minus two 𝑀 over two. Substituting this expression for 𝑙 into our area formula gives 𝐴 equals 41 minus two 𝑀 over two multiplied by 𝑀. And distributing the parentheses, we have 41𝑀 over two minus 𝑀 squared.

To find the critical points of 𝐴, we first find its first derivative, d𝐴 by d𝑀, which, using the power rule of differentiation, is equal to 41 over two minus two 𝑀. We then set this expression equal to zero and solve the resulting equation for 𝑀. We add two 𝑀 to each side and then divide by two, giving 𝑀 is equal to 41 over four. So, we’ve found the width of the rectangle at which the area has a critical point.

We also need to find the length though, which we do by substituting this value of 𝑀 back into our expression for 𝑙, giving 41 minus two times 41 over four all over two. Which also simplifies to 41 over four. However, we’re not yet finished. We know that these values of 𝑀 and 𝑙 give a critical point for the area. But we haven’t yet confirmed that it is indeed a maximum. To check this, we need to perform the second derivative test. We find d two 𝐴 by d𝑀 squared, which is equal to negative two.

Now, this is a constant for all values of 𝑀. But more specifically it is a negative constant. And as the second derivative is less than zero, this confirms that our critical point is indeed a maximum. So, we found that the length and width which give this rectangle its maximum area, subject to the given perimeter constraint, as decimals, are both 10.25 centimeters.

Now, we notice that the length and width of this rectangle are actually the same, making it in fact a square. This illustrates a general point in optimization problems where we’re looking to maximize an area with respect to a length constraint. The maximum area will be achieved when the dimensions are as similar as possible i.e. when the ratio between the dimensions is as close as possible to one to one.

In the case of a problem involving a rectangle, it will always turn out that the shape will in fact be a square. But of course, we must always go through the working out. In order to show this. In our final example, we’ll see how to maximize the sum of the volumes of two three-dimensional shapes subject to a surface area constraint.

Given that the sum of the surface areas of a sphere and a right circular cylinder is 1000πœ‹ centimeters squared, and their radii are equal, find the radius of the sphere that makes the sum of their volume at its maximum value.

So, in this question, we’re asked to maximize the sum of the volumes of two three-dimensional solids, subject to a constraint about the sum of their surface areas. Let’s begin by writing down fomulae for the surface areas of both the sphere and the right circular cylinder. And as their radii are the same, we can use the same letter π‘Ÿ for both. For the sphere, first of all, its surface area is given by four πœ‹π‘Ÿ squared. For the cylinder, its surface area is two πœ‹π‘Ÿ squared plus two πœ‹π‘Ÿβ„Ž, where β„Ž represents the height of the cylinder.

As the sum of these surface areas is 1000πœ‹ centimeters squared, we can form an equation, four πœ‹π‘Ÿ squared plus two πœ‹π‘Ÿ squared plus two πœ‹π‘Ÿβ„Ž equals 1000πœ‹. We can then combine the like terms on the left-hand side and then divide through by a πœ‹, as this is a common factor in all terms. We could also divide through by two, as all the coefficients are even, to give three π‘Ÿ squared plus π‘Ÿβ„Ž equals 500. We can’t do anything further with this equation at this point, as we have two unknowns π‘Ÿ and β„Ž. So, next, we recall the formulae for the volume of a sphere and the volume of a cylinder.

The volume of a sphere is four-thirds multiplied by πœ‹ multiplied by its radius cubed. And the volume of a cylinder is πœ‹ multiplied by its radius squared multiplied by its height. So, we have that the total volume of these two solids is four-thirds πœ‹π‘Ÿ cubed plus πœ‹π‘Ÿ squared β„Ž. We want to maximize the sum of these volumes, 𝑉 total. Now, this will be maximized when its rate of change with respect to either π‘Ÿ or β„Ž is equal to zero, which will be when its first derivative is equal to zero. But before we can differentiate, we need to express 𝑉 total in terms of a single variable.

It’s much more straightforward to rearrange our surface area constraint to give an expression for β„Ž in terms of π‘Ÿ than it is to give an expression for π‘Ÿ in terms of β„Ž. We have β„Ž equals 500 minus three π‘Ÿ squared over π‘Ÿ. We can then substitute this expression for β„Ž into our expression for the total volume so that it is in terms of π‘Ÿ only. We can cancel a factor of π‘Ÿ in the second term and then distribute the parentheses to give four-thirds πœ‹π‘Ÿ cubed plus 500πœ‹π‘Ÿ minus three πœ‹π‘Ÿ cubed. We have an expression for 𝑉 total in terms of π‘Ÿ only.

Next, we need to find the first derivative d𝑉 total by dπ‘Ÿ, so we’ll create a little bit of space in order to do this. By applying the power rule of differentiation, we see that the derivative of 𝑉 total with respect to π‘Ÿ is equal to four-thirds πœ‹ multiplied by three π‘Ÿ squared plus 500πœ‹ minus three πœ‹ multiplied by three π‘Ÿ squared, which all simplifies to 500πœ‹ minus five πœ‹π‘Ÿ squared. Next, in order to find critical points, we need to set this derivative equal to zero and solve for π‘Ÿ.

We can divide through by five πœ‹, giving zero equals 100 minus π‘Ÿ squared. Adding π‘Ÿ squared to both sides gives π‘Ÿ squared equals 100. And we then find π‘Ÿ by square rooting. We only need to take the positive square root as the radius of a solid must be a positive value. So, we see that π‘Ÿ is equal to 10. We now know that the combined volume of these two solids has a critical point when the radius is equal to 10. But we must now confirm that it is a maximum.

We perform the second derivative test. Differentiating our expression for d𝑉 total by dπ‘Ÿ again, with respect to π‘Ÿ, gives negative 10πœ‹π‘Ÿ. And evaluating this when π‘Ÿ is equal to 10 gives negative 100πœ‹. This is negative, which confirms that the critical point is indeed a maximum. So, we found that the radius of the sphere and also the radius of the right circular cylinder which maximizes the sum of their volumes, subject to the given surface area constraint, is 10 centimeters.

Let’s summarize then the key points that we’ve seen in this video. Firstly, the key principles of differentiation can be applied to optimization problems. That’s problems where we want to find the maximum or minimum value of a function. We know that the critical points of a function occur when its first derivative is equal to zero or is undefined. Once we found a critical point, we must always confirm that it is indeed a maximum or minimum by performing the second derivative test. And we’ve seen that it may be necessary for us to form both the optimization function and any constraints ourselves from a written description.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.