# 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 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 written:
A = x*y

The perimeter may be written as
P = 400 = 2x + 2y

Solve equation 400 = 2x + 2y for y
y = 200 - x

We now now substitute y = 200 - x into the area A = x*y 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 change.
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 >= 0 and y = 200 - x ≥ 0 (if you solve the second inequality, you obtain x <= 0).
To find the value of x that gives an area A maximum, we need to find the first derivative dA/dx (A is a function of x).
dA/dx = -2x + 200
If A has a maximum value, it happens at x such that dA/dx = 0. At the endpoints of the domain we have A(0) = 0 and A(200) = 0.
dA/dx = -2x + 200 = 0
Solve the above equation for x.
x = 100
dA/dx has one zero at x = 100.
The second derivative d
2A/dx 2 = -2 is negative. (see calculus theorem on using the first and second derivative to determine extremma of functions). The value of the area A at x = 100 is equal to 10000 mm 2 and it is the largest (maximum). So if you select a rectangle of width x = 100 mm and length y = 200 - x = 200 - 100 = 100 mm (it is a square!), you obtain a rectangle with maximum area equal to 10000 mm 2.
Exercises
1 - Solve the same problem as above but with the perimeter equal to 500 mm.
solution to the above exercise
width x = 125 mm and length y = 125 mm.
More references on
calculus problems