If $\frac{\sin2x}{\cos x}-1=0$, find $x$ given $\ \frac{\pi}{2}\le x\le\pi$ (cancelling out vs multiplying out the $\cos x$) To solve the equation
$$\frac{\sin2x}{\cos x}-1=0 \tag1$$
I manipulated it into the following:
$$\frac{2\sin x\cos x}{\cos x}-1=0 \tag2$$
Then, by multiplying $\cos x$ out, I obtained:
$$2\sin x\cos x-\cos x=0 \tag3$$
However, according to the answers I was supposed to cancel out the $\cos x$ which results in
$$2\sin x-1=0 \tag4$$ Thus, I myself attained the answers $\frac{5\pi}{6},\ \frac{\pi}{2}$, whilst the answer booklet merely had $\frac{5\pi}{6}$ .
I do not understand the logic behind cancelling out the $\cos x$ - I thought we were supposed to maximise the number of answers obtained by multiplying out rather than cancelling.
Any help clearing up my confusion would be much appreciated.
 A: The confusion is due to the violation of equivalence conditions between mathematical steps.


Problem statement:
$$\frac{\sin2x}{\cos x}-1=0$$
where,  $\frac {\pi}{2}\leqslant x\leqslant\pi$.

$\rm Step-1.$
$$\frac{2\sin x\cos x}{\cos x}-1=0$$
There is no issue here. Because: $\sin 2x=2\sin x\cos x$.
$\rm Step-2.$
$$2\sin x\cos x-\cos x=0$$
We want to analyze this step.  When we multiply both side of the equation by $\cos x$, we should do this under the restriction $\cos x≠0$.  So why?

*

*No matter what mathematical operation we apply, before we start solving the equation $\frac{\sin2x}{\cos x}-1=0$, it is necessary to state that $\cos x≠0$.  Because, we can never make the denominator $0$.


*Applying the multiplication we have:
$$\cos x \left(\frac{2\sin x\cos x}{\cos x}-1\right)=0\cdot \cos x$$
This is essentially equivalent to:
$$\cos x \cdot \frac{2\sin x\cos x}{\cos x}-\cos x=0$$
Then, we can easily reduce the last equation to the following equivalent equation:
$$\begin{align}\frac {\cos x}{\cos x} \cdot \left(2\sin x\cos x\right)-\cos x=0\end{align}$$
Think about: if $\cos x=0$, can we write $\frac {\cos x}{\cos x}=\frac 00=1$ ?
Since $\cos x$ can not equal to $0$, then the multiplication under the restriction $\cos x≠0$, (even if $\cos x$ is not in the denominator) doesn't produce roots that are called extraneous roots in mathematics.

Therefore, the original equation $\frac{\sin2x}{\cos x}-1=0$ is equivalent to the derived equation $2\sin x\cos x-\cos x=0$, if and only if, when $\cos x≠0$.


The possible correct solution can be reached with the following $2$ ways:
$\require {cancel}$
$$\begin{align}&\frac{\sin2x}{\cos x}-1=0\\
\iff &\frac {2\sin x\cdot\cancel{ {\color{#c00}{\cos x}}}}{\cancel{\color{#c00}{{\cos x}}}}-1=0\\
\iff &2\sin x-1=0,\thinspace \cos x≠0\\
\iff &\sin x=\frac 12,\thinspace\cos x≠0\end{align}$$
or
$$\begin{align}&\frac{\sin2x}{\cos x}-1=0\\
\iff &\frac {2\sin x\cos x}{\cos x}-1=0\\
\iff &\frac {2\sin x\cos x-\cos x}{\cos x}=0.\end{align}$$
Then we know that,  $$\frac {A(x)}{B(x)}=0\iff A(x)=0\wedge B(x)≠0.$$
Therefore, we have:
$$2\sin x\cos x-\cos x=0,\thinspace\cos x≠0$$
This leads to:
$$\begin{align}&\cos x\left( 2\sin x-1\right)=0,\thinspace\cos x≠0\\
\iff &2\sin x-1=0,\thinspace\cos x≠0\\
\iff &\sin x=\frac 12,\thinspace \cos x≠0.\end{align}$$
Finally, under the restriction $\frac {\pi}{2}\leqslant x\leqslant\pi$, we obtain:
$$\sin x=\frac 12\wedge x≠\frac {\pi}{2}$$
Thus, indeed the answer is $x=\frac {5\pi}{6}$.
A: Given that $$\frac{\sin2x}{\cos x}-1=0$$
It is implicit or already implied that $\cos x \ne 0$.
In general, given a fraction, it is implicit that $\text{Denominator} \ne0$ as otherwise the term would become not defined/undefined/indeterminate (as it now contains $1/0$).
So, in the end, you are required to reject all those values of $x$ for which $\cos x=0$. 
In your case, $\pi/2$ must be rejected. Only $5\pi/6$ is valid.
