What does the derivative tell us about a function?
The Second Derivative
UBC Calculus Online Course Notes

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  $x$  and its height  $y$  .

With this notation, the area of the rectangle becomes

\[  A = xy 

Of course, not just any or will do: we only want to consider rectangles with perimeter 100 cm which means that $  2x + 2y = 100  $ or $  x + y = 50  $ . This enables us to solve for as $  y = 50 - x $ and rewrite the area as

\[  A(x) = x(50-x) = 50x - x^2 

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 $  0 \leq x \leq 50  $ . 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 $  A(x) 
 $ : it is $  A^\prime(x) = 50 - 2x  $ . 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 $  x < 25 
 $ we have $  A^\prime(x) > 0  $ which means that $  A 
 $ is increasing. When $  x > 25  $ , we have $ 
A^\prime(x) < 0  $ which means $  A  $ is decreasing. The point at which the transition occurs is at $  x = 25  $ and this is hence the maximum value.

Notice that when $  x = 25  $ , we also have that $  y = 
50 -x = 25  $ 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 $  A(x) = 50x - x^2  $ 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 $  h  $ and the radius by $  r  $ .

The volume of such a barrel is $  V = \pi r^2 h  $ . Also, the price of the barrel is determined by the length $  L  $ which satisfies $  L^2 = r^2 + h^2  $ . Since Kepler wanted to consider a fixed price for a barrel, he considered the length $  L 
 $ to be a fixed quantity.

Given the relationship between the variables, we may write $ 
r^2 = L^2 - h^2 $ which allows us to write

V(h) = \pi(L^2 - h^2)h = \pi (L^2 h - h^3) 

Again, we have a few restrictions on the quantity $  h  $ . First of all, it should be positive $  h \leq 0  $ and it cannot be larger than $  L  $ . Put together, these give the restrictions $  0 \leq h \leq L  $ .

We would now like to find the value of $  h  $ which maximizes the volume $  V  $ . To do this, let's find the derivative:

\[  V^\prime(h) = \pi (L^2 - 3h^2)  \]

Notice that $  V^\prime(h) = 0  $ when $  h = \pm \frac 
1{\sqrt{3}} L $ . 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 $  h  $ . Below, we plot the function $  V(h)  $ and its derivative in the case that $  L = 10  $ .

Let's see what happens at the point $  h = \frac{1}{\sqrt{3}} L 
 $ . For values of $  h  $ smaller than this quantity, the derivative is positive and so the function is increasing. For larger values of $  h  $ , the function decreases since the derivative is negative. That means that $  h = \frac{1}{\sqrt{3}} L  $ will give the maximum volume.

To find $  r  $ , we could use the relationship $  r^2 = 
L^2 - h^2  $ which implies that $  r = \sqrt{\frac 23} L 
 $ . In other words, the ratio of the radius to the height should be

\[  \frac rh = \sqrt{2}