Irrational equation $\left(x^{3}-3x+1\right)\sqrt{x^{2}-1}+x^{4}-3x^{2}+x+1=0$ I saw the problem from one math competition:
$$\left(x^{3}-3x+1\right)\sqrt{x^{2}-1}+x^{4}-3x^{2}+x+1=0$$.
I tried to solve it this way:
\begin{align*}
 & \left(x^{3}-3x+1\right)\sqrt{x^{2}-1}+x^{4}-3x^{2}+x+1=0\\
\Leftrightarrow\,\, & \left(x^{3}-3x+1\right)\sqrt{x^{2}-1}+x\left(x^{3}-3x+1\right)+1=0\\
\Leftrightarrow\,\, & \left(x^{3}-3x+1\right)\left(\sqrt{x^{2}-1}+x\right)=-1
\end{align*}
Now I tried to use substitutions like $a=x^3-3x$ and $b=\sqrt{x^{2}-1}$ but I cannot get anything. I know that solutions are $x=1$ and $x=\pm\sqrt{2}$.

HINT
Based on the suggestion of @JohnOmielan in the comments, assuming that $|x| > 1$, it yields that
\begin{align*}
(x^{3} - 3x + 1)(\sqrt{x^{2} - 1} + x) = -1 & \Longleftrightarrow x^{3} - 3x + 1 = \sqrt{x^{2} - 1} - x\\\\
& \Longleftrightarrow x^{3} - 2x + 1 = \sqrt{x^{2} - 1}\\\\
& \Longleftrightarrow (x^{3} - 2x + 1)^{2} = x^{2} - 1\\\\
& \Longleftrightarrow x^{6} - 4x^{4} + 2x^{3} + 4x^{2} - 4x + 1 = x^{2} - 1\\\\
& \Longleftrightarrow x^{6} - 4x^{4} + 2x^{3} + 3x^{2} - 4x + 2 = 0
\end{align*}
Since the sum of the coefficients equals zero, the value $x = 1$ is a root.
Taking advantage of such fact, can you proceed from here?
