TITLE: Missing and parasite roots in the trigonometric equation.
QUESTION [6 upvotes]: I have this equation:
$$\boxed{\cos(2x) - \cos(8x) + \cos(6x) = 1}$$

RIGHT
And its right solution from the textbook is:
$$
\begin{align}
\cos(2x)+\cos(6x)&=1+\cos(8x)\\\\
2\cos(4x)*\cos(2x)&=2\cos^2(4x)\\\\
\cos(4x)*(\cos(2x)-\cos(4x))&=0\\\\
\cos(4x)*2\sin(3x)*\sin(x)=&0
\end{align}
$$

$\cos(4x) = 0 \implies 4x = \frac{\pi}{2} + \pi k \implies \boxed{x=\frac{\pi}{8} + \frac{\pi k}{4}}$
$\sin(3x) = 0 \implies 3x = \pi k \implies \boxed{x=\frac{\pi k}{3}}$
$\sin(x) = 0 \implies \boxed{x=\pi k}$


WRONG
And this is the way how I have been tried to solve it (with different approach) and here I need a help to determine where I'm wrong:
$$
\begin{align}
\cos(2x) - \cos(8x) + \cos(6x) &= 1\\
\cos(2x) + \cos(6x) &= 1 + \cos(8x)
\end{align}
$$
Then using this formula:
$$\bbox[Beige]{\boxed{\cos\alpha + \cos\beta = 2\cos(\frac{\alpha + \beta}{2}) \cos(\frac{\alpha - \beta}{2})}} \tag{1}$$
$$2\cos(4x)\cos(2x) = 1 + \cos(8x)$$
And then similarly:
$$\bbox[Beige]{\boxed{\cos2\alpha=2\cos^2\alpha-1}} \tag{2}$$
$$2\cos(4x)\cos(2x) = 1 + 2\cos^2(4x) - 1$$
After that I subtracted $1$ from $1$ in the right part and divided both right and left parts by $2$:
$$\cos(4x)\cos(2x) = \cos^2(4x)$$
Then once again I divided both parts. This time by $\cos(4x)$ and with the aim not to lose a root I checked whether $\cos(4x)$ can be equal to zero.
$$\cos(4x) = 0 \implies 4x = \frac{\pi}{2} + \pi k \implies \boxed{x=\frac{\pi}{8} + \frac{\pi k}{4}}$$
so here I found the first root. And using formula (2):
$$\cos(2x) = \cos(4x) \implies \cos(2x) = 2\cos^2(2x) - 1$$
then I simply introduced new variable and solved quadratic equation:
$$u = \cos(2x)$$
$$
2u^2 - u -1 = 0\\
u_1=1, \, u_2=-\frac{1}{2}
$$
So finally:

$\cos(2x) = 1 \implies 2x = \pi k \implies \boxed{x=\frac{\pi k}{2}}$ (wrong)
$\cos(2x) = -\frac{1}{2} \implies 2x = \pm \frac{2 \pi}{3} + 2\pi k \implies \boxed{x=\frac{\pi}{3} + \pi k}$ (wrong)

But none of the two last roots fits to the original equation. And I lost another 2 roots. Where is my mistake? Any suggestions will be greatly appreciated. Thanks for attention.

REPLY [4 votes]: Just minor slippage. For example, from $\cos 2x=1$ you concluded that $2x=\pi k$. That is false, we need $k$ to be even: if for example $2x=\pi$, then $\cos 2x=-1$.  
I don't understand your concern with $\frac{\pi}{3}$. It works.

REPLY [3 votes]: If $\cos 2x=1\implies 2x=2n_1\pi,x=n_1\pi$
If $\cos2x=-\frac12=\cos \frac{2\pi}3\implies 2x=2n_2\pi\pm \frac{2\pi}3= \frac{2\pi}3(3n_2\pm1)\implies x=\frac\pi3(3n\pm1)$
If we compare these $x=n_1\pi,\frac\pi3(3n_2\pm1)$ with $x=k_1\pi,k_2\frac\pi3,$ 
the apparent mismatch is when  $3\mid k_2$
But, in that case the result $k_2\frac\pi3 \in x=n_1\pi$  where $n_1,n_2,k_1,k_2$ are integers.