2. Let $x, y$ be positive numbers, and $S$ be the smallest number among $x, y+\frac{1}{x}, \frac{1}{y}$. Find the maximum possible value of $S$. For what values of $x, y$ is this maximum value achieved?
(6th All-Soviet Union Olympiad)
2. We consider, when $S$ takes the maximum value, it can simultaneously satisfy the three inequalities $x \geqslant S$, (1) $y+\frac{1}{x} \geqslant S$, (2) $\frac{1}{y} \geqslant S$,(3) and at least one of them is an equality.

Since when $x=y=1$, $S=1$, we can assume $S>0$. From (3), we get $y \leqslant \frac{1}{S}$, from (1), we get $\frac{1}{x} \leqslant \frac{1}{S}$, from (2), we get $S \leqslant \frac{1}{x}+ y \leqslant \frac{2}{S}$, i.e., $S^{2} \leqslant 2$, which means $S \leqslant \sqrt{2}$.
On the other hand, when $x=\sqrt{2}, y=\frac{\sqrt{2}}{2}$, we have $S=\sqrt{2}$.
Therefore, the possible maximum value of $S$ is $\sqrt{2}$, and when $x=\sqrt{2}, y=\frac{\sqrt{2}}{2}$, $S$ reaches its maximum value.