# Use Derivatives to Maximize Area of A Rectangle with Given Perimeter

A problem to maximize (optimization) the area of a rectangle with a constant perimeter is presented. An interactive applet (you need Java in your computer) is used to understand the problem. Then an analytical method, based on the derivatives of a function and some calculus theorems, is developed in order to find an analytical solution to the problem.

## Problem

You decide to construct a rectangle of perimeter $$400 \, \text{mm}$$ and maximum area. Find the length and the width of the rectangle.
Solution to the Problem
We now look at a solution to this problem using derivatives and other calculus concepts. Let $$x$$ ( = distance DC) be the width of the rectangle and $$y$$ ( = distance DA) its length, then the area $$A$$ of the rectangle may be written: $A = xy$ The perimeter may be written as $P = 400 = 2x + 2y$ Solve equation $$400 = 2x + 2y$$ for $$y$$ $y = 200 - x$ We now substitute $$y = 200 - x$$ into the area $$A = xy$$ to obtain: $A = x(200 - x)$ Area $$A$$ is a function of $$x$$. As you change the width $$x$$ in the applet, the area $$A$$ on the right panel changes. Expand the expression for the area $$A$$ and write it as a function of $$x$$. $A(x) = -x^2 + 200x$ We might consider the domain of function $$A(x)$$ as being all values of $$x$$ in the closed interval $$[0 , 200]$$ since $$x \geq 0$$ and $$y = 200 - x \geq 0$$ (if you solve the second inequality, you obtain $$x \leq 0$$). To find the value of $$x$$ that gives an area $$A$$ maximum, we need to find the first derivative $$\dfrac{dA}{dx}$$ ($$A$$ is a function of $$x$$). $\dfrac{dA}{dx} = -2x + 200$ If $$A$$ has a maximum value, it happens at $$x$$ such that $$\dfrac{dA}{dx} = 0$$. At the endpoints of the domain we have $$A(0) = 0$$ and $$A(200) = 0$$. $\dfrac{dA}{dx} = -2x + 200 = 0$ Solve the above equation for $$x$$. $x = 100$ $$\dfrac{dA}{dx}$$ has one zero at $$x = 100$$. The second derivative $$\dfrac{d^2A}{dx^2} = -2$$ is negative (see calculus theorem on using the first and second derivative to determine extrema of functions). The value of the area $$A$$ at $$x = 100$$ is equal to $$10000 \, \text{mm}^2$$ and it is the largest (maximum). So if you select a rectangle of width $$x = 100 \, \text{mm}$$ and length $$y = 200 - x = 200 - 100 = 100 \, \text{mm}$$ (it is a square!), you obtain a rectangle with maximum area equal to $$10000 \, \text{mm}^2$$.

### Exercises

1 - Solve the same problem as above but with the perimeter equal to $$500 \, \text{mm}$$.
Solution to the above exercise
Width $$x = 125 \, \text{mm}$$ and length $$y = 125 \, \text{mm}$$.