# Technique to find the number of solutions...

The question is : find the number of solutions of $|\sin(x)| = |\cos3x|$ in $[-2\pi , 2\pi]$ . I ve seen the graph in Wolfram alpha graph plotter and found 24 solutions . But I want to know whether there are other easier ways to solve such problem apart from drawing a graph which is time consuming in exam . Plz help.

There are several ways.

In general $\cos\alpha=\cos\beta\iff\alpha=\pm\beta+2k\pi$ for $k\in\mathbb{Z}$.

Here we have $\sin x=\cos3x\vee\sin x=-\cos3x$ and we can write $\sin x=\cos\left(\frac{1}{2}\pi-x\right)$ and $-\cos3x=\cos\left(3x+\pi\right)$. Then:

$\cos\left(\frac{1}{2}\pi-x\right)=\cos3x$ implies that $\frac{1}{2}\pi-x=\pm3x+2k\pi$

$\cos\left(\frac{1}{2}\pi-x\right)=\cos\left(3x+\pi\right)$ implies that $\frac{1}{2}\pi-x=\pm\left(3x+\pi\right)+2k\pi$

These equations can be worked and selected on the criterium that $x\in\left[-2\pi,2\pi\right]$.

You are looking for the roots of $$(\sin(x)-\cos(3x))(\sin x+\cos 3x)=0\tag{1}$$ but the LHS, by writing $\cos(3x)$ as $\sin(\pi/2-3x)$, equals: $$-4\sin\left(\frac{\pi}{4}-x\right)\sin\left(\frac{\pi}{4}-2x\right)\sin\left(\frac{\pi}{4}+x\right)\sin\left(\frac{\pi}{4}+2x\right)=-\cos(2x)\cos(4x).\tag{2}$$ Can you recognize the roots by $(2)$?

Since $$|\sin x|=|\cos 3x|\iff \sin x=\pm \cos 3x,$$ we have two cases:

(1) \begin{align}\sin x=\cos 3x\iff \sin x=4\cos^3 x-3\cos x\end{align} Here, if $\cos x=0$, then we have $\sin x=0$. But there is no $x$ such that $\cos x=\sin x=0$. So, dividing both sides by $\cos x\ (\not =0)$ gives us \begin{align}\tan x=4\cos^2 x-3&\iff \tan x=4\cdot\frac{1}{1+\tan^2 x}-3\\&\iff \tan^3 x+3\tan^2 x+\tan x-1=0\\&\iff (\tan x+1)(\tan^2 x+\tan x-1)=0\\&\iff \tan x=-1, -1\pm\sqrt{2}\end{align}

From these you'll be able to get $x$ in $[-2\pi,2\pi]$.

You can use the same method for (2), which is the case for $\sin x=-\cos 3x.$