Trigometry Equation Solving How would one solve an equation of the form $\sin(ax) = \cos(bx)$ on the interval $[0, 2\pi]$?
I understand that there are multiple solutions, however I only know how to arrive at the first one by using cofunction identities.

Suppose $a> b > 0$, $\sin (ax) = \cos \left(\dfrac{\pi}{2} - ax\right)=\cos (bx)\to\dfrac{\pi}{2}-ax = \pm bx + 2n\pi$. If $\dfrac{\pi}{2}-ax = bx +2n\pi \to (a+b)x = \dfrac{\pi}{2}-2n\pi \to x = \dfrac{(1-4n)\pi}{2(a+b)}$. Here you have $n \leq 0$ in order for $1-4n \geq 0$ and therefore $x \geq 0$. So you take $n = 0,-1,-2$, etc until the $x$ is between $0$ and $2\pi$. If $\dfrac{\pi}{2}-ax = -bx + 2n\pi \to (a-b)x = \dfrac{\pi}{2}-2n\pi \to x = \dfrac{(1-4n)\pi}{2(a-b)}$. Here $n \leq 0$, and you can choose $n = 0,-1,-2$,etc until $x$ is between $0$ and $2\pi$.
