To complement gimusi's fine answer, there are other cases when simple methods work:
- $\cos f(x)=\cos g(x)$
- $\sin f(x)=\sin g(x)$
- $\tan f(x)=\tan g(x)$
- $\sin f(x)=\cos g(x)$
- $\cot f(x)=\tan g(x)$
where $f(x)$ and $g(x)$ are expressions involving the unknown $x$.
Equation 1 has the solutions
$$
f(x)=g(x)+2k\pi
\qquad\text{or}\qquad
f(x)=-g(x)+2k\pi
$$
Equation 2 has the solutions
$$
f(x)=g(x)+2k\pi
\qquad\text{or}\qquad
f(x)=\pi-g(x)+2k\pi
$$
Equation 3 has the solutions
$$
f(x)=g(x)+k\pi
$$
(of course one has also to exclude values of $x$ that make $\tan f(x)$ or $\tan g(x)$ undefined).
Two angles have the same cosine if and only if the points on the unit circle they correspond to have the same $x$-coordinate; two angles have the same sine if and only if the points on the unit circle have the same $y$-coordinate. The $2k\pi$ or $k\pi$ term, with $k$ an integer, represents the periodicity.
What about an equation of the form $\sin f(x)=\cos g(x)$? We can recall that $\sin\alpha=\cos(\pi/2-\alpha)$, so we can reduce it to
$$
\cos\left(\frac{\pi}{2}-f(x)\right)=\cos g(x)
$$
which is type 1 above.
Similarly, $\cot f(x)=\tan g(x)$ can become
$$
\tan\left(\frac{\pi}{2}-f(x)\right)=\tan g(x)
$$
that is, type 3 above.