## Task A-2.4.

A semicircle with diameter $\overline{P Q}$ is inscribed in rectangle $A B C D$ and touches its sides $\overline{A B}$ and $\overline{A D}$. Point $P$ is located on side $\overline{B C}$, and point $Q$ is on side $\overline{C D}$. If $|B P|=2$ and $|D Q|=1$, determine $|P Q|$.
## First Solution.

![](https://cdn.mathpix.com/cropped/2024_05_30_bdf789747fbcdaaac460g-13.jpg?height=908&width=1005&top_left_y=274&top_left_x=454)

Let $O$ be the center and $r$ the radius of the given semicircle. Let points $K, L, M$, and $N$ be the orthogonal projections of point $O$ onto sides $\overline{C D}, \overline{B C}, \overline{A B}$, and $\overline{A D}$, respectively. Let $\varphi$ be the measure of angle $\varangle C Q P$.

Since the line segment connecting the center and the point of tangency of the semicircle is perpendicular to the side it touches, points $M$ and $N$ are the points of tangency of the semicircle with sides $\overline{A B}$ and $\overline{A D}$. Specifically, $|O M| = |O N| = r$. In the quadrilateral $A M O N$, the angles at vertices $A, M$, and $N$ are right angles, so this quadrilateral is a square with side length $r$.

Similarly, in the right triangle $P L O$, we have $|P L| = r \sin \varphi$.

Consider the quadrilateral $O K D N$. This is a rectangle because the angles at vertices $K, D$, and $N$ are right angles. Therefore, we have

$$
1 + r \sin \varphi = |D Q| + |Q K| = |D K| = |O N| = r
$$

Similarly, from the rectangle $L O M B$, we get $2 + r \cos \varphi = r$. 1 point

If we write these equations as

$$
r \sin \varphi = r - 1, \quad r \cos \varphi = r - 2
$$

and square and add them, we get

$$
\begin{aligned}
r^{2} & = (r - 1)^{2} + (r - 2)^{2} \\
0 & = r^{2} - 6 r + 5
\end{aligned}
$$

The solutions to the resulting quadratic equation are $r = 1$ and $r = 5$.

We discard the solution $r = 1$ because in that case, from the equation $r \cos \varphi = r - 2$, we get $\cos \varphi = -1$, which is impossible if $\varphi$ is the measure of an acute angle in the right triangle $P C Q$. Therefore, $r = 5$, so $|P Q| = 2 r = 10$.