3. In the plane, a rectangle $A B C D$ is given, and over its sides $A B$ and $B C$ (as diameters), semicircles $k$ and $l$ are constructed outside the rectangle. Find the segment $X Y$ of the greatest length $d$ such that $X \in k$ and $Y \in l$. Express the length $d$ in terms of the lengths $a=|A B|$ and $b=|B C|$.

School - written part of the 1st round, category C is held

## on Tuesday, January 26, 1999

so that it starts in the morning and the contestants have 4 hours of clean time to solve the problems. Each problem can earn the contestant 6 points, and a successful solver is a student who scores 10 points or more. These details will be communicated to the students before the start of the competition.
3. The centers $E, F$ of the semicircles coincide with the midpoints of sides $A B, B C$ (Fig. 1). The radii

![](https://cdn.mathpix.com/cropped/2024_04_17_99d8580772dc54cb419ag-3.jpg?height=517&width=642&top_left_y=197&top_left_x=709)

Fig. 1

of these semicircles are $\frac{1}{2} a, \frac{1}{2} b$, and from triangle $E B F$ we can easily calculate using the Pythagorean theorem

$$
|E F|=\sqrt{\frac{1}{4} a^{2}+\frac{1}{4} b^{2}}=\frac{1}{2} \sqrt{a^{2}+b^{2}}
$$

According to the triangle inequality (Fig. 1), for any two points $X, Y$ such that $X$ lies on semicircle $k$ and $Y$ lies on semicircle $l$, it is clear that

$$
|X Y| \leqq|X E|+|E Y| \leqq|X E|+|E F|+|F Y|
$$

with equality if and only if points $E, F$ lie on segment $X Y$. Therefore, segment $X Y$ has the greatest length for $X=X_{0}, Y=Y_{0}$, where points $X_{0}, Y_{0}$ are the intersections of semicircles $k, l$ with line $E F$. For the length of segment $X_{0} Y_{0}$, we have

$$
\left|X_{0} Y_{0}\right|=\frac{1}{2} a+\frac{1}{2} \sqrt{a^{2}+b^{2}}+\frac{1}{2} b=\frac{1}{2}\left(a+b+\sqrt{a^{2}+b^{2}}\right) .
$$

A full solution is worth 6 points; 4 points for finding the longest segment and 2 points for determining its length. Do not deduct points if the solver states (but does not prove) that the longest connection between two circles lies on their center line.