Ex. 140. A circle is inscribed in a trapezoid with integer sides. The midline of the trapezoid divides it into two parts, the areas of which are 15 and 30. Find the radius of the inscribed circle.

## Several problems
Ex. 140. 5/2. Solution. Let $A D=a$ be the larger base, and $B C=b$ be the smaller base. By calculating the ratio of the areas of the upper and lower trapezoids, we find that $a=5 b$ and $b h=15$, where $h$ is the height of the trapezoid. It follows that $h$ is a rational number.

Assume for definiteness that $A B \leq C D$. Since $A B+C D=$ $A D+B C=6 b$, we can assume that $A B=3 b-x$, and $C D=3 b+x$, where $x$ is some non-negative integer. Drop perpendiculars $B E$ and $C F$ to the base $A D$. Since $A E+F D=4 b$ and $A E \leq F D$, we can assume that $A E=2 b-y, F D=2 b+y$. From the equality $(3 b-x)^{2}-(2 b-y)^{2}=(3 b+x)^{2}-(2 b+y)^{2}$, it follows that $3 x=2 y$. From this, it follows that $x=2 m, y=3 m$, where $m$ is some non-negative integer. We obtain the equality $5\left(b^{2}-m^{2}\right)=h^{2}$, from which it follows that $h$ is a natural number divisible by 5, that is, $h=5 k$, where $k$ is a natural number. In this case, $b^{2}-m^{2}=5 k^{2}$ and $b k=3$. The only possibility is that $b=3, k=1, m=2$. Thus, we obtain a trapezoid in which $b=3, a=15, h=5, A E=0, F D=12$. The trapezoid is a right trapezoid, and therefore its height is equal to the diameter of the inscribed circle. From this, we obtain the answer to the problem.