Can we use algebra and trig identities to show that there exist $x,y \in \mathbb{R}$ such that $\cos(x)+i\sin(x)$ = $\frac{1+i\tan(y)}{1-i\tan(y)}$?

Do there exis $x,y \in \mathbb{R}$ such that $\cos(x)+i\sin(x)$ = $\frac{1+i\tan(y)}{1-i\tan(y)}$?

I think this is true because it can be shown that for any $z \in \mathbb{C}$ such that $|z|=1$ we have that $z = \frac{1+it}{1-it}$ for some $t \in \mathbb{R}$ (Show that for all complex number $z \not= -1$ and $|z|=1$ can be written as a form : $z= \frac{1+it}{1-it}$, $t \in \mathbb{R}$) and also that $z = \cos(x) + i\sin(x)$ for some $x \in [0,2\pi)$. Then, since tangent gives a bijection between $(\frac{-\pi}{2},\frac{\pi}{2})$ and $\mathbb{R}$ there exists $y \in (\frac{-\pi}{2},\frac{\pi}{2})$ such that $\tan(y) = t$.

And so

$$\cos(x)+i\sin(x) = z = \frac{1+it}{1-it} = \frac{1+i\tan(y)}{1-i\tan(y)}.$$

Is there a slick way to prove this with trig identities and a nice relation between $x$ and $y$? Thanks.


edit: I worded my question wrong. I guess I should have asked if there exists a function $f$ such that such that $\cos(x)+i\sin(x)$ = $\frac{1+i\tan(f(x))}{1-i\tan(f(x))}$?

for all $x \in [0, 2\pi)$


$$ e^{ix} =\cos x+i\sin x =\frac{1+i\tan y}{1-i\tan y} =\frac{\cos y (1+i\tan y)}{\cos y (1-i\tan y)} =\frac{\cos y+i\sin y}{\cos y-i\sin y} \\ =\frac{e^{iy}}{e^{-iy}} =e^{2iy} $$

So, $ix\equiv 2iy\bmod{2\pi i}$. This means $x\equiv 2y \bmod{2\pi}$, $x=2y+2n\pi\,(n\in\mathbb Z)$.