# The general solution of |\sin x|=\cos x is - (A)

The general solution of $$\displaystyle{\left|{\sin{{x}}}\right|}={\cos{{x}}}$$ is -
(A) $$\displaystyle{2}{n}\pi+{\frac{{\pi}}{{{4}}}},{n}\in{I}$$
(B) $$\displaystyle{2}{n}\pi\pm{\frac{{\pi}}{{{4}}}},{n}\in{I}$$
(C) $$\displaystyle{n}\pi+{\frac{{\pi}}{{{4}}}},{n}\in{I}$$
(D) None of these
So what I did was - I made a case for when $$\displaystyle{\sin{{x}}}$$ is greater than 0 and equated it to $$\displaystyle{\cos{{x}}}$$ to get $$\displaystyle{\tan{{x}}}={1}$$ which implies $$\displaystyle{x}={\frac{{\pi}}{{{4}}}}$$. The other case was when $$\displaystyle{\cos{{x}}}=−{\sin{{x}}}$$. Here, $$\displaystyle{x}={\frac{{{3}\pi}}{{{4}}}}$$. I don't understand how to proceed from here.

## Want to know more about Trigonometry?

• Questions are typically answered in as fast as 30 minutes

### Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Melissa Moore
$$\displaystyle{\cos{{x}}}={\left|{\sin{{x}}}\right|}\geq{0}$$
If $$\displaystyle{\sin{{x}}}{ < }{0},{\cos{{x}}}=−{\sin{{x}}}\Leftrightarrow{\tan{{x}}}=-{1}$$
As x will lie in the 4th quadrant, $$\displaystyle{x}={2}{n}\pi−{\frac{{\pi}}{{{4}}}}$$
###### Not exactly what you’re looking for?
Jeffery Autrey
Using Weierstrass substitution with $$\displaystyle{t}={\tan{{\frac{{{x}}}{{{2}}}}}}$$
$$\displaystyle{1}-{t}^{{2}}={2}{\left|{t}\right|}$$
For real t, $$\displaystyle{t}^{{2}}={\left|{t}\right|}^{{2}}$$
$$\displaystyle\Rightarrow{\left|{t}\right|}^{{2}}-{2}{\left|{t}\right|}−{1}={0}$$
$$\displaystyle\Rightarrow{\left|{t}\right|}={1}\pm\sqrt{{2}}$$
As $$\displaystyle{\left|{t}\right|}\geq{0},{\left|{t}\right|}=\sqrt{{2}}+{1}={\csc{{\frac{{\pi}}{{{4}}}}}}+{\cot{{\frac{{\pi}}{{{4}}}}}}=\ldots={\cot{{\frac{{\pi}}{{{8}}}}}}={\tan{{\left({\frac{{\pi}}{{{2}}}}-{\frac{{\pi}}{{{8}}}}\right)}}}$$
$$\displaystyle\Leftrightarrow{{\tan}^{{2}}{\frac{{{x}}}{{{2}}}}}={{\tan}^{{2}}{\left({\frac{{\pi}}{{{2}}}}−{\frac{{\pi}}{{{8}}}}\right)}}$$
$$\displaystyle\Rightarrow{x}^{{2}}={n}\pi\pm{\left({\frac{{\pi}}{{{2}}}}−{\frac{{\pi}}{{{8}}}}\right)}$$
Vasquez

We will solve $$\sin^2(x)=\cos^2(x)$$, which is obtained upon squaring the equation (so we do not have to deal with sign issues).
$$\begin{array}{}\sin^2(x)=\cos^2(x) \\\cos^2(x)−\sin^2(x)=0 \\\cos(2x)=0 \\x=\frac{\pi}{4}+\pi n, \frac{3\pi}{4}+\pi n \\x=\frac{\pi}{4}+2\pi n,\frac{5\pi}{4}+2\pi n,\frac{3\pi}{4}+2\pi n,\frac{7\pi}{4}+2\pi n \end{array}$$
Here, we split into cases of $$2\pi n$$ periodicity to take advantage of the properties of $$\sin$$and $$\cos$$
Checking these solutions in the original equation $$|\sin(x)|=\cos(x)$$, we find that only $$\frac{\pi}{4}+2\pi n$$ and $$\frac{7\pi}{4}+2\pi n$$ work. $$\frac{7\pi}{4}+2\pi n$$ is equivalent to $$-\frac{\pi}{4}+2\pi n$$, so the answer is (B) $$\pm \frac{\pi}{4}+2\pi n$$
You can do a sanity check by drawing a quick graph and seeing if the functions intersect in the general region of the conjectured solution.