Different solutions of trigonometric equations Please take a look at this trigonometric equation,
$\cos9x\cos7x = \cos5x\cos3x$  
To solve this equation, we can proceed as,
$2\cos9x\cos7x = 2\cos5x\cos3x$
or, $\cos(9x+7x)+\cos(9x-7x) = \cos(5x+3x)+\cos(5x-3x)$
or, $\cos16x+\cos2x = \cos8x+\cos2x$
or, $\cos16x = \cos8x$  
From the above situation we can proceed in two ways,
First Way
$\cos16x = \cos8x$
or, $\cos(2\times8x) = \cos8x$
or, $2\cos^28x -1 = \cos8x$
or, $2\cos^28x-\cos8x -1 = 0$
or, $2\cos^28x-2\cos8x+\cos8x -1 = 0$
or, $2\cos8x(\cos8x-1)+(\cos8x -1) = 0$
or, $2\cos8x(\cos8x-1)+(\cos8x -1) = 0$
or, $(\cos8x -1)(2\cos8x+1) = 0$    
Either or both of the above factors are zero.  
Taking the first one,
$(\cos8x -1) = 0$
or, $\cos8x = 1$
or, $8x = 2n\pi$, where $n$ is an integer, +ve or -ve.
or, $x = {n\pi \over4}$
Taking the second one,
$(2\cos8x+1) = 0$
or, $2\cos8x = -1$
or, $\cos8x = -\frac1 2$
or, $8x = 2n\pi \pm \frac {2\pi} 3$, where $n$ is an integer, +ve or -ve.
or, $x = \frac{n\pi} 4 \pm \frac {\pi} {12}$
Second Way
$\cos16x = \cos8x$
or, $2\sin{8x-16x\over2}\sin{8x+16x\over2} = 0$
or, $2\sin(-4x)\sin{12x} = 0$
or, $-2\sin(4x)\sin{12x} = 0$  
Again, either or both of the above factors are zero.  
Taking the first one,
$\sin4x = 0$
or, $4x=n\pi$
or, $x=\frac{n\pi}4$  
Taking the second one,
$\sin12x = 0$
or, $12x=n\pi$
or, $x=\frac{n\pi}{12}$  
Now, as you must have noticed, we are getting two different sets of solutions, $x = \left\{{n\pi \over4}, \frac{n\pi} 4 \pm \frac {\pi} {12}\right\}$ and $x = \left\{{n\pi \over4}, \frac{n\pi}{12}\right\}$. The member $x=\frac{n\pi}4$ is common to both of the sets. Moreover, all these solutions satisfy the equation under consideration.
Could anybody please tell me why is this happening. In addition to the specific answer, some general insight will be most welcome. We have got a number of similar problems in hand. So, unless we can develop some acumen, life may become difficult.

They aren't actually different sets of numbers. They are both all the numbers of the form $n\pi/12$. 
