<s>[INST] What are the real and imaginary parts of $(x+e^{ix})^{0.5}$? Finding the real and imaginary parts of 
$(x+e^{ix})^{n}$ is easy if n is an integer greater than 1.  But what if n is a fraction?  Suppose I have a function  like $(x+e^{ix})^{0.5}$. How do you find the real and imaginary parts of this?  
Edit: x is a real number...not complex.
 [/INST] If $n$ is not an integer, $(x + e^{ix})^{n}$ is multi-valued.
First write $x + e^{ix} = x + \cos x + i\sin x = e^{i\theta} \sqrt{x^{2} + 2x \cos x + 1}$ for some real $\theta$ (unique up to an additive integer multiple of $2\pi$).
If $n$ is real, then
\begin{align*}
  (x + e^{ix})^{n}
  &= (x^{2} + 2x\cos x + 1)^{n/2} \exp(in\theta) \\
  &= \underbrace{(x^{2} + 2x\cos x + 1)^{n/2} \cos(n\theta)}_{\text{real part}} + i\underbrace{(x^{2} + 2x\cos x + 1)^{n/2} \sin(n\theta)}_{\text{imaginary part}}.
\end{align*}
Generally, letting $\ln$ denote the real branch of the natural logarithm,
\begin{align*}
  (x + e^{ix})^{n}
  &= (x + \cos x + i\sin x)^{n} \\
  &= \exp\bigl[n \log(x + \cos x + i\sin x)\bigr] \\
  &= \exp\bigl[n \bigl(\tfrac{1}{2}\ln(x^{2} + 2x \cos x + 1) + i\arg(x + \cos x + i\sin x)\bigr)\bigr] \\
  &= \exp\bigl[n \bigl(\tfrac{1}{2}\ln(x^{2} + 2x \cos x + 1) + i\theta\bigr)\bigr].
  \tag{1}
\end{align*}
To proceed, write $n = a + bi$ with $a$ and $b \neq 0$ real, multiply out the quantity in square brackets, and use $\exp(u + iv) = e^{u} \cos v + ie^{u} \sin v$ (for $u$ and $v$ real) to simplify (1) to your heart's content.
</s>