What is wrong with this way of solving trig equations? Let's suppose I have to find the values of $\theta$ and $\alpha$ that satisfy these equations:


*

*$\cos^3 \theta$ = $\cos \theta $

*$3\tan^3 \alpha = \tan \alpha$
on the interval $[0; 2 \pi]$.
If I try to solve, for instance, the first equation like this:
$$\cos^3 \theta = \cos \theta $$
$$\cos^2 \theta * \cos \theta = \cos \theta$$
$$\cos^2 \theta  = \cos \theta  \div \cos \theta $$
$$\cos^2 = 1$$
$$\cos \theta = \pm \sqrt {1}$$
$$\cos \theta = \pm 1$$
I end up getting only:
$\theta = 0 ; \pi ; 2 \pi$
But I know that $\pi /2$ and $3\pi /2$ would also make the equation true since $\cos^3 (\pi /2) = cos (\pi /2) = 0$ and $\cos^3 ( 3 \pi /2) = cos (3 \pi /2) = 0$.
The same problem arises when I try to solve the second equation:
$$3\tan^3 \alpha = \tan \alpha$$
$$3\tan^2 \alpha * \tan \alpha = \tan \alpha$$
$$3\tan^2 \alpha = \tan \alpha \div \tan \alpha$$
$$3\tan^2 \alpha =1$$
$$\tan^2 \alpha =1/3$$
$$\tan \alpha =\pm \sqrt{1/3}$$
$$\tan \alpha =\pm 1/\sqrt{3}$$
The values of $\alpha$ that make the tangent equal to $\pm 1/\sqrt{3}$ between 0 and $2 \pi$ are only these:
$ \alpha = \pi / 6 ; 5 \pi /6 ; 7 \pi / 6 ; 11 \pi /6$
However,  I should also find $0$ and $\pi$ because $3\tan^3 (0) = \tan (0) = 3 tan^3 (\pi) = tan ( \pi ) = 0 $.
Something similar happens when I'm looking for the local minima and maxima of this function: 
$$ f(x) = \sin^2(x) + \cos(x)$$
on the interval $[0; 2 \pi]$
$f'(x) = 2 \sin(x) \cos(x) - \sin(x)$
$ 0 = 2 \sin(x) \cos(x) - \sin(x)$
$ \sin(x) = 2 \sin(x) \cos(x)$
$ \sin(x) / \sin(x) = 2 \cos(x)$
$1 = 2 \cos(x)$
$1/2 =  \cos(x)$
$x = \pi / 3 ; 5 \pi /3$
And again, plugging $x = 0$ or $x= \pi$ or $x = 2 \pi$ also make the derivative 0.
I've noticed that in all of these 3 cases I have the same trigonometric function on both sides of the equation and I'm dividing both sides by that function. This is making one side of the equation equal to 1 at some point. What is wrong or incomplete with this method? Why am I missing some results when I do this?

The equation $x^3=x$ has three solutions: you can write it as
$$
x^3-x=0
$$
so
$$
x(x-1)(x+1)=0
$$
and the roots are $0$, $1$ and $-1$.
You cannot “divide by $x$”, which is the mistake you make when you “divide by $\cos\theta$”.
Thus your equation becomes
$$
\cos\theta=0
\quad\text{or}\quad
\cos\theta=1
\quad\text{or}\quad
\cos\theta=-1
$$
The second equation is similar:
$$
\tan\alpha=0
\quad\text{or}\quad
\tan\alpha=\frac{1}{\sqrt{3}}
\quad\text{or}\quad
\tan\alpha=-\frac{1}{\sqrt{3}}
$$
