Finding roots of the equation $8x^3+4x^2-4x-1=0$ which are in form of cosine of angles. So, I start this by reducing it to a cubic with 0 coefficient of the 2nd degree term which gives me :
$$\left(x + \frac{1}{6}\right)^3 - \frac{7}{12}\left(x + \frac{1}{6}\right)-\frac{7}{216}=0$$
Replacing $\left(x + \frac{1}{6}\right)$ by $y$:
$$y^3-\frac{7}{12}y -\frac{7}{216}=0$$
Then replacing $y$ by $r \cos(\alpha)$ and comparing the equation with :
$$\cos^3 (\alpha) - \frac{3}{4}\cos(\alpha)-\frac{1}{4}\cos(3\alpha)=0$$
I get:
$$r = \sqrt{\frac{7}{3}}, \alpha = \frac{1}{3}\cos^{-1}\left(\frac{1}{2\sqrt{7}}\right)$$
which finally give:
$$\theta = \cos^{-1}\left(\frac{\sqrt{7}}{9}\cos^{-1} \left(\frac{1}{2\sqrt{7}}\right)-\frac{1}{6}\right)$$
which is approximately 1.329 on putting it in the calculator.
But if I consider the common problem:
$8x^3-4x^2-4x+1=0$ having roots $\cos(\pi/7), \cos(3\pi/7), \cos(5\pi/7)$.
If I replace $x$ by $-x$ in this equation, we get:
$$8x^3+4x^2-4x-1=0$$
which is same the expression in the actual problem. So its roots must be $-\cos(\pi/7), -\cos(3\pi/7), -\cos(5\pi/7)$. This clearly doesn't matches with the answer I got.
Where I go wrong? Also can someone confirm while comparing coefficients in $cos(\alpha)$ variable cubic equation, we treat $\cos(3\alpha)$ as a constant. My book give a special section in which it shows this method of comparing in this way. So I guess its probably right? But I am not sure how is it right, isn't $\cos(3\alpha)$ also dependent on the main variable $\cos(\alpha)$.
 A: From the book in the chat, we can spot that the wrong thing is $r$, it should be $\sqrt{7}/3$ not $\sqrt{7/3}$.
So, your $\theta$ should be (I think you have a wrong calculation there!)
$$\theta = \cos^{-1}\left(\frac{\sqrt{7}}{{\color{red} 3}}{\color{red}\cos}\left( {\color{red}{\frac13}} \cos^{-1}\left(\frac{1}{2\sqrt{7}}\right)\right)-\frac{1}{6}\right)$$
Which is actually $2\pi/7$, fit $-\cos(5\pi/7)$ root.
As for equation $$\cos^3\theta+\frac{3H}{r^2}\cos\theta+\frac{G}{r^3}=0$$
We notice that there are some spaces to solve $\theta$ by adjusting $r$. Notice that no matter how we adjust, the linear term can't be cancelled, but we need a way to make the equation to solve easily. The triple-angle formula for cosine has nonzero linear term. That is why we put $3H/r^2=-3/4$ (and hence $G/r^3=-\cos(3\theta)/4$) since we can use the triple-angle formula there to solve.
A: if we take $t=2x$   we have $t^3 + t^2 - 2t - 1$
next, take complex number $w$   with $w \neq 1$  but $w^7 = 1.$   Factoring out a $w-1$ tells us $1 + w + w^2 + w^3 + w^4 + w^5 + w^6 = 0.$   Now take $t = w + w^6$  which is the same as $w + \frac{1}{w}.$   We find $ t^2 = w^2 + 2 + w^5,$   while $t^3 = w^3 + 3 w + \frac{3}{w}  + \frac{1}{w^3} = w^3 + 3 w + 3 w^6 + w^4 $
Adding,
$$  t^3 + t^2 =    w^3 + 3 w + 3 w^6 + w^4  +  w^2 + 2 + w^5  ,$$
in order
$$ t^3 + t^2 = 3 w^6 + w^5 + w^4 + w^3 + w^2 + 3w + 2$$   so that
$$ t^3 + t^2 -2t =  w^6 + w^5 + w^4 + w^3 + w^2 + w + 2$$   and
$$ t^3 + t^2 -2t - 1 =  w^6 + w^5 + w^4 + w^3 + w^2 + w + 1$$
finally
$$ t^3 + t^2 -2t - 1 =  0$$
Taking $w = \cos \frac{2\pi}{7}  + i \sin \frac{2\pi}{7},$   so that
$ 1/w =  \cos \frac{2\pi}{7}  - i \sin \frac{2\pi}{7},$  we see
$$    t = 2\cos \frac{2\pi}{7} $$
is one of the roots $t.$   Next we may take $w = \cos \frac{4\pi}{7}  + i \sin \frac{4\pi}{7},$  so that  $    t = 2\cos \frac{4\pi}{7} $  is another root. The last one can be $w = \cos \frac{8\pi}{7}  + i \sin \frac{8\pi}{7},$so that  $    t = 2\cos \frac{8\pi}{7} $  is the third root.
A: I am deriving answer to this question in some other way
We know $$ 8\cos\frac{\pi}{7}\cdot\cos\frac{2\pi}{7}\cdot\cos\frac{4\pi}{7} = -1$$
By applying transformation formula
$$ 4\cos\frac{\pi}{7}\cdot2(\cos\frac{2\pi}{7}\cdot\cos\frac{4\pi}{7}) = -1$$
$$ 4\cos\frac{\pi}{7}\cdot(\cos\frac{6\pi}{7}+\cos\frac{2\pi}{7}) = -1$$
$$ 4\cos\frac{\pi}{7}\cdot(-\cos\frac{\pi}{7}+\cos\frac{2\pi}{7}) = -1$$
$$ 4\cos\frac{\pi}{7}\cdot(-\cos\frac{\pi}{7}+2\cos^2\frac{\pi}{7}-1) = -1$$
Putting $ \cos\frac{\pi}{7} = x $
We will get the equation $$8x^3-4x^2-4x+1 =0 $$
Similarly other angles like $\cos\frac{2\pi}{7}$ and $\cos\frac{3\pi}{7}$ may be derived in terms of cubic equations
