Expressing the roots of a cubic as polynomials in one root
All roots of $8x^3-6x+1$ are real. (*)
The discriminant of $8x^3-6x+1$ is $5184=72^2$ and so the splitting field of $8x^3-6x+1$ has degree $3$.
Therefore, all three roots can be expressed as polynomials in any one given root.
Indeed, if $a$ is a root, then the others are $2a^2-1$ and $-2a^2-a+1$.
This can be easily checked. But how can we find these expressions in the first place?
I've tried this: let $b,c$ be the other roots. Then from Vieta's formulas we get $$b+c=-a, \qquad bc=-\dfrac{1}{8a}$$
The corresponding quadratic has discriminant $3-3a^2$ but it is not at all clear that this is the square of a polynomial in $a$. (It is $(4 a^2+a-2 )^2=(b-c)^2$, as it should be.) I'm stuck here.
More generally, is there an algorithm that given a cubic with integer coefficients and having real splitting field of degree $3$, expresses all three roots as polynomials in any one given root?
(*) From the triple-angle formula $\sin (3\theta) = - 4\sin^3\theta + 3\sin\theta$ when $\sin (3\theta) = 1/2$, these roots are $\sin(10^\circ)$, $\sin(50^\circ)$, $\sin(-70^\circ)$, but perhaps this is immaterial here.
Based on the answers in this question, I'm able to finish the general case.
Let $x^3+px+q$ be a cubic with rational coefficients and having real splitting field of degree $3$. Let its roots be $a,b,c$. Then $$b+c=-a, \qquad bc=-\dfrac{q}{a}$$ and $b,c$ are the roots of the quadratic $$ h(x)=(x-b)(x-c)=x^2+ax-\dfrac{q}{a} $$ The discriminant of $h$ is $b-c$. Now comes the nice idea from those answers: $$ d=(a-b)(a-c)(b-c)=h(a)(b-c) $$ where $d^2=-4p^3-27q^2$ is the discriminant of the original cubic. The hypothesis on the cubic implies that $d$ is rational. Therefore, $$ b-c = \dfrac{d}{h(a)} $$ To write this as a polynomial in $a$, we solve the linear system on $A,B,C$ implied by $$ d=(Aa^2+Ba+C)h(a)=(Aa^2+Ba+C)(2a^2-\dfrac{q}{a}) $$ or $$ ad=(Aa^2+Ba+C)(2a^3-q)=(Aa^2+Ba+C)(-2pa-3q) $$ The solution is $$ A=-\dfrac{6p}{d}, \quad B=\dfrac{9q}{d}, \quad C=-\dfrac{4p^2}{d} $$ which gives $$ b,c = -\dfrac{a}{2} \pm \dfrac{1}{2}(Aa^2+Ba+C) $$