nasty exponentials While trying to find the fourier transform of $\Large \frac{1}{1 + x^4} $, using the definition and the residue theorem has required me to evaluate nasty looking expressions like
$$\large \rm e^{-ike^{i\frac{\pi}{4}}} .$$
Mathematica tells me this is the same as $$ \rm e^{\frac{k}{\sqrt{2}}} \cos(\frac{k}{\sqrt{2}}) - i \rm e^{\frac{k}{\sqrt{2}}} \sin(\frac{k}{\sqrt{2}})  $$
Now these two expressions aren't obviously equivalent to me, and my question is, how can I get from the first expression to the second expression?
 A: Note that 
$e^{\frac{i\pi}{4}}=cos(\frac{\pi}{4})+isin(\frac{\pi}{4})=\frac{\sqrt{2}}{2}(1+i)$
so
$e^{-ike^{\frac{i\pi}{4}}}=e^{-ik\frac{\sqrt{2}}{2}(1+i)}=e^{\frac{k}{\sqrt{2}}-\frac{ik}{\sqrt{2}}}=e^{\frac{k}{\sqrt{2}}}(\cos(\frac{k}{\sqrt{2}})-isin(\frac{k}{\sqrt{2}}))$
which gives the form you want.
A: It's just Euler's formula $$
  e^{\sigma + i\varphi} = e^\sigma\cos\varphi + ie^\sigma\sin\varphi
$$ applied twice. First to get $$
    e^{i\frac{\pi}{4}}
 = \cos(\frac{\pi}{4}) + i\sin(\frac{\pi}{4})
 = \frac{1}{\sqrt{2}} + i\frac{1}{\sqrt{2}} \text{,}
$$ and then again to get $$
\begin{align}
    e^{-ike^{i\frac{\pi}{4}}}
 &= e^{-ik\left(\frac{1}{\sqrt{2}} + i\frac{1}{\sqrt{2}}\right)}
  = e^{\frac{k}{\sqrt{2}} - i\frac{k}{\sqrt{2}}}
  = e^{\frac{k}{\sqrt{2}}}\cos\left({-\frac{k}{\sqrt{2}}}\right)
  + ie^{\frac{k}{\sqrt{2}}}\sin\left({-\frac{k}{\sqrt{2}}}\right) \\
 &= e^{\frac{k}{\sqrt{2}}}\cos\left({\frac{k}{\sqrt{2}}}\right)
  - ie^{\frac{k}{\sqrt{2}}}\sin\left({\frac{k}{\sqrt{2}}}\right) \text{.}
\end{align}
$$
