## Problem on a rectangle of maximal area

Of all the rectangles of perimeter P, which has the largest area?
• ## Solution

We observe that this is a constrained optimization problem: we seek to maximize the area of a rectangle with the constraint that its perimeter is $P$.
We introduce the variables $x$ and $y$ as the width and height of the rectangle.
Now we express the minimization problem in those variables.
The area of the rectangle is $xy$ and the perimeter is $2x + 2y$.
Thus, we are trying to maximize $xy$ subject to the constraint $2x + 2y = P$.
Recall that
We identify $f(x,y) = xy$ and $g(x,y) = 2x + 2y - P$.
Our augmented function is $L(x,y,\lambda ) = xy - \lambda(2x + 2y - P).$
The first two equations give $x = y = 2 \lambda$. The last equation gives that $x=y=P/4$.
Because $x=y$, we have shown that the rectangle of maximal area and perimeter $P$ is a square.