5. In a regular triangular pyramid, a section is made which is a square. Find the volume of the pyramid if the side of the base is $a$, and the side of the square in the section is $b$.
Answer: $V=\frac{a^{3} \cdot \sqrt{2 b^{2}+2 a b-a^{2}}}{12(a-b)}$.

## Solution:

Let $H$ be the height of the pyramid, and $l$ be the length of the lateral edge. Then the volume of the pyramid is

$$
V=\frac{1}{3} \cdot \frac{a^{2} \sqrt{3}}{4} \cdot H
$$

Express the height $H$ in terms of $a$ and $b$.

Since $H^{2}=l^{2}-\frac{a^{2}}{3}, \frac{l}{a}=\frac{b}{a-b}$, then $H^{2}=\frac{a^{2} b^{2}}{(a-b)^{2}}-\frac{a^{2}}{3}=\frac{a^{2} b^{2}}{(a-b)^{2}}\left(2 b^{2}+2 a b-a^{2}\right)^{2}$.

Therefore,

$$
V=\frac{a^{3} \cdot \sqrt{2 b^{2}+2 a b-a^{2}}}{12(a-b)}
$$

## Variant 2