Integrating $ \int_0^1 \frac{e^{ix}}{x^6+1}dx $ Integrating
$$
\int_0^1 \frac{e^{ix}}{x^6+1}dx
$$
but having trouble.    I factored $x^6+1$ but does not work for the problem.  I used identity $e^{ix}=\cos x +i\sin x$, but got nowhere.  I 
can say with certainty 
$$
x^6+1=0, \ x=(-1)^{1/6}
$$
and has 6 roots in the complex plane .
Very much glad for the help. 
 A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{\int_{0}^{1}{\expo{\ic x} \over x^{6} + 1}\,\dd x:\ {\large ?}}$

The roots of $\ds{x^{6} + 1 = 0}$ are given by
  $\ds{x_{n} = \exp\pars{\bracks{-\,{5\pi \over 6} + n\,{\pi \over 3}}\ic}}$ where
  $\ds{n = 0,1,2,3,4,5}$. $\ds{{1 \over x^{6} + 1}}$ can be written as:
  \begin{align}
&{1 \over x^{6} + 1} = \sum_{n \in {\cal A}}{a_{n} \over x - x_{n}}
\quad\mbox{where}\quad a_{n} = \lim_{x \to x_{n}}{x - x_{n} \over x^{6} + 1}
={1 \over 5x_{n}^{5}} = -\,{x_{n} \over 5}
\\[3mm]&\mbox{such that}\quad
{1 \over x^{6} + 1}=-\,{1 \over 5}\sum_{n = 0}^{5}{x_{n} \over x - x_{n}}
\end{align}

Then,
\begin{align}
\int_{0}^{1}{\expo{\ic x} \over x^{6} + 1}\,\dd x
=-\,{1 \over 5}\sum_{n = 0}^{5}x_{n}
\int_{0}^{1}{\expo{\ic x} \over x - x_{n}}\,\dd x
\end{align}

\begin{align}
&\int_{0}^{1}{\expo{\ic x} \over x - x_{n}}\,\dd x
=\expo{\ic x_{n}}\
\overbrace{\int_{-x_{n}}^{1 - x_{n}}{\expo{\ic x} \over x}\,\dd x}
^{\ds{\ic x = -t\imp\quad x = \ic t}}\ =\
\expo{\ic x_{n}}\int_{x_{n}\ic}^{\pars{x_{n} - 1}\ic}
{\expo{-t} \over \ic t}\,\ic\,\dd t
\\[3mm]&=\expo{\ic x_{n}}\bracks{%
\int_{x_{n}\ic}^{\infty}{\expo{-t} \over t}\,\dd t
-\int_{\pars{x_{n} - 1}\ic}^{\infty}{\expo{-t} \over t}\,\dd t}
=\expo{\ic x_{n}}\braces{{\rm E_{1}}\pars{x_{n}\ic}
-{\rm E_{1}}\bracks{\pars{x_{n} - 1}\ic}}
\end{align}
  where $\ds{{\rm E_{1}}\pars{z}}$ is the
  Exponential Integral Function.

In the evaluation of $\ds{{\rm E_{1}}\pars{z}}$, in this expression, we must choose the $\ds{z}$-arguments such that $\ds{\verts{{\rm Arg}\pars{z}} < \pi}$:
$$\color{#00f}{\large%
\int_{0}^{1}{\expo{\ic x} \over x^{6} + 1}\,\dd x
=-\,{1 \over 5}\sum_{x_{n}}x_{n}
\expo{\ic x_{n}}\braces{{\rm E_{1}}\pars{x_{n}\ic}
-{\rm E_{1}}\bracks{\pars{x_{n} - 1}\ic}}}
$$
