In trapezoid $A B C D, A D$ is parallel to $B C$. Also, $A B=C D, B C=9, A D=21$, and the perimeter of $A B C D$ is 50 . What is the length of the diagonal $A C$ ?

![](https://cdn.mathpix.com/cropped/2024_04_17_d0cbae19e125c7a52478g-3.jpg?height=247&width=480&top_left_y=798&top_left_x=882)
Let $E$ and $F$ be points on $A D$ so that $B E$ and $C F$ are perpendicular to $A D$.

![](https://cdn.mathpix.com/cropped/2024_04_17_698c2a84b151b65f3cc1g-11.jpg?height=301&width=591&top_left_y=695&top_left_x=821)

Since $B C$ and $A D$ are parallel, so are $B E$ and $C F$.

This means $B C F E$ a parallelogram, so $B E=C F$.

It is given that $A B=D C$, so $\triangle A E B$ and $\triangle D F C$ are right triangles with an equal hypotenuse and an equal leg.

Therefore, $\triangle A E B$ and $\triangle D F C$ are congruent.

This means $A E=D F$ and since $B C=E F$, we get $A D=A E+E F+F D=2 A E+B C$.

Substituting $B C=9$ and $A D=21$, we have $21=2 A E+9$ or $2 A E=12$ so $A E=6$.

Since $A B=C D$ and the perimeter of the trapezoid is

$$
A B+B C+C D+A D=2 C D+B C+A D=50,
$$

we get $C D=\frac{1}{2}(50-9-21)=10$.

By the Pythagorean theorem, $C F^{2}=C D^{2}-F D^{2}$, and since $C D=10$ and $F D=A E=6$, we have $C F=\sqrt{100-36}=8$.

The length $A C$ is the hypotenuse of $\triangle A F C$, and we now know that $A F=A E+E F=6+9=15$ and $C F=8$.

By the Pythagorean theorem, $A C^{2}=A F^{2}+F C^{2}=15^{2}+8^{2}=225+64=289$.

Since $A C>0$ and $A C^{2}=289, A C=\sqrt{289}=17$.

ANSWER: 17