<s>[INST] Why are these two given expressions equivalent? $6\cos^2(\frac {x}{2})-7\cos(\frac {x}{2})+2=0$ is equivalent to the expression $(3\cos(\frac {x}{2})-2)(2\cos(\frac {x}{2})-1) = 0$
Could someone explain the steps involved in evaluating the first expression to equal the second expression?
I noticed the expression in this question here, and I was curious how this could be achieved.
 [/INST] The answer comes from factoring.
When you foil the two parentheticals from the second expression, their products can be seen to equal the first.
We treat $\cos(\frac {x}{2})$ much like we would the variable $x$ within any given expression.
If given the expression $2x^2-3x+1 = 0$, we are able to factor this to show that $(-2x+1)(-x+1) = 0$.
Given this particular expression: $6\cos^2(\frac {x}{2})-7\cos(\frac {x}{2})+2=0$, we are able factor this to show that $(3\cos(\frac {x}{2})-2)(2cos(\frac {x}{2})-1) = 0$.

When foiled, it is shown that:
First: $3\cos(\frac {x}{2}) \cdot (2\cos(\frac {x}{2}) = 6\cos^2(\frac {x}{2})$
Second: The product of $3\cos(\frac {x}{2}) \cdot -1 = -3\cos(\frac {x}{2})$ and the product of $2cos(\frac {x}{2}) \cdot -2 = -4cos(\frac {x}{2})$, and their sum equals $-7\cos(\frac {x}{2})$
Third: $-2 \cdot -1 = 2$
Final, we add the first, second, and third steps together, and their sums are show to be equivalent to the initial expression: $6\cos^2(\frac {x}{2})$ [first] $-7\cos(\frac {x}{2})$[second]$+2$[third]$=0$.

And the result is [Final].
</s>