231. A right rectangular parallelepiped is inscribed in a regular quadrilateral pyramid with the side of the base and the height both equal to 1, such that the base of the parallelepiped lies in the plane of the base of the pyramid, and the vertex of the opposite face is on the lateral surface of the pyramid. The area of the base of the parallelepiped is $s$. Within what limits can the diagonal of the parallelepiped vary?
231. Let $x$ be the height of the parallelepiped. Consider the section of the pyramid by a plane at a distance $x$ from its base. In the section, a square with side $(1-x)$ is obtained, in which a rectangle of area $s$ is inscribed, which is a face of the parallelepiped. There are two cases:
1) The base of the parallelepiped is a square with side $\sqrt{s}$. The diagonal of the parallelepiped $d=\sqrt{x^{2}+2 s}$, and

$$
(1-x) \frac{\sqrt{2}}{2} \leqslant \sqrt{s} \leqslant (1-x)
$$

or

$$
1-\sqrt{2 s} \leqslant x \leqslant 1-\sqrt{s}
$$

Thus, in this case, if $s \leqslant \frac{1}{18}$, then at $x=1-\sqrt{2 s}$. Moreover, $d^{2}<2-2 s$. Combining the results of points 1) and 2), we get

Answer: if $0<s \leqslant \frac{1}{18}$, then

$$
\sqrt{\frac{2}{3}-2 s} \leqslant d<\sqrt{2-2 s}
$$

if $\frac{1}{18}<s<\frac{7+2 \sqrt{6}}{25}$, then

$$
\begin{gathered}
\text { if } \frac{7+2 \sqrt{6}}{25} \leqslant s<\frac{1}{2}, \text { then } \\
\qquad \sqrt{1-2 \sqrt{2 s}+4 s} \leqslant d s \leqslant \sqrt{1-2 \sqrt{s}+3 s} ;
\end{gathered}
$$

if $\frac{1}{2} \leqslant s<1$, then

$$
\sqrt{2 s}<d \leqslant \sqrt{1-2 \sqrt{s}+3 s}
$$