# Square inside a semicircle

## Problem

You are given a semicircle with an inscribed square of side length \(s.\) Let \(a\) be the length of the diameter on either side of the square. Find the value of \(s / a.\)

## Solution

Right away, you should notice that \(a\) and \(s\) are both dependant on the radius of the semicircle, let's call it \(r.\) Because we're looking for the value of \(s / a,\) we should start by looking for ways to express \(r\) in terms of \(s,\) \(a,\) or both.

We notice that there is a side of the square located on the diameter of the semicircle. Since the length of the diameters are equal on both sides of side s on the diameter, we can conclude that the midpoint on that particular side s is also the midpoint of the diameter of the circle. So the radius r of the semicircle must be \(r = (1/2)s + a.\)

We also know that a segment formed from the midpoint of the semicircle to the upper right vertex of the square is also the radius of the semicircle. Therefore, it is possible to form a right triangle, as seen here:

Now we can use the Pythagorean theorem to express \(r\) in another way:

$$\begin{align} r^2 &= s^2 + \left(\dfrac{1}{2}s\right)^2 \\[1em] r^2 &= s^2 + \dfrac{1}{4}s^2 \\[1em] r^2 &= \dfrac{5}{4}s^2 \\[1em] r &= \dfrac{\sqrt{5}}{2}s \end{align}$$Now we have two ways of expressing \(r,\) so let's set them equal to one another:

$$r = \dfrac{\sqrt{5}}{2}s = \dfrac{1}{2}s + a$$Now let's try solving for \(s / a:\)

$$\begin{align} a &= \dfrac{\sqrt{5}}{2}s - \dfrac{1}{2}s \\[1em] a &= \left(\dfrac{\sqrt{5 - 1}}{2}\right)s \\[1em] \dfrac{a}{s} &= \dfrac{\sqrt{5 - 1}}{2} \\[1em] \dfrac{s}{a} &= \dfrac{2}{\sqrt{5 - 1}} \end{align}$$