Now we put our optimization skills to work.

**optimization problem**is a problem where you need to maximize or minimize some quantity given some constraints. This can be accomplished using the tools of differential calculus that we have already developed.

Perhaps the most basic optimization problems is generated by the following question:

Among all rectangles of a fixed perimeter, which has the greatest area?

Let’s not do this problem in the abstract, let’s do it with numbers.

The area of the rectangle is In order to be able to use calculus techniques, we have to express the area as a function of a single variable.

To this end, we have to express the variable, say , in terms of . How can this be achieved?

Recall, we are given the constraint: “…rectangles of perimeter …”

If a rectangle has perimeter , then .

Hence the area of a rectangle of perimeter can be expressed as a function of a single variable, , However, for the side lengths to be physically relevant, we must assume that and .

Therefore, the domain of the function is the interval .

So, to maximize the area of the rectangle, we have to find the global maximum of the function on the interval . Since the domain of is an open interval, the global maximum (if it exists!) has to be a local maximum and, therefore, it occurs at a critical point. So, we have to find all critical points of on the interval . Since in order to find the critical points, we have to solve the equation It follows that the only critical point of is at .

We can make a sign chart for on the interval :

Since is positivenegative on and positivenegative on , the function has a global maximum at . This is exactly when the rectangle is a square!

A key step is to explain why is actually the maximum. Above we basically used facts about the derivative. Below we use a similar argument.

First we draw a picture. Here is a rectangle with an area of .

To this end, we have to express the variable, say , in terms of , using the constraint, ,

Hence the perimeter of a rectangle with area can be expressed as a function of a single variable, , Again, for the side lengths to be physically relevant, we must assume that .

Therefore, the domain of the function is the interval .

So, to minimize the perimeter of the rectangle, we have to find the global minimum of the function on the interval .

Since the domain of is an open interval, the global minimum (if it exists!) has to be a local minimum and, therefore, it occurs at a critical point. So, we have to find all critical points of on the interval . Since in order to find the critical points, we have to solve the equation Solving for gives us . Only the value is in the domain of . Since is defined everywhere on the interval , there are no more critical values, and there are no endpoints. Is there a local maximum, minimum, or neither at ? The second derivative is and , so there is a local minimum. Since there is only one critical point, this is also the global minimum.

So the rectangle with smallest perimeter is the square.

We can illustrate our result with the graph of .

Hence, calculus gives a **reason** for **why** a square is the rectangle with both

- the largest area for a given perimeter.
- the smallest perimeter for a given area.

We may be done with rectangles, but they aren’t done with us. Here is a problem where there are more constraints on the possible side lengths of the rectangle.

**At this point, you should graph the function if you can.**

Setting we find as the only critical point. Testing this and the two endpoints (as the maximum could also be there), we have and . Hence, the maximum area occurs when the rectangle has dimensions .

Again, note that above we used the Extreme Value Theorem to guarantee that we found the maximum.