Solve $$\cos x+i\sin x=\sin x+i\cos x$$ where $x\in\Bbb{R}$ and graph the complex region.
I know that $$e^{ix}=\cos x+i\sin x$$ and returning to the original equation: $$e^{ix}=\sin x+i\cos x,$$ but I am not able to find why $$\sin x+i\cos x=ie^{-ix}$$ (according to WolframAlpha).
We know that $\cos x=\cos(-x)$ and $\sin x=-\sin(-x)$, hence if $e^{ix}=\cos x+i\sin x$ then $e^{ix}=\cos(-x)-i\sin(-x)$ then $ie^{ix}=\sin(-x)+i\cos(-x)$, but then?
The answer should be $$x=\frac{\pi}{4}+k\pi,\;k\in\Bbb{Z}$$ but I am not able to reach it. Any help?
If
$\cos x + i\sin x = \sin x + i \cos x, \tag 1$
then equating real and imaginary parts we find
$\cos x = \sin x; \tag 2$
since $\cos x$ and $\sin x$ cannot be simultaneously zero, we infer
$\cos x \ne 0 \ne \sin x; \tag 2$
we may thus write
$\tan x = \dfrac{\sin x}{\cos x} = 1; \tag 3$
the values of $x$ for which this binds are
$x = \dfrac{\pi}{4} + k\pi, \; k \in \Bbb Z; \tag 4$
these are then the solutions to (1).
I leave graphing these results to my readership.
Further, with
$e^{ix} = \cos x + i\sin x, \tag 5$
we have
$e^{-ix} = e^{i(-x)} = \cos (-x) + i\sin (-)x = \cos x - i\sin x; \tag 6$
thus,
$i e^{-ix} = i\cos x - i^2\sin x = i\cos x + \sin x. \tag 7$