2nd solution of $\cos x \cos 2x\cos 3x= \frac 1 4 $ 
$\cos x \cos 2x\cos 3x= \dfrac 1 4 $

Attempt explained:
$(2\cos x \cos 3x)\cos 2x = \frac1 2 $
$(\cos 4x +\cos 2x )\cos 2x = \frac 1 2 \\\cos ^2y + \cos y (2\cos^2y- 1)= \frac1 2 \\ $
(Let, y = 2x)
$\implies 4\cos^3 y+2\cos^2y- 2\cos y-1=0$
I solved this equation using Rational Root Theorem and got $y = \frac 1 2$
$\implies x= m\pi \pm \dfrac\pi3 \forall x\in \mathbb {Z}$
Using Remainder theorem, the other solution is $\cos^2 y = \dfrac 1 2 $
$\implies x = \dfrac n2\pi \pm\dfrac \pi 8 $
But answer key states: $ x= m\pi \pm \dfrac\pi3or x =(2n+1)\dfrac \pi 8$
Why don't I get the second solution correct?

It's $$\cos2x(\cos2x+\cos4x)=\frac{1}{2}.$$
Now, let $\cos2x=t$.
Thus, $$t(t+2t^2-1)=\frac{1}{2}$$ or
$$4t^3+2t^2-2t-1=0$$ or
$$2t^2(2t+1)-(2t+1)=0$$ or
$$(2t^2-1)(2t+1)=0,$$ which gives
$$\cos4x=0$$ or $$\cos2x=-\frac{1}{2}$$ and we can write the answer.
