Question:
If $\sin(\pi\cos\theta)=\cos(\pi\sin\theta)$, then show that $\theta=\pm\frac{1}{2}\sin^{-1}\frac{3}{4}$.
My book's solution:
$$\sin(\pi\cos\theta)=\cos(\pi\sin\theta)$$
$$\sin(\pi\cos\theta)=\sin(\frac{\pi}{2}\pm\pi\sin\theta)\ [\text{Formula:}\cos\theta=\sin(\frac{\pi}{2}\pm\theta)]$$
$$\sin^{-1}(\sin(\pi\cos\theta))=\sin^{-1}(\sin(\frac{\pi}{2}\pm\pi\sin\theta))...(i)$$
$$\pi\cos\theta=\frac{\pi}{2}\pm\pi\sin\theta...(ii)$$
$$\cos\theta=\frac{1}{2}\pm\sin\theta$$
$$\cos\theta\pm\sin\theta=\frac{1}{2}$$
$$\cos^{2}\theta\pm2\sin\theta\cos\theta+\sin^{2}\theta=\frac{1}{4}$$
$$1\pm\sin2\theta=\frac{1}{4}$$
$$\sin2\theta=\pm\frac{3}{4}$$
$$\sin^{-1}(\sin2\theta)=\sin^{-1}(\pm\frac{3}{4})$$
$$2\theta=\pm\sin^{-1}(\frac{3}{4})$$
$$\theta=\pm\frac{1}{2}\sin^{-1}(\frac{3}{4})\ \text{(showed)}$$
This solution is good and all, but if we input the value of $\theta$ in line (i) we will see something interesting:-
$$\sin^{-1}(\sin(\pi\cos\theta))=\sin^{-1}(\sin(\frac{\pi}{2}\pm\pi\sin\theta))$$
$$[\text{Let's input $\theta=\frac{1}{2}\sin^{-1}(\frac{3}{4})$}]$$
$$\sin^{-1}(\sin(164.058809^{\circ}))=\sin^{-1}(\sin(164.058809^{\circ})$$
$$164.058809^{\circ}=164.058809^{\circ}$$
This is what my book did essentially. However, isn't $164.058809^{\circ}$ outside the restricted range of $\sin^{-1}(x)$: $[\frac{\pi}{2},-\frac{\pi}{2}]$? So, is the line (ii) in the solution of the book valid?