<s>[INST] 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)$.
 [/INST] 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
</s>