3. Given are the sides $a = BC$ and $b = CA$ of triangle $ABC$. Determine the length of the third side if it is equal to the length of the corresponding height. For which values of $a$ and $b$ does the problem have a solution?
Solution. Let $c$ be the length of the unknown side and $s=\frac{a+b+c}{2}$. From the condition of the problem and Heron's formula, we have

$$
\sqrt{s(s-a)(s-b)(s-c)}=\frac{c^{2}}{2}
$$

from which, by squaring and rearranging in terms of the unknown $c$, we get:

$$
5 c^{4}-2\left(a^{2}+b^{2}\right) c^{2}+\left(a^{2}-b^{2}\right)^{2}=0
$$

The discriminant of this equation is

$$
D=-4\left(a^{4}-3 a^{2} b^{2}+b^{4}\right)=-4\left(a^{2}-\frac{3+\sqrt{5}}{2} b^{2}\right)\left(a^{2}-\frac{3-\sqrt{5}}{2} b^{2}\right)
$$

and is non-negative only if

$$
\frac{\sqrt{5}-1}{2} \leq \frac{a}{b} \leq \frac{\sqrt{5}+1}{2}
$$

Then (1) has solutions $c^{2}=\frac{1}{5}\left(a^{2}+b^{2} \pm \sqrt{D}\right)$. In the case when $a=b$, one of the solutions is equal to zero, so it is discarded. In the case when $D=0$, the solutions coincide.