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
If you use what is described here (since $\Delta=404$ implies three real roots), you should end with $$x_k=2 \sqrt{\frac{2}{3}} \cos \left(\frac{2 \pi k}{3}-\frac{1}{3} \cos ^{-1}(-\frac{3\sqrt 3}{8 \sqrt 2})\right)\qquad \text{with} \qquad k=0,1,2$$