27. [12] Cyclic pentagon $A B C D E$ has a right angle $\angle A B C=90^{\circ}$ and side lengths $A B=15$ and $B C=20$. Supposing that $A B=D E=E A$, find $C D$.
Answer: 7 By Pythagoras, $A C=25$. Since $\overline{A C}$ is a diameter, angles $\angle A D C$ and $\angle A E C$ are also right, so that $C E=20$ and $A D^{2}+C D^{2}=A C^{2}$ as well. Beginning with Ptolemy's theorem,
$$
\begin{array}{l}
(A E \cdot C D+A C \cdot D E)^{2}=A D^{2} \cdot E C^{2}=\left(A C^{2}-C D^{2}\right) E C^{2} \\
\quad \Longrightarrow C D^{2}\left(A E^{2}+E C^{2}\right)+2 \cdot C D \cdot A E^{2} \cdot A C+A C^{2}\left(D E^{2}-E C^{2}\right)=0 \\
\quad \Longrightarrow C D^{2}+2 C D\left(\frac{A E^{2}}{A C}\right)+D E^{2}-E C^{2}=0 .
\end{array}
$$

It follows that $C D^{2}+18 C D-175=0$, from which $C D=7$.
Remark: A simple trigonometric solution is possible. One writes $\alpha=\angle A C E=\angle E C D \Longrightarrow \angle D A C=$ $90^{\circ}-2 \alpha$ and applies double angle formula.