Complex roots come in pairs but there is no such restriction on irrational roots.
It’s clear from a graph of this function that the three roots are real and none of the roots is 1 or -1.
The Rational Root Theorem requires each root to be expressible as a fraction p/q, where q is a factor of the coefficient of the highest power of x and p a factor of the constant. Since both coefficients are 1 in x³-3x+1, not all the roots can be rational. And we know that no root is 1 or -1, so all roots must be irrational.
If the roots are a, b and c, then x³-3x+1=(x-a)(x-b)(x-c)=x³-(a+b+c)x²+(ab+ac+bc)x-abc=0.
Therefore abc=-1 and a+b+c=0, so a=-b-c and -(b+c)bc=-1, b²c+bc²-1=0. (If a=p₁/q₁, b=p₂/q₂, c=p₃/q₃, then p₁p₂p₃/(q₁q₂q₃)=-1, which cannot be true for any integer values of p or q. You could call this the Irrational Roots Theorem applying in this case.)
If we solve this quadratic we get b=(-c²±√(c⁴+4c))/2c or c=(-b²±√(b⁴+4b))/2b. From these it appears that b and c are irrational, which implies that a=-(b+c) is also irrational, so there are three irrational roots.
[The original equation can be written x=1/(3-x²). We can use this as an iterative basis for finding a root. Starting with x=0 we get x=1/3, then putting x=1/3 back in the equation: x=1/(3-1/9)=9/26. The next iteration gives x=676/1947, and so on. The process continuous indefinitely so we have an irrational solution x=0.3472963553 approx. Call this root a.
To find the other roots we can use synthetic division:
a | 1 0 -3 | 1
1 a a² | a³-3a
1 a a²-3 | 0 = x²+ax+a²-3.
The roots of this quadratic are x=(-a±√(a²-4a²+12))/2=(-a±√(12-3a²))/2
Substituting the value of a into this we get b=1.532088886, c=-1.879385242 approx.]