TITLE: Radius of a circle touching a rectangle both of which are inside a square
QUESTION [18 upvotes]: Given this configuration :

We're given that the rectangle is of the dimensions 20 cm by 10 cm, and we have to find the radius of the circle.
If we somehow know the distance between the circle and the corner of the square then we can easily find the radius. (It's equal to $ \sqrt{2}\times R-R$)
I really can't understand how to solve it. Any help appreciated.

REPLY [3 votes]: The point where rectangle touches the circle is $|R-a|$ and $|R-b|$ away from $x$ and $y$ axes, where $a$ and $b$ are lengths of sides of the rectangle and $R$ is the radius of the circle.
This leads to the equation $$(R-a)^2 + (R-b)^2 = R^2,$$ which has solutions $$R_{1,2} = a+b\pm\sqrt{2ab}.$$
One solution corresponds to a bigger rectangle (compared to the circle), one touching the circle on the other side, which is not the case here. Smaller rectangle compared to the circle means that the circle is bigger if the rectangle is kept fixed, so the correct radius is $$R = a+b+\sqrt{2ab}.$$
Plugging in $a=10$ and $b=20$ gives $R=50$.