The Law of Cosines
[Pythagorean Theorem (direct and inverse).]

In a right triangle \(ABC\), the leg \(AC = 15\) and the leg \(BC = 20\). On the hypotenuse \(AB\), a segment \(AD\) equal to 4 is laid out, and point \(D\) is connected to \(C\). Find \(CD\).
Find $\cos \angle A$ from the right triangle $A B C$.

## Solution

By the Pythagorean theorem

$$
A B=\sqrt{A C^{2}+B C^{2}}=\sqrt{15^{2}+20^{2}}=\sqrt{225+400}=\sqrt{625}=25
$$

From the right triangle $A B C$, we find that

$$
\cos \angle A=\frac{A C}{A B}=\frac{15}{25}=\frac{3}{5}
$$

By the cosine rule

$$
C D^{2}=A C^{2}+A D^{2}-2 A C \cdot A D \cos \angle A=15^{2}+4^{2}-2 \cdot 15 \cdot 4 \cdot \frac{3}{5}=225+16-72=169
$$

Therefore, $C D=13$.

![](https://cdn.mathpix.com/cropped/2024_05_06_845c09db4774ba28be39g-20.jpg?height=351&width=575&top_left_y=579&top_left_x=747)

## Answer

13.