# How do I solve for $x$ in the equation : $\lvert \sin x \rvert = \lvert \cos 3x \rvert$?

The exact question asked for the number of solutions to the equation in the interval $[-2\pi , 2\pi]$.

My understanding & approach :

$\lvert \sin x \rvert = \lvert \cos 3x \rvert$

$\Rightarrow \sin x = \cos 3x$ or $\sin x = -\cos 3x$

$\Rightarrow 4x = ( 2m \pm 1 ) \dfrac{\pi}{2}$ or $\Rightarrow 2x = (2n \pm 1 ) \dfrac{\pi}{2}$

But by this approach , I get only $8$ solutions after applying general rule. The answer says : There are $24$ solutions.

• What about $\sin x$ being negative? – patrickh Nov 24 '15 at 10:31
• Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Nov 24 '15 at 10:56
• @N.F.Taussig Thank you for sharing the tutorial . – Ricky Nov 24 '15 at 11:49

Count the solutions carefully.

You have: $$4x = (2m \pm 1) \frac\pi2 \qquad \text{or} \qquad 2x = (2n \pm 1) \frac\pi2.$$

You do not need the $\pm$ signs; $+$ would be sufficient, because $2m - 1 = 2(m - 1) + 1$. Moreover, we can divide by $4$ (or by $2$) to get just $x$ on the left, so

$$x = (2m + 1) \frac\pi8 = \frac\pi8 + m\frac\pi4 \qquad \text{or} \qquad x = (2n + 1) \frac\pi4 = \frac\pi4 + n\frac\pi2.$$

That is, any odd multiple of $\frac\pi8$ is a solution, and so is any odd multiple of $\frac\pi4.$

You are supposed to find solutions in the interval $[-2\pi, 2\pi].$ The odd multiples of $\frac\pi8$ in that interval are $-15\frac\pi8, -13\frac\pi8, \ldots, 15\frac\pi8.$ That is, you have solutions of the form $\frac\pi8 + m\frac\pi4$ for $m = -8, -7, \ldots, 7.$ There are $16$ of these. You also have solutions of the form $\frac\pi4 + m\frac\pi2$ for $m = -4, -3, \ldots, 3.$ There are $8$ of these, and none of them matches any of the first $16$ solutions.

$$|a|=|b| \to \pm a=\pm b \to a^2=b^2$$hence $$|\sin x|=|\cos 3x|\\ \sin^2x=\cos^23x$$wen know $$\sin^2a=\frac{1-\cos2a}{2},\cos^2a=\frac{1+\cos2a}{2}$$ so $$\frac{1-\cos2x}{2}=\frac{1+\cos6x}{2}\\-\cos(2x)=\cos(6x)\\ \cos(2x+\pi)=\cos (6x)\\6x=\pm(2x+\pi)+2k\pi\\3x=\pm(x+\frac{\pi}{2})+k\pi$$ $$3x=(x+\frac{\pi}{2})+k\pi \to 2x=\frac{\pi}{2}+k\pi \\x=\frac{\pi}{4}+k\frac{\pi}{2} \to -2\pi \leq \-frac{\pi}{4}+k\frac{\pi}{2} \leq 2\pi \\-8 \leq 1+2k \leq 8 \to k=-4,-3,-2,-1,0,1,2,3$$there is 8 solution $$3x=-x-\frac{\pi}{2}+k\pi\\x=\frac{-\pi}{8}+\frac{k\pi}{4} \\ -2\pi \leq \frac{-\pi}{8}+\frac{k\pi}{4} \leq 2\pi\\-7.5 \leq k \leq 8.5 \to k=-7,-6,...,0,1,...,7,8$$there is 16 solution

8+16 =24 solution overall

• Sir , how do I conclude from this that ' 24 solutions ' will lie in the interval [ -2pi , 2pi ] without checking for each value of k . – Ricky Nov 24 '15 at 10:45
• I suggest to draw $f(x)=|sinx|-|cos(3x)|$ in the interval [-2pi,2pi] and see how many time $f(x)=0$ – Khosrotash Nov 24 '15 at 10:52
• You meant $\cos(2x + \pi) = \cos(6x)$. The first inequality should be $-8 \leq 1 + 2k \leq \color{red}{7}$ (which is what you actually did). The second inequality should be $-\color{red}{7.5} \leq k \leq \color{red}{8.5}$. Also, if you type \sin x, \cos x in math mode, you will obtain, respectively, $\sin x$ and $\cos x$. – N. F. Taussig Nov 24 '15 at 11:04
• What is wrong with solving for ( a = +|- b ) i.e without squaring both sides . Why dont simply solve as : Case 1 : sinx = cos 3x and Case 2 : sinx = -cos 3x , and then we substitute sine on each side with sin x = cos ( pi/2 - x ) ? – Ricky Nov 24 '15 at 11:48
• Nothing is wrong with $sinx=\pm cos x$ – Khosrotash Nov 24 '15 at 13:48