<s>[INST] Roots of $2x^3-4x+1$ I'm having difficulty getting the solution to the cubic equation $2x^3-4x+1=0$ and from http://www2.trinity.unimelb.edu.au/~rbroekst/MathX/Cubic%20Formula.pdf it claims that the general solution to $Ax^3+Bx^2+Cx+D=0$ is $$p+q+r=-B/A$$
$$pq+qr+rp=C/A$$
$$pqr=-D/A$$
where $p,q,r$ are the roots.
I also tried http://www2.trinity.unimelb.edu.au/~rbroekst/MathX/Cubic%20Formula.pdf and very carefully followed their technique (which looks at first glance different but must obviously be equivalent) however it didn't line up with what I got from Wolframalpha.  So I'm just looking to see where I messed up or how others would solve this.
Here's my attempt:
$$p+q+r=0$$
$$pq+qr+rp=-2$$
$$pqr=-1/2$$
From the first we get that $$p=-q-r$$
then from the second
$$p(q+r) = -2-qr$$
then from the two of these we get
$$-p^2 = -2-qr$$
equivalently 
$$0=p^3 -2p+1/2$$
Wait!  What?!  A cubic to solve a cubic..... cubics all the way down!?  Obviously not.... so if it's possible to solve this apart from numerical techniques, I would be really interested in such an answer.  Thank you
 [/INST] We have a cubic equation $2x^3 - 4x + 1 = 0$, what $x$ is its root ? 
May you can solve this by formula $\cos 3t = 4\cos^3 t - 3\cos t$. But I hope that you understood the means and enjoys from apply them on many cubic equations. Indeed, you will solve this cubic equation. 
The cubic equation is $x^3 - 2x + \frac{1}{2} = 0$ which have form $t^3 + pt + q = 0$. A cubic equation of this class can be got from $x^3 + ax^2 + bx + c = 0$ if replace the $x$ by $t - \frac{a}{3}$ and then the coefficients $$p = \frac{3b - a^2}{3}\quad \mathrm{and}\quad q = \frac{2a^2 - 9ab + 27c}{27}.$$ 
Just as $(x + a)^3 = x^3 + 3ax^2 + 3a^2x + a^3$, if $z = e^{it} = x + iy$, then $$z^3 = e^{i3t}=  x^3 + i3yx^2 - 3y^2x - iy^3 = (4\cos^3 t - 3\cos t) + i(-4\sin^3 t + 3\sin t).$$
If $z = e^{it} = x + iy$ and $\zeta = x^3 - iy^3$, then it is $4\zeta - 3\overline{z} - z^3 = 0$. Just as this, if $z = re^{it} = rx + iry$ and $\zeta = r^3x^3 - ir^3y^3$, then $4\zeta^3 - 3r^2\overline{z} - z^3 = 0$. 
For your cubic equation $4x^3 - 8x + 2 = 0$, you know 
$$r = \sqrt{\frac{8}{3}}\quad \mathrm{and} \quad t = \frac{1}{3}\arg(-2\sqrt{\frac{3}{8}}^3) + \frac{2n\pi}{3} = \frac{1}{3}\arg(-\frac{3}{8}\sqrt{\frac{3}{2}})+ \frac{2n\pi}{3}$$ where $n \in \mathbb{Z}$. 
Therefore $$x = \sqrt{\frac{8}{3}}\exp(i(\frac{1}{3}\arg(-\frac{3}{8}\sqrt{\frac{3}{2}})+\frac{2n\pi}{3})),\quad n \in \mathbb{Z}.$$
But $x \in \mathbb{R}$ and the term under $\arg$ function is real, so the root $$x = \sqrt{\frac{8}{3}}\cos(\frac{1}{3}\cos^{-1}(-\frac{3}{8}\sqrt{\frac{3}{2}})+\frac{2n\pi}{3})),\quad n \in \mathbb{Z}.$$
</s>