Let x metres and y metres be the length and breadth of the rectangle.
Then its perimeter is 2(x + y) = 36
x + y = 18 y
= 18 – x
Area of the rectangle = xy = x (18 – x)
∴ by the second derivative test, f has maximum value at x = 9.
When x = 9, y = 18 – 9 = 9
∴ x = 9 cm, y = 9 cm
∴ the rectangle is a square of side 9 metres.