4. Given are two parallel lines $p_{1}$ and $p_{2}$ and a point $C$ between them. Determine a right triangle $A B C$, with a right angle at the given point $C$ and the other two vertices $A$ and $B$ lying on the lines $p_{1}$ and $p_{2}$ respectively, such that its area is the smallest.
Solution. Let $d$ be the distance between the lines $p_{1}$ and $p_{2}$, and let $a$ be the distance from point $C$ to line $p_{2}$ (see diagram). The position of triangle $ABC$ is fully determined by the angle $x$ that the leg $AC$ makes with the normal $ED$ to the lines $p_{1}$ and $p_{2}$. Since $\measuredangle CBE = \measuredangle ACD = x$ (as angles with mutually perpendicular sides), from the right triangles $ACD$ and $CEB$, we have $\overline{AC} = \frac{a}{\cos x} \mathrm{I} \overline{BC} = \frac{d-a}{\sin x}$, so the area of triangle $ABC$ will be

$$
P = \frac{1}{2} \overline{AC} \cdot \overline{BC} = \frac{1}{2} \frac{a}{\cos x} \cdot \frac{d-a}{\sin x} = \frac{a(d-a)}{\sin 2x}
$$

According to this, the area $P$ will be the smallest if $\sin 2x$ is the largest, i.e., if $\sin 2x = 1$, from which we get $x = \frac{\pi}{4}$.

## IV year