2. Let's represent the left side of the equation as follows:

$$
\begin{gathered}
x^{4}+4 x-1=\left(x^{2}\right)^{2}+2 x^{2}-2 x^{2}+1-1+4 x-1= \\
=\left(x^{2}+1\right)^{2}-\left(2 x^{2}-4 x+2\right)=\left(x^{2}+1\right)^{2}-\left((\sqrt{2}(x-1))^{2}=\right. \\
=\left(x^{2}+1-\sqrt{2} x+\sqrt{2}\right)\left(x^{2}+1+\sqrt{2} x-\sqrt{2}\right)
\end{gathered}
$$

Then the original equation will be equivalent to the system of two equations:

1) $x^{2}-\sqrt{2} x+1+\sqrt{2}=0$, which has no roots because its discriminant is negative;
2) $x^{2}+\sqrt{2} x+1-\sqrt{2}=0$, which has roots $x_{1,2}=\frac{-1 \pm \sqrt{2 \sqrt{2}-1}}{\sqrt{2}}$.
Answer: $x_{1,2}=\frac{-1 \pm \sqrt{2 \sqrt{2}-1}}{\sqrt{2}}$.

![](https://cdn.mathpix.com/cropped/2024_05_06_6e79d52efdb2f06b7b9dg-2.jpg?height=454&width=463&top_left_y=250&top_left_x=868)

Let the legs of the right triangles be $x$ and $y$, with $x > y$. Then the side of the smaller square will be $x - y$. Accordingly, the radius of the circle inscribed in the square will be $\frac{x - y}{2}$. The radius of the circle inscribed in the triangle with legs $x, y$ and hypotenuse 4 is $\frac{x + y - 4}{2}$. The formula for the radius of the circle inscribed in a right triangle with legs $x$ and $y$ and hypotenuse 4 cm can be derived. Since $S_{\Delta} = \frac{xy}{2} = \frac{x + y + 4}{2} r$, we have $r = \frac{xy}{x + y + 4} = \frac{xy \cdot (x + y - 4)}{(x + y + 4)(x + y - 4)} = \frac{xy(x + y - 4)}{x^2 + y^2 + 2xy - 16} = \frac{xy(x + y - 4)}{16 + 2xy - 16} = \frac{x + y - 4}{2}$. Thus, we obtain the equation: $\frac{x - y}{2} = \frac{x + y - 4}{2}$, from which we find $y = 2$ (cm). This means that the smaller angle in each triangle will be $30^{\circ}$, so $x = 2 \sqrt{3}$. Therefore, the desired radius will be $\frac{2 \sqrt{3} - 2}{2} = \sqrt{3} - 1$.

Answer: $\sqrt{3} - 1$.