I was finding the roots of the polynomial $y=x^3-x^2-9x+1$. And I got one of the roots of the polynomial to be $$\dfrac{4\sqrt{7}}{3}\cos{\left(\dfrac{1}{3}\arccos{\dfrac{1}{\sqrt{28}}}\right)}+\dfrac{1}{3}\tag{1}$$ which can be simplified into $$2\left(\cos\frac {\pi}{7}+\cos\frac {2\pi}{7}+\cos\frac {3\pi}{7}\right)\tag{2}$$ And according to this problem, it can be further simplified into $$4\cos\frac {2\pi}{7}+1\tag{3}$$
My question is: How do you get from $(1)$ to $(2)$ to $(3)$?