3. A square is inscribed in a triangle with a base equal to a, one of its sides lying on the base of the triangle. The area of the square is $\frac{1}{6}$ of the area of the triangle. Determine the height of the triangle and the side of the square.
Solution. If $M D E L$ is a square with side $x$, inscribed in the given $\triangle A B C$ with height $h=B K, a=A C$, then we have

$$
\begin{gathered}
\triangle A E M \sim \triangle A B K \Rightarrow \frac{A E}{A B}=\frac{x}{h} \\
\triangle E B D \sim \triangle A B C \Rightarrow \frac{E B}{A B}=\frac{x}{a}
\end{gathered}
$$

![](https://cdn.mathpix.com/cropped/2024_05_06_9b22d083e3fa0031316bg-02.jpg?height=369&width=303&top_left_y=792&top_left_x=477)

Thus, we obtain

$$
\frac{x}{h}+\frac{x}{a}=\frac{A E}{A B}+\frac{E B}{A B}=1 \Rightarrow x a+x h=a h
$$

By the given condition,

$$
a h=12 x^{2} \Rightarrow\left\{\begin{array}{l}
a h=12 x^{2}, \\
a+h=12 x
\end{array} \quad \Rightarrow x=\frac{3 \pm \sqrt{6}}{6} a, h=(5 \pm 2 \sqrt{6}) a\right.
$$

Answer. $x=\frac{3 \pm \sqrt{6}}{6} a, \quad h=(5 \pm 2 \sqrt{6}) a$