Let $D$ and $E$ be the unions of open intervals defined as follows.
$D=\bigcup_{k \in \mathbb{Z}}\left(\frac{(4 k-1) \pi}{2}, \frac{(4 k+1) \pi}{2}\right)$ and $E=\bigcup_{k \in \mathbb{Z}}\left(\frac{(4 k-3) \pi}{2}, \frac{(4 k-1) \pi}{2}\right)$
Show that
$\sin x=\left\{\begin{array}{rl}\frac{\tan x}{\sqrt{1+\tan ^{2} x}} & \text { if } x \in D, \\ -\frac{\tan x}{\sqrt{1+\tan ^{2} x}} & \text { if } x \in E,\end{array} \quad \cos x=\left\{\begin{array}{c}\frac{1}{\sqrt{1+\tan ^{2} x}} \text { if } x \in D, \\ -\frac{1}{\sqrt{1+\tan ^{2} x}} \text { if } x \in E .\end{array}\right.\right.$