147. At the base of the quadrilateral pyramid $S A B C D$ lies a square $A B C D$ with side $a$. Both angles between opposite lateral faces are right angles. The dihedral angle at edge $S A$ is $\alpha$. Find the volume of the pyramid.
147. Let $K$ be the projection of vertex $S$ onto the plane $ABCD$, and $L, M, N$, and $P$ be the projections of $S$ onto the sides $AB, BC, CD$, and $DA$.

From the condition, it follows that triangles $LSN$ and $MSP$ are right triangles with right angles at vertex $S$. Therefore,

![](https://cdn.mathpix.com/cropped/2024_05_21_9b03e22d2b8ca67aa653g-087.jpg?height=299&width=296&top_left_y=834&top_left_x=319)
a)

![](https://cdn.mathpix.com/cropped/2024_05_21_9b03e22d2b8ca67aa653g-087.jpg?height=294&width=308&top_left_y=840&top_left_x=625)

b)

Pric. 27.

$|LK| \cdot |KN| = |MK| \cdot |KP| = |KS|^2$. Since $|LK| + |KN| = |MK| + |KP| = a$, there are two cases: either $|LK| = |KM|, |KP| = |KN|$, or $|LK| = |KP|, |MK| = |KN|$, i.e., point $K$ is located on one of the diagonals $AC$ or $BD$. Let's consider both cases.

1) $K$ is on diagonal $BD$ (Fig. 27, a). In this figure, the projection of the pyramid onto the plane $ABCD$ is shown. Point $S$ is "above" $K$. Let $|LK| = |KM| = x$. Now we find:

$$
\begin{gathered}
|KS| = \sqrt{|LK| \cdot |KN|} = \sqrt{x(a-x)} \\
|SL| = \sqrt{|LK|^2 + |KS|^2} = \sqrt{ax} \\
S_{ABS} = \frac{a \sqrt{ax}}{2}.
\end{gathered}
$$

Similarly, $S_{ADS} = \frac{a \sqrt{a(a-x)}}{2}$. Further, $V_{ABDS} = \frac{1}{6} a^2 \sqrt{x(a-x)}$.

On the other hand, by the formula from problem 11,

$$
V_{ABDS} = \frac{2}{3} \frac{S_{ABS} S_{BDS} \sin \alpha}{|AK|} = \frac{a^3 \sqrt{x(a-x)} \sin \alpha}{6 \sqrt{(a-x)^2 + x^2 + x(a-x)}}
$$

Equating the two expressions for $V_{ABDS}$, we get

$$
x^2 - ax + a^2 \cos^2 \alpha = 0
$$

from which $\quad x(a-x) = a^2 \cos^2 \alpha$,

$$
V_{ABCD S} = \frac{a^3 |\cos \alpha|}{3}
$$

The problem has a solution if $|\cos \alpha| \leq \frac{1}{2}$. Additionally, the angle at edge $AS$ is obtuse, since the plane $ASM$ is perpendicular to the plane $ASD$, and this plane lies within the dihedral angle between the planes $ASB$ and $ASD$. Therefore, in the first case, the problem has a solution if $\frac{\pi}{2} < \alpha \leq \frac{2\pi}{3}$. Thus, we obtain

Answer: if $\frac{\pi}{2} < \alpha \leq \frac{2\pi}{3}, V = \frac{a^3 \sqrt{-\cos \alpha (1 + \cos \alpha)}}{6}$.