# What are the real and imaginary parts of $\frac{i}{(x+e^{ix})}$?

The variable x in this case is real...not complex. At first blush $\frac{i}{(x+e^{ix})}$ wouldn't seem to have any real part. It looks like i divided by some stuff. However, plotting this with Mathematica shows there is definitely a real part. How does one go about finding the real and imaginary parts of this function?

• Write $e^{ix}$ as $\cos(x) + i\sin(x)$ and then use the usual technique for realifying the denominator (multiplying and dividing by the conjugate). – Cameron Williams Aug 7 '17 at 18:12

$$\frac { i }{ (x+e^{ ix }) } =\frac { i }{ x+\cos { x+i\sin { x } } } =\frac { i\left( x+\cos { x-i\sin { x } } \right) }{ \left( x+\cos { x+i\sin { x } } \right) \left( x+\cos { x-i\sin { x } } \right) } =\\ =\frac { \sin { x } }{ \left( x+\cos { x } \right) ^{ 2 }+\sin ^{ 2 }{ x } } +i\frac { x+\cos { x } }{ \left( x+\cos { x } \right) ^{ 2 }+\sin ^{ 2 }{ x } }$$