<s>[INST] If $\cos\frac \pi{n+1}$ is a root of the equation $8x^3+4x^2-4x-1=0$, then find n $(n\in\mathbb N)$ 
If $\cos\frac \pi{n+1}$ is a root of the equation $8x^3+4x^2-4x-1=0$, then find n $(n\in\mathbb N)$

My Attempt:
Let $\theta=\frac\pi{n+1}$, therefore,
$$8\cos^3\theta+4\cos^2\theta-4\cos\theta-1=0$$
Also, $\cos3\theta=4\cos^3\theta-3\cos\theta$ and $\cos2\theta=2\cos^2\theta-1$, so,
$$2(\cos3\theta+3\cos\theta)+2(1+\cos2\theta)-4\cos\theta-1=0\\\implies\cos3\theta+\cos2\theta+\cos\theta=-\frac12\\\implies\frac{\sin\frac{3\theta}2}{\sin\frac\theta2}\cos2\theta=-\frac12\\\implies\frac{\sin\frac{3\pi}{2(n+1)}}{\sin\frac\pi{2(n+1)}}\cos\frac{2\pi}{n+1}=-\frac12$$
How to proceed from here?
 [/INST] If you know that a polynomial has a root of the form $\cos\left(\frac{\pi}{n+1}\right)$ then you have to think in roots of unity and cyclotomic polynomials. The idea is to find the right change of variable that transforms your polynomial into a cyclotomic polynomial. Since $8x^3+4x^2-4x-1=(2x)^3+(2x)^2-2(2x)-1$ it seems resonable to look for a change of variable of the form $2x=\dots$ and some standard change can be $2x=y+\frac{1}{y}$. Now, try to make this change of variable and see what you get, you should be able to finish the exercise from here.
</s>