
Let ABCD be a rectangle inscribed in a circle of radius r with centre at O.
Let AB = 2x and BC = 2y be the sides of the rectangle.
Then in right angled ΔOAM,
AM2 + OM2 = OA2 ( By Pythagoras theorem)
⇒ x2 + y2 = r2
⇒ \(y=\sqrt{r^2-x^2}\) ...(i)
Let P be the perimeter of rectangle ABCD, then
P = 4x + 4y
⇒ \(P = 4x + 4 \sqrt{r^2-x^2}\)
⇒ \(\frac{dP}{dx}=\) \(4-\frac{4x}{\sqrt{r^2-x^2}}\)
For maximum or minimum value of P, we have
\(\frac{dP}{dx}=\) 0

Thus, P is maximum when \(x=\frac{r}{\sqrt2}.\)
Putting \(x=\frac{r}{\sqrt2}\) in (i)_, we get
\(y=\frac{r}{\sqrt2}\)
Therefore,
x = y
⇒ 2x = 2y
Hence, P is maximum when rectangle is square of side \(2x = \sqrt{2}r.\)