 Hello everyone. Let's take a look at another optimization modeling problem. Again one that is geometry based. Here we have a right cylinder inscribed inside of a sphere of radius 10 inches and make sure you're reading this correctly. It's the sphere that has the radius of 10 inches. You can see how I've drawn it here on the diagram. I've gone from the center of the sphere and the way in which I drew this, I have to admit it was a little bit on purpose drawing it this way. Notice how I drew it to kind of the corner of the cylinder that's inscribed inside the sphere. I did that for a reason that you'll see in a few minutes. We're trying to determine the height of the cylinder so as to maximize the volume of the cylinder. So if we try to set forth first what it is we want to maximize or minimize, obviously in this case we want to maximize volume and you need to remember how to get volume of a cylinder. It's pi r squared h. That's what we want to maximize. Of course the problem is we have two different variables. We have an r and we have an h. We're going to have to get this down to one variable somehow and this is where you need to be a little creative and clever. Remember that we were told the radius of the sphere was 10 inches and remember how I said I drew that on purpose for a reason? Well look what you can do. I'm going to make a little right triangle out of this because now I know my hypotenuse is 10. Here's my right angle. This would be the radius r and if you think of your properties of cylinders, spheres, etc. if we're going to refer to this entire height of the cylinder, this leg here of the right triangle should be half of that entire height of the cylinder. So now we have all of our sides of the right triangle labeled and maybe we can set up a Pythagorean theorem that will enable us to solve for either r or h and substitute into our primary equation. We know that by the Pythagorean theorem r squared plus h over 2 squared will give us 10 squared. Let's simplify that a little bit. Take a look at what we have. Notice we have an r squared here and an r squared there. Why don't we just solve for r squared and we can substitute directly into that primary equation? Just makes things a little bit easier for you. Let's go ahead and rewrite that and we'll see where we go from there. Notice how in place of the r squared I've substituted the 100 minus h squared over 4. I'm going to simplify this before I go any further. If I distribute the pi and the h in the back, I have 100 pi h minus pi over 4 and I have an h squared times an h, so now I have h cubed. Notice how nice and simple that is because that's what we want to find the derivative of next and that will be easy to do. We know we have to take that derivative and set it equal to zero. As we start to rearrange our equation to solve it, notice we get to this point that the pies can cancel out. If you continue to solve for h, perhaps it makes the most sense to simply get a decimal approximation. You should find that you get approximately 11.547. Please feel free to verify that on your own. This becomes our critical number. If there's going to be a maximum for this original function for the volume, it's going to be at this particular height. Remember that here you have a couple options. We could go ahead and do a number line analysis for the first derivative test. We've seen a few examples of that though, so perhaps I'll change it up a little bit and try the second derivative test. Remember that the second derivative test, we're going to go ahead and find our second derivative, which is easy to do given what this first derivative was up here. That's pretty simple to find the derivative of again, and we're going to evaluate that second derivative at the critical number. Depending upon whether we obtain a positive or a negative answer from that, tells us if we have either a maximum or a minimum point. If we go ahead and find our second derivative off of our first derivative, the derivative of 100 pi is simply zero, so that's gone. Derivative of negative 3 pi over 4 h squared becomes negative 6 pi over 4 times h. And remember we want to evaluate that second derivative at the critical value we found. Remember what we're trying to do is figure out if we substitute that critical value in place of h, do we get a positive answer or a negative answer? Well, in this case, it's obviously a negative answer. Think about what that tells us. We just found that at this particular x value, or h value, really, our second derivative is less than zero, meaning it's concave down. Remember that tells us we have a maximum there. So we'd have the fact that the original function v is concave down at h equals 11.547. Therefore, we have a relative maximum. And that's how you can use the second derivative test as an alternative to doing the first derivative test and the number line analysis. If you go back to the original question, all we were asked to determine was the height of the cylinder that would provide for the maximum volume. And we now have found that the maximum volume of the cylinder is obtained when h is approximately 11.547 inches.