We have `n|sin x|=m |cos x|`
Draw the graphs of `y=n|sin x|` and `y=m|cos x|`.
Range of `n|sin x|` and `m|cos x|` are `[0, n]` and `[0, m]` respectively.
Also, period of each of `n|sin x| and m|cos x|` is `pi`.
Graphs of functions are as shown in the following figure.
From the figure graphs intersect at four points.
Hence, there are four roots of the equation.
For point `A, n sin x=m cos x`
`:. tan x=m/n`
`:. x=tan^(-1) m/n`
For point `B, x=pi - tan^(-1) m/n`
For point `C, x=pi + tan^(-1) m/n`
For point `D, x=2pi - tan^(-1) m/n`