Let us use the length of the base to parameterize the rectangles instead, as in the second diagram above. In this case . The base, diagonal and height of the rectangle form a right-angle triangle, so Pythagoras' theorem applies. Let denote the length of the height. We have
so the perimeter of a rectangle with base is
To maximize , we compute its derivative with respect to and set it equal to 0:
A ratio is 0 if and only if the numerator is 0, so
Thus, among all rectangles inscribed in a circle of radius , the one with the largest perimeter is the one whose base has length . We now use this to determine the height
Since both the height and the base are the same, this is again that rectangle which is also a square.