the number of solution of |sinx| = |cos3x| in the interval (-2π,3π)

the problem is equivalent to

(sin x)^2 = (cos 3x)^2
sin^2x = (1/2)(-sin^6x + cos^6x - 15sin^2x cos^4x + 15sin^4x cos^2x + 1)
2-2cos^2x = cos^6x-3cos^4x+3cos^2x+1 + cos^6x + 15cos^4x - 15cos^6x + 15cos^6x - 30cos^4x + 15cos^2x + 1

2cos^6x - 18cos^4x + 20cos^2x = 0
2cos^2x (cos^4x - 9cos^2x + 10) = 0

Let u = cos^2x and that's just

2u(u^2-9u+10) = 0

Solve that for values of cos(x) and adjust for the domain.