In triangle $A B C$, altitudes $A D$ and $C E$ are drawn. Find $A C$, if $B C=a, A B=b, \frac{D E}{A C}=k$.

#
Triangles $E D B$ and $C B A$ are similar. Consider two cases: $\angle B=90^{\circ}$.

## Solution

Let $\angle B=\beta$. If $\beta=90^{\circ}$, then triangles $E D B$ and $C B A$ are similar with a coefficient of $-\cos \beta$, that is, $\cos \beta=-k$. Then $A C^{2} = a^{2} + b^{2} + 2 a b k$
![](https://cdn.mathpix.com/cropped/2024_05_06_96d74c2697cd905bd948g-21.jpg?height=408&width=1130&top_left_y=1494&top_left_x=472)

## Answer

$\sqrt{a^{2} + b^{2} \pm 2 a b k}$