<s>[INST] Factorize Trigonometric Equation: $ 3\sin(x)^2 - 2\sin(x)\cos(x) - \cos(x)^2 = 0 $ I have a problem with the following trigonometric equation:
$$ 3\sin(x)^2 - 2\sin(x)\cos(x) - \cos(x)^2 = 0 $$
It's from the book Engineering Mathematics 7th edition by Stroud.
The book is giving the answer, but I can't seem to be able to find out how to factorize it. I can't figure it out.
Consider the following solution:

This equation can be written as $3\sin ^2x-\cos ^2x = 2\sin x \cos x.$
That is: $3\sin ^2x-2\sin x \cos x-\cos ^2 x = 0.$
That is: $(3\sin x + \cos x)(\sin x - \cos x) = 0.$
So that $3 \sin x \cos x = 0$ or $\sin x - \cos x = 0.$
If $3 \sin x + \cos x = 0,$ then $\tan x = \frac{-1}{3},$ and so $x = -0.3218 ± n \pi,$ and if $\sin x - \cos x = 0,$ then $\tan x = 1,$ and so $x = \frac{\pi}{4}.$

If anyone could help me understand how to factorize this equation to get the one shown in the image it would help me very much.
Thank you in advance.
 [/INST] If you put $\sin x = a$, and $\cos x = b$, then you might be able to see the "structure" of the equation:
$$\begin{align} 3\sin^2x - 2\sin x \cos x - \cos^2x & = 3a^2 - 2ab - b^2 \\ 
&= 3a^2-3ab+ab-b^2\\ & =3a(a-b)+b(a-b)\\ & =(a-b)(3a+b)\\ & = (3a+ b)(a-b) \\ & = (3\sin x + \cos x)(\sin x - \cos x) = 0\end{align}$$
</s>