$\displaystyle \cos(5x)=\sin(4x)$

Interesting...

well, you had the right idea at first:

let $\displaystyle \cos(5x)=\sin\left(\tfrac{\pi}{2}-5x\right)$

Thus, $\displaystyle \sin\left(\tfrac{\pi}{2}-5x\right)=\sin(4x)$

For this equation to be true, $\displaystyle \tfrac{\pi}{2}-5x=4x$

Note that there is no given restriction on x. So we can generalize this and say that this equation is true when $\displaystyle \tfrac{(4n+1)}{2}\pi=9x\implies\color{red}\boxed{x =\tfrac{(4n+1)}{18}\pi; \ n\in\mathbb{Z}}$

the notation $\displaystyle n\in\mathbb{Z}$ means that n is an element of the integer set (this lets us know that n can be ...-3, -2, -1, 0, 1, 2, 3,...).

I hope this makes sense!

--Chris