Real solution of Trigonometric and inverse Trigonometric equation 
The number of real solution of


the  $\displaystyle \sin^{-1}(|\cos(x)|)=\cos^{-1}(|\sin(x)|)$


in $[0,4\pi]$ is

What I have done as
using $\displaystyle \sin^{-1}(x)+\cos^{-1}(x)=\frac{\pi}{2}$
Then $\displaystyle \sin^{-1}(|\cos(x)|)=\frac{\pi}{2}-\sin^{-1}(|\sin(x)|)$
$\displaystyle \sin^{-1}(|\sin(x)|)+\sin^{-1}(|\cos(x)|)=\frac{\pi}{2}$
Now I did not know how do i go ahead
Please look on that problem
 A: Take the $\sin$ of both sides:
$$|\cos x|=\sin(\cos^{-1}(|\sin x|))$$
Drawing a triangle for $\theta=\cos^{-1}(|\sin x|)$, you will get that adjacent is $|\sin x|$ and hypotenuse is $1$, so opposite is $\sqrt{1-(|\sin x|)^2}=\sqrt{1-\sin^2x}$. So the RHS becomes: $$\sin(\cos^{-1}(|\sin x|))=\sin\theta=\sqrt{1-\sin^2x}/1=\sqrt{1-\sin^2x}$$ But due to the famous trigonometric identity $$\sin^2x+\cos^2x=1$$
You will find that $\sqrt{1-\sin^2x}=|\cos x|$. This is the exact same thing as the LHS!!!
This indicates that there are infinitely many real solutions in the interval $[0,4\pi]$. In fact, for any $x$ you plug in, both sides of the equation will always be equal to each other!
You can even verify this by graphing $y=\sin^{-1}(|\cos x|)$ and $y=\cos^{-1}(|\sin x|)$ on the same graph in your favorite graphing calculator, and see that they intersect exactly on top of each other!
A: Following your way only:
$$\dfrac\pi2=\cos^{-1}|\sin x|+\cos^{-1}|\cos x|$$
As $0\le|\sin x|,|\cos x|\le1,$
$$S=\cos^{-1}|\sin x|+\cos^{-1}|\cos x|=\cos^{-1}(|\sin x\cos x|-\sqrt{(1-\cos^2x)(1-\sin^2x)})$$
As for real $a,\sqrt{a^2}=|a|,$
$$S=\cos^{-1}(|\sin x\cos x|-|\sin x\cos x|)=?$$
