4. In the set of real numbers, solve the equation

$$
x(x+1)\left(x^{2}+x+1\right)=6
$$
4. Let's make the substitution $y=x^{2}+x$. Then the equation reduces to $y(y+1)=6$, i.e., $y^{2}+y-6=0$, and its solutions are $y_{1 / 2}=\frac{-1 \pm \sqrt{1+24}}{2}=\frac{-1 \pm 5}{2}$, i.e., $y_{1}=2$ and $y_{2}=-3$. In the second case, by returning the substitution, we get $x^{2}+x+3=0$, and since the discriminant of this equation is negative: $1^{2}-4 \cdot 3=-11<0$, there are no real solutions. In the first case, by returning the substitution, we get $x^{2}+x-2=0$, and its solutions are $x_{1 / 2}=\frac{-1 \pm \sqrt{1+8}}{2}=\frac{-1 \pm 3}{2}$, i.e., $x_{1}=1$ and $x_{2}=-2$, which are the only two real solutions of the original equation.