# Optimization of a square into a circle with a radius of 4

This is a really difficult one: Find the dimensions of the rectangle of maximum area that can be inscribed in a circle of radius r = 4. I've been struggling with it for a long time.

## 4 Answers

Let the vertices be $(\pm a,\pm b)$

Then $a^2+b^2=4^2$.

And area is $2a*2*b$

Maximize it.

• I don't understand why the area would be 2a * 2b. Isn't it ab as in lengthwidth? – j.doe Jul 2 '17 at 4:03
• It is if the sides are a,b. But the sides aren't a,b. I said the vertices are $(\pm a,\pm b)$ so the sides are 2a,2b. It's arbitrary. I could have said the sides are a,b and the vertices would be $(\pm\frac 12 a,\pm \frac 12 b)$ and $a^2/4+b^2/4=4^2$. You'd get the same result. – fleablood Jul 2 '17 at 4:11

Let a and b be the dimensions:

Then $A =ab = a\sqrt{4r^2-a^2}$

Set $\frac{dA}{da} = 0$ and find $a = 4\sqrt{2} = b$

I think I will post a careful answer, and not a hint.

Let the rectangle be $ABCD$ with $AB=a,CD=b$ and the circle has center $O$ and radius $r$ such that the circle contains the whole rectangle.
The rectangle is convex, so the statement "the circle contains the whole rectangle" $\iff$ "the circle contains all 4 points of the rectangle" $\iff OA, OB,OC,OD \leq r$.

On the other hand, by the triangle inequality, $$OA + OC \geq AC = a^2 + b^2$$ (by Pythagoras theorem). Similar for segment BD.

Therefore, $8 = 2r \geq \sqrt{a^2+b^2} \geq \sqrt{2ab} = \sqrt{2S}$ where $S$ is the area of the rectangle.

(as $(a-b)^2 = a^2+b^2-2ab \geq 0$, then $a^2+b^2\geq 2ab$ )

$$8 \geq \sqrt{2S}$$ $$64 \geq 2S$$ $$32 \geq S$$

The equality occurs $\iff a=b$ and $O$ lies on the intersection of segment $AC$ and $BD$.

Diameter of the circle is $8$.

Let $a$ and $b$ be sides-lengths of our rectangle. Thus, since $a^2+b^2=8^2$, we obtain: $$ab\leq\frac{a^2+b^2}{2}=32.$$ The equality occurs for $a=b=4\sqrt2$,

which says that $32$ is a maximal value and dimensions are $4\sqrt2$ and $4\sqrt2$.

• don't think its that easy – j.doe Jul 2 '17 at 3:43
• it says find the dimensions. I have no idea what you found.... – j.doe Jul 2 '17 at 3:45
• @j.doe You have to work out the details yourself. – user202729 Jul 2 '17 at 3:45
• @user202729 I fixed my post. See now please. – Michael Rozenberg Jul 2 '17 at 3:50
• it can be that easy, "calculus" and "hard" arent synonyms @j.doe – Saketh Malyala Jul 2 '17 at 3:58