Separate Into Real and Imaginary Parts Separate the following trigonometric function into Real and Imaginary Parts 
$$\tan^{-1}e^{i\theta} $$
or
$$\tan^{-1}(\cos\theta+i\sin\theta)$$
I Have made till here
Assuming $x+iy$ is the final outcome after separation
$$\therefore \tan^{-1}e^{i\theta}=x+iy$$
$$\therefore e^{i\theta}=\tan(x+iy)$$
$$\therefore e^{i\theta}= \frac{\sin2x}{cos2x+cos2hy}+i \frac{\sin2hy}{cos2x+cos2hy}  $$
$$\therefore \cos\theta+i\sin\theta= \frac{\sin2x}{cos2x+cos2hy}+i \frac{\sin2hy}{cos2x+cos2hy}  $$
But How to proceed from here to find the value of $ x $ and $ y $ so as to get $x+iy$
Or is there any other way to get the answer other than the steps that I have used.
 A: Using Rasklonikov's very useful suggestion, we have
$$\tan^{-1}e^{i\theta}=\frac{1}{2i}\ln\left(\frac{1+ie^{i\theta}}{1-ie^{i\theta}}\right)=\frac{i}{2}\ln\left(\frac{1-ie^{i\theta}}{1+ie^{i\theta}}\right)=\frac{i}{2}\left[\ln(1-ie^{i\theta})-\ln(1+ie^{i\theta})\right]$$
Examining the natural log terms, the log of a complex number $a+ib$ is given by
$$\ln(a+ib)=\ln|a+ib|+i\arg(a+ib)=\ln\sqrt{a^2+b^2}+i\tan^{-1}\left(\frac{b}{a}\right)$$
Thus
$$\ln(1-ie^{i\theta})=\ln([1+\sin\theta]-i\cos\theta)=\ln\sqrt{2(1+\sin\theta)}-i\tan^{-1}\left(\frac{\cos\theta}{1+\sin\theta}\right)$$
$$\ln(1+ie^{i\theta})=\ln([1-\sin\theta]+i\cos\theta)=\ln\sqrt{2(1-\sin\theta)}+i\tan^{-1}\left(\frac{\cos\theta}{1-\sin\theta}\right)$$
Substituting the above two expressions into the arctan equation, we have
$$\tan^{-1}e^{i\theta}=\frac{1}{2}\left[\tan^{-1}\left(\frac{\cos\theta}{1+\sin\theta}\right)-\tan^{-1}\left(\frac{\cos\theta}{1-\sin\theta}\right)\right]+\frac{i}{2}\ln\left(2\sqrt{(1-\sin^2\theta)})\right)\\=\frac{1}{2}\left[\tan^{-1}\left(\frac{\cos\theta}{1+\sin\theta}\right)-\tan^{-1}\left(\frac{\cos\theta}{1-\sin\theta}\right)\right]+\frac{i}{2}\ln\left(2\cos\theta\right)$$
A: If $\displaystyle\tan^{-1}(\cos\theta+i\sin\theta)=z$
$\displaystyle\tan z=\cos\theta+i\sin\theta$
$\displaystyle i(\cos\theta+i\sin\theta)=\frac{i\sin z}{\cos z}$
Apply Componendo and dividendo,  $\displaystyle\frac{\cos z+i\sin z}{\cos z-i\sin z}=\frac{1+i\cos\theta-\sin\theta}{1-(i\cos\theta-\sin\theta)}$
Rationalizing the denominator of the RHS by multiplying with $1+\sin\theta+i\cos\theta$ 
$\displaystyle\frac{e^{iz}}{e^{-iz}}=i\frac{\cos\theta}{1+\sin\theta}\iff e^{i2z}=i\frac{\cos\theta}{1+\sin\theta}$
$\displaystyle\implies i2z=\text{Log}\left(\frac{i\cos\theta}{1+\sin\theta}\right)$
Case $\#1:$
If $\displaystyle\frac{\cos\theta}{1+\sin\theta}\ge0,2iz=\log\left(\frac{\cos\theta}{1+\sin\theta}\right)+\log i+2n\pi$ where $n$ is any integer
$\displaystyle\implies2iz=\log\left(\frac{\cos\theta}{1+\sin\theta}\right)+i\dfrac\pi2+2n\pi i$ as $e^{\dfrac{i\pi}2}=i$
$\displaystyle\implies2z=-i\log\left(\frac{\cos\theta}{1+\sin\theta}\right)+\dfrac\pi2+2n\pi$
Case $\#2:$
If $\displaystyle\frac{\cos\theta}{1+\sin\theta}<0,2iz=\log\left(-\frac{\cos\theta}{1+\sin\theta}\right)+\log(-i)+2n\pi$ where $n$ is any integer
Now $\log(-i)=\log\left(\cos\dfrac{(-\pi)}2+i\sin\cos\dfrac{(-\pi)}2\right)=\log(e^{\dfrac{(-\pi)}2})=-\dfrac{\pi}2$
Complete the rest like Case $\#1$
Case $\#3:$
If $\displaystyle\cos\theta=1+\sin\theta=0,\tan z=-i\iff \frac{i\sin z}{\cos z}=1\iff\cos z=i\sin z\iff \cos(-z)+i\sin(-z)=0,e^{-iz}=0$
But, $|e^{-iz}|=1$ hence there will be no solution for $z$
A: I have come up with this solution Hope this might be the correct one
Let$$\displaystyle\tan^{-1}e^{i\theta}=x+iy$$
$$e^{i\theta}=\tan(x+iy)$$
$$\cos\theta+i\sin\theta=\tan(x+iy)$$
$$\cos\theta-i\sin\theta=tan(x-iy)$$
Now,$$ \tan2x=tan[(x+iy)+(x-iy)]$$
$$=\frac{\tan(x+iy)+\tan(x-iy)}{1-\tan(x+iy)\tan(x-iy)}$$
$$=\frac{(\cos\theta+i\sin\theta)+(\cos\theta-isin\theta)}{1-(\cos\theta+isin\theta)(\cos\theta-isin\theta)}$$
$$=\frac{2\cos\theta}{1-(\cos^2\theta+isin^2\theta)}=\frac{2\cos\theta}{1-1}=\frac{2cos\theta}{0}=\infty$$
$$\therefore 2x=\frac{\pi}{2}\therefore x=\frac{\pi}{4}$$
Also,
$$ \tan2iy=tan[(x+iy)-(x-iy)]$$
$$=\frac{\tan(x+iy)-\tan(x-iy)}{1+\tan(x+iy)\tan(x-iy)}$$
$$=\frac{(\cos\theta+i\sin\theta)-(\cos\theta-isin\theta)}{1+(\cos\theta+isin\theta)(\cos\theta-isin\theta)}$$
$$=\frac{2i\sin\theta}{1+(\cos^2\theta+isin^2\theta)}=\frac{2i\sin\theta}{2}$$
$$\therefore i\tanh2y=i\sin\theta\therefore \tanh2y=\sin\theta$$
$$\therefore 2y=\tanh^{-1}\sin\theta\therefore y=\frac{1}{2}\tanh^{-1}\sin\theta$$
Real part x=$\frac{\pi}{4}$,
Imaginary part y=$\frac{1}{2}\tanh^{-1}\sin\theta$
