## Task B-3.4.

In a convex quadrilateral $A B C D$, $|A B|=15,|B C|=20,|C D|=24$, and the angles at vertices $B$ and $D$ are right angles. Calculate the distance between the midpoints of the diagonals of the quadrilateral $A B C D$.
## First Solution.

![](https://cdn.mathpix.com/cropped/2024_05_30_d18d2bbdee068dba95dfg-15.jpg?height=654&width=711&top_left_y=558&top_left_x=684)

From the right triangle $ABC$, we have $|AC| = \sqrt{|AB|^2 + |BC|^2} = \sqrt{15^2 + 20^2} = 25$.

From the right triangle $ACD$, we have $|AD| = \sqrt{|AC|^2 - |CD|^2} = 7$.

Since $|BD|^2 = |AD|^2 + |AB|^2 - 2|AD||AB| \cos (\varphi + \psi)$, we need to calculate $\cos (\varphi + \psi)$.

\[
\begin{gathered}
\cos \varphi = \frac{|AB|}{|AC|} = \frac{3}{5} \Rightarrow \sin \varphi = \frac{4}{5} \\
\sin \psi = \frac{|CD|}{|AB|} = \frac{24}{25} \Rightarrow \cos \psi = \frac{7}{25} \\
\cos (\varphi + \psi) = \cos \varphi \cos \psi - \sin \varphi \sin \psi = -\frac{3}{5}
\end{gathered}
\]

Thus, we get $|BD|^2 = |AD|^2 + |AB|^2 - 2|AD||AB| \cos (\varphi + \psi) = 400$, so $|BD| = 20$.

Since $|MB| = |MD| = \frac{25}{2}$ and point $N$ is the midpoint of diagonal $\overline{BD}$, we conclude that $\overline{MN}$ is the height of the isosceles triangle $BMD$.

Therefore, $|MN| = \sqrt{|MB|^2 - |BN|^2} = \frac{15}{2}$.

Note: Since $ABCD$ is a cyclic quadrilateral, the length of diagonal $\overline{BD}$ can also be obtained by applying Ptolemy's theorem. The product of the lengths of the diagonals of a cyclic quadrilateral is equal to the sum of the products of the lengths of the opposite sides, i.e., $|AC| \cdot |BD| = |AB| \cdot |CD| + |AD| \cdot |BC|$.

Thus, $25 \cdot |BD| = 15 \cdot 24 + 20 \cdot 7$, from which we get $|BD| = 20$.