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.

Let $u = \sin x$; let $v = \cos x$.  Then the equation
$$3\sin^2x - 2\sin x\cos x - \cos^2x = 0$$
becomes
$$3u^2 - 2uv - v^2 = 0$$
To split the linear term, we must find two numbers with product $3 \cdot -1 = -3$ and sum $-2$.  They are $-3$ and $1$.  Hence,
\begin{align*}
3u^2 - 2uv - v^2 & = 0\\
3u^2 - 3uv + uv - v^2 & = 0 && \text{split the linear term}\\
3u(u - v) + v(u - v) & = 0 && \text{factor by grouping}\\
(3u + v)(u - v) & = 0 && \text{extract the common factor}
\end{align*}
Now, substitute $\sin x$ for $u$ and $\cos x$ for $v$.
