Triangle $ABC$ has $AB = 13$ and $AC = 15$, and the altitude to $\overline{BC}$ has length $12$. What is the sum of the two possible values of $BC$? $\textbf{(A)}\ 15\qquad$ $ \textbf{(B)}\ 16\qquad$ $ \textbf{(C)}\ 17\qquad$ $ \textbf{(D)}\ 18\qquad$ $ \textbf{(E)}\ 19$
Solution
Let $D$ be the foot of the altitude from $A$ to line $BC$.
$BD=\sqrt{AB^2-AD^2}=\sqrt{169-144}=5$, and $DC=\sqrt{AC^2-AD^2}=\sqrt{225-144}=9$.
If $\triangle ABC$ is acute (or right at $B$ or $C$), $D$ lies between $B$ and $C$, so $BC=BD+DC=5+9=14$.
If $\triangle ABC$ is obtuse at $B$, $D$ lies outside segment $BC$ beyond $B$, so $BC=DC-BD=9-5=4$.
The sum of the two possible values is $14+4=\boxed{18}$.