Largest semicircle in a rectangle We are given a rectangle. Its adjacent sides are $m$ and $n$ ($m \geq n$). We need to find the largest semicircle in this rectangle. How can we find it?
EDIT: Beware of such situations!!

 A: So, take a rectangle sides m and n. m is the long side and n is the short. The radius of the semi circle would be n, if m is more than 2n. Half of m > n. Therefore, Rectangle 1/2m,n would be suitable to provide a quarter circle, so man would provide a semi circle. Otherwise,half m would be the radius for a rectangle whose m is less than 2n. This is because 2m would not fit in n, so requires rescaling in order to find the maximum semicircle. 
A: I suck at diagrams, so please refer to the rectangle provided in the question. I take the lower left vertex to be the origin, and place the coordinate system such that the vertices become $(0,0)$, $(m, 0)$, $(0, n)$ and $(m, n)$. Let the centre of the semicircle be $O(\alpha, \beta)$. For the semicircle to be contained within the rectangle, $|\alpha| = |\beta| = r$. Hence the equation of the circle is:
$$
(x - \alpha)^2 + (y - \beta)^2 = \alpha^2
$$
The circle intersects (note that I'm excluding the points where it just touches) the rectangle at 2 points, say $P$ and $Q$. If the circular sector $POQ$ be a semicircle, the $P$, $O$ and $Q$ must be collinear.
The circle intersects the line $y = n$ at $P$ (there is another point of intersection, but that is out of consideration). Hence,
$
(x - \alpha)^2 + (n - \beta)^2 = \alpha^2 \\
\implies x^2 -2\alpha x + (n -\beta)^2 = 0 \\
\implies x = \alpha - \sqrt{\alpha^2 - (n - \beta)^2}.
$
Only 1 root is of interest since $P$ is towards the left of $O$. Hence,
$$
P \equiv \left( \alpha - \sqrt{\alpha^2 - (n - \beta)^2} , n\right)
$$
Similarly,
$$
Q \equiv \left(m, \beta - \sqrt{\beta^2 - (m - \alpha)^2}\right)
$$
If $P$, $O$, and $Q$ be collinear,
$$
\frac{\beta - n}{\alpha - \alpha + \sqrt{\alpha^2 - (n - \beta)^2}} = \frac{\beta - \sqrt{\beta^2 - (m - \alpha)^2} - n}{m - \alpha + \sqrt{\alpha^2 - (n - \beta)^2}}
$$
Since $\alpha, \beta > 0$, putting $\alpha = \beta = r$ and simplifying,
$$
\frac{r-n}{\sqrt{2nr-n^2}} = \frac{r - n - \sqrt{2mr-m^2}}{m - r + \sqrt{2nr-n^2}} \\
\implies (n-r)(m-r) = \sqrt{(2nr-n^2)(2mr-m^2)}
$$
Simplifying with the consideration that $r\neq 0$,
$$
r^2 - 2(m+n)r +(m^2+n^2) = 0\\
\implies r = m + n - \sqrt{2mn}
$$
The root with the negative sign is chosen because $r < m$ and $r < n$. As is obvious, there is only 1 semicircle that can be fit in a rectangle for a given $m$ and $n$.
For $m > 2n$, we have $r > n$. Thus no semicircle exists for such a rectangle. In general we can say $m \in [n, 2n]$ for a semicircle to be fit in a rectangle. This observation also places a bound on $r$: $r\in [(2-\sqrt{2})n, n]$.
It might also be worth noting that the circle, that the semicircle is a part of, passes through the point $(m,n)$, i.e. the upper right vertex of the rectangle.
