Finding the roots of any cubic with trigonometric roots.

For $x^3+x^2-10x-8 = 0$.

$(\Bbb Z/31 \Bbb Z)^*/\{\pm 1\}$ is cyclic of order $15$, so it has only one subgroup $H$ of index $3$.
$H = \{\pm 1; \pm 2; \pm 4; \pm 8; \pm 15\}$ (generated by $\pm 2$)

So, the roots should be integer combinations of the quantities $\sum_{n \in kH} 2\cos(\frac {2n\pi}{31})$ where $kH \in G/H$ are the three cosets of $H$

In fact, the roots are exactly those sums

$\sum_{n \in H} 2\cos(\frac {2n\pi}{31}) = 3.083872... \\ \sum_{n \in 3H} 2\cos(\frac {2n\pi}{31}) = -0.786802... \\ \sum_{n \in 9H} 2\cos(\frac {2n\pi}{31}) = -3.297071...$

However, it can't be related to an equation like $x = \sqrt {2a + \sqrt {2a +\sqrt {2a + x}}}$ because modulo $2$, the action of the Frobenius automorphism would permute the roots cyclically, while here, the Frobenius acts trivially because $\pm 2 \in H$ (or equivalently, because $2$ is a cube mod $31$).


The strategy to solve a cubic equation is first to change it to the form $x^3+px+q=0$, i.e. to eliminate the squared term.

Cardano's method works well if there is only $1$ real root ($4px^3+27q^2>0$). If there are $3$ real roots ($4px^3+27q^2<0$), you can set $x=A\cos\theta$ ($A>0$). The equation becomes $$A^3\cos^3\theta+pA\cos\theta+q=0.$$ We choose $A$ so that $A^3\cos^3\theta+pA\cos\theta$ is proportional to the expansion of $\cos 3\theta$ in function of $\cos\theta$. Remember $\cos 3\theta=4\cos^3\theta-3\cos\theta$. So we must have $$\frac{A^3}4=\frac{pA}{-3}\iff A^2=\frac{-p}3\iff A=\sqrt{\frac{-p}3}\qquad\text{(we chose $A>0$)}.$$ We obtain $$-\frac p3\sqrt{-\frac p3}(4\cos^3\theta-3\cos\theta)=-q\iff\cos3\theta=-\frac q{-\dfrac p3\sqrt{-\dfrac p3}}$$ There remains to solve this standard trigonometric equation.