# Maxima and Minima

We have seen that the sign of the derivative tells us whether a function is increasing or decreasing and that the zeroes of the derivative lead us to local maxima and minima. We'll use these observations to explore a few simple applications.

Example 1
 Let's begin with a simple problem from geometry. We will consider all rectangles whose perimeter is 100 cm and ask to find the one with the largest area. Here is a demonstration which can give you a feel for how the area changes as the rectangle changes. If you think about it, this question might remind you of the first homework assignment in which we studied the best size for a cell. The crucial ingredient in our analysis was a consideration of how the surface area and volume were related to one another. In an analogous way, we are here relating the perimeter and area of a rectangle. To approach this problem, let's set up some notation. First, we'll consider a rectangle whose perimeter is 100 cm and call its width and its height . With this notation, the area of the rectangle becomes Of course, not just any or will do: we only want to consider rectangles with perimeter 100 cm which means that or . This enables us to solve for as and rewrite the area as Now that we have a function which measures the area of the rectangle, we would like to find its maximum value. But before we jump into this, let's remember that there are restrictions on the value of : for instance, we want both and to be positive which means we will only consider values which satisfy . In this example, this observation will not turn out to be crucial, but it is generally a good idea to consider any restrictions like this imposed by the real world. To find the maximum value, let's consider the derivative of : it is . That is, the derivative is a simple linear function whose graph is a straight line with slope -2 and y-intercept 50. In the demonstration below, we graph both the original function (on the left) and the derivative (on the right). From the graph of the derivative, it is clear that when we have which means that is increasing. When , we have which means is decreasing. The point at which the transition occurs is at and this is hence the maximum value. Notice that when , we also have that and so the rectangle with the largest area is a square. This is a rather common occurrence: nature likes to use symmetry to optimize some property, in this case area. Of course, the function is a simple quadratic and we could have read off its maximum value from the graph. However, the analysis using the derivative that we have just completed will help us tackle much more difficult situations.

Example 2: Kepler's Wedding
 In 1612, the great scientist Johannes Kepler was about to remarry and needed to buy wine for the celebration. The wine salesman brought barrels of wine to Kepler's house and explained how they were priced: a rod was inserted into the barrel diagonally through a small hole in the top. When the rod was removed, the length of the rod which was wet determined the price for the barrel. Kepler then began a study of the volume of the barrels. He said, "Like a bridegroom, I thought it proper to take up ... math ... and to investigate ... laws of measurement so useful in housekeeping." More specifically, by considering different shapes for the barrels, he hoped to get the greatest volume of wine for a given price. Here is what he did: the barrels were roughly cylindrical so let's denote the height of the cylinder by and the radius by . The volume of such a barrel is . Also, the price of the barrel is determined by the length which satisfies . Since Kepler wanted to consider a fixed price for a barrel, he considered the length to be a fixed quantity. Given the relationship between the variables, we may write which allows us to write Again, we have a few restrictions on the quantity . First of all, it should be positive and it cannot be larger than . Put together, these give the restrictions . We would now like to find the value of which maximizes the volume . To do this, let's find the derivative: Notice that when . It appears that there are two places where the derivative is zero, but upon closer investigation we can rule one out since we are not considering negative values of . Below, we plot the function and its derivative in the case that . Let's see what happens at the point . For values of smaller than this quantity, the derivative is positive and so the function is increasing. For larger values of , the function decreases since the derivative is negative. That means that will give the maximum volume. To find , we could use the relationship which implies that . In other words, the ratio of the radius to the height should be