Explain the concept behind solving $\sin(x)\cos(x) + \cos(x) = 0$, from Paul's Online Math Notes 
$$\sin(x)\cos(x) + \cos(x) = 0$$

You are asked to find all possible solutions.
What I immediately did was bring over the $\cos(x)$ term and then divided across by $\cos(x)$ and then proceeded from there:
$$\sin(x)\cos(x) = -\cos(x)$$
$$\sin(x) = -1$$
Now it states in the solution which I looked at after that this is wrong. I know now after reading the solution that this will result in losing solutions in my final answer but I don't understand why. I don't think I'm breaking any rules by doing what I did above so why does it result in losing solutions. Can anyone tell me what it is I'm not understanding about this equation.
Thank you to anyone who offers help in advance!
 A: If $\cos(x) = 0$, then you cannot divide by $\cos(x)$. Therefore, you must separately consider the case where $\cos(x) = 0$ and see if that is a valid solution. In this case, it is. That would be the solution you would be missing from your final answer.
A: You have that
$$
(\sin x + 1)\cos x = 0.
$$
If $\cos x = 0$, you cannot divide by $\cos x$. Using the fact that if $ab = 0$ then either $a$ or $b$ is $0$, we have that $\sin x = -1$ or $\cos x = 0$. If $\sin x = -1$ then $x = 3\pi/2 + 2k\pi$, and if $\cos x = 0$ then $x = \pi/2+\ell\pi$ for integral values of $k$ and $\ell$.
A: Let me show you a related proof.  Let's start with some number $a$ and set $b=a$.
$$a = b$$
Multiply by $a$
$$a^2=ab$$
Subtract $b^2$
$$a^2-b^2 = ab-b^2$$
Factor both sides
$$(a+b)(a-b)=b(a-b)$$
Divide a common factor
$$a+b = b$$
Substitute $b$ for $a$ (since they are equal)
$$b+b=b$$
Divide by $b$
$$1+1=1$$
To help see what went wrong, plug in a specific value: if we assume the variables were $5$, then my steps become $5=5$,  $25=25$,  $25-25 = 25-25$,  $(5+5)(0) = 5(0)$,  $5+5=5$,  $1+1=1$.
So at one step here I divided by $0$, and that is exactly where my equalities start being wrong.  If you divide by zero, things can go very, very wrong.  In my case, I concluded that $1+1=1$.  So each and every time you divide (or cancel) things while doing algebra, you have to check that it's not zero.
A: The conflict is due to,(as you find)
$$
sin(x)=-1
$$
for all possible values of x, $cos(x)$ lead to $0$ and hence the previous step done by you is wrong. To avoid this conflict you must take all cases as,
$$
(sin(x)+1)cos(x)=0
$$
A: I would use this
$$
(\sin(x)+1)\cdot \cos(x)=0\tag{1}
$$
and then split the big problem into two small problems - since $a \cdot b = 0$ is "special".
$$
...=0\quad \text{or}\quad ...=0\tag{2}
$$
(If one of these parts of the equation is $0$ then the complete equation will be $0$. Fill the blanks yourself.)
After a total of $3$ changes to the equations you will have 
$$
x=...\quad \text{or}\quad x=...\tag{3}
$$
You might need to use books/tables to solve the equations to get two sets of solutions. (Remember that sin and cos repeat every $2\pi$ !)
After that you can merge these two sets into one set (and eliminate impossible solutions if needed).
[I guess you can write the solution as $x' + k\cdot\pi$. But I'm not sure about that. So you should verify that yourself.]
