# Two circles in a rectangle

Suppose I have a 20 X 30 rectangle R with an inscribed circle C of diameter 20 (touching 3 edges). What is the maximum diameter of a circle that can be inscribed in $$R\setminus C$$?

Clearly I can inscribe a diameter 10 circle, but clearly one can do better. What is the max?

Is there a formula for the general case of R a rectangle 1xL and C a circle of diameter 1? (Here I suppose $$L\geq 1$$)

If $$L\geqslant 2$$ then of course the best diameter is $$1$$. Otherwise, the best circle will touch the long side $$L$$, the short side $$1$$, and also the big circle. Let $$r$$ be the radius of the best circle. The picture would look something like this: Hence, the radius $$r$$ satisfies

$${\left(\frac12 + r\right)}^2 = {\left(\frac12 - r\right)}^2 + {\left(L - \frac12 - r\right)}^2,$$

with solution $$r(L) = \frac12 + L - \sqrt{2L}$$. As a sanity check, the diameter when $$L=2$$ is $$2r(2) = 1$$.

We also have $$r(3/2) = 2-\sqrt3$$, which scaled by the factor of $$20$$ in your original problem yields a diameter of $$40(2-\sqrt3)\approx 10.72$$, slightly larger than $$10$$.

• What software drew your diagram? – GEdgar Jan 17 at 14:06
• I used GeoGebra – Fimpellizieri Jan 17 at 14:06
• Ha ha ha! That's much simpler than the solution I had found. I was complicating my life with no reason! – user126154 Jan 17 at 14:17
• Glad to have helped. =) – Fimpellizieri Jan 17 at 14:27 Let $$r$$ be the radius. By matching the length of the long side, the following equation can be established,

$$r+\sqrt{(10+r)^2-(10-r)^2}+10=30$$

where the square-root term results from the Pythagorean theorem applied to the right triangle in the middle. The equation simplifies to

$$\sqrt{40r}+r=20$$

which yields the solution

$$r=20(2-\sqrt3)$$

or $$40(2-\sqrt3)$$ in diameter.

• Very simple answer, I don't know why but I was unable to see it. +1 – user126154 Jan 17 at 14:18

Think about the point of your circle is the one that's more far away from your shape. In this case, we want to find the point with more distance to our other circle and each side of the rectangle. Because we want to maximize this distance, we can assume that this circle will be tangent with each of this shapes, because:

1. If it was tangent only to two connected sides of the rectangle, we could make it bigger just by sliding a bit more to the center of the rectangle.
2. In this particular case it can't touch two opposite sides of the rectangle without intersecting the circle or the other side. This is because the diameter of the lower side is $$20$$, but the distance between the circle and the other side of the rectangle is $$10<20$$.
3. It can be tangent to the circle and the side of length $$30$$, but this would give us a circle of diameter $$10$$ and, as you mention, we could do better.

So let's see what happens if we assume it's tangent to the circle and two connected sides. We have a right triangle with legs $$10-x$$ and $$20-x$$ and hypotenuse of $$10+x$$. So we solve with the pytaghorean theorem and we obtain $$x=20(2-\sqrt{3})$$.

In general, the $$10$$ would change to $$a/2$$ and the $$20$$ would be $$b-a/2$$ where $$a < b$$ are the sides of the rectangle. But it's important that, for condition $$2$$ to happen again, $$b-a < a \Rightarrow b < 2a$$, think about that if $$b \geq 2a$$ then the solution is just another circle of diameter $$a$$. If I didn't did any calculation wrong, this would be the general answer.