12.338. The side of the base of a regular quadrilateral prism is equal to $a$, its volume is equal to $V$. Find the cosine of the angle between the diagonals of two adjacent lateral faces.
## Solution.

The lateral edge of the prism (Fig. 12.199) $B B_{1}=\frac{V}{S_{\text {base }}}=\frac{V}{a^{2}} \Rightarrow A B_{1}^{2}=B_{1} C^{2}=$ $=\frac{V^{2}}{a^{4}}+a^{2}=\frac{V^{2}+a^{6}}{a^{4}}$.

$\mathrm{B} \triangle A B_{1} C$ :

$A C^{2}=A B_{1}^{2}+B_{1} C^{2}-2 A B_{1} \cdot B_{1} C \cos \angle A B_{1} C ;$

$(a \sqrt{2})^{2}=2 A B_{1}^{2}-2 A B_{1}^{2} \cos \angle A B_{1} C$

$2 a^{2}=2 \cdot \frac{V^{2}+a^{6}}{a^{4}}-2 \cdot \frac{V^{2}+a^{6}}{a^{4}} \cos \angle A B_{1} C ;$

$a^{6}=V^{2}+a^{6}-\left(V^{2}+a^{6}\right) \cos \angle A B_{1} C ;$

$\cos \angle A B_{1} C=\frac{V^{2}}{V^{2}+a^{6}}$.

Answer: $\frac{V^{2}}{V^{2}+a^{6}}$.