TITLE: How to evaluate $\int_0^\infty \frac{1}{x^n+1} dx$
QUESTION [7 upvotes]: Noticed that the integral $$\int_0^\infty \frac{1}{x^n+1} dx$$ is often approached with partial fraction decomposition, but this gets increasingly ugly as $n$ gets bigger.  Is there a neat trick to do these all in one fell swoop? Or a famous name for these integrals that I can look up for more info?

REPLY [3 votes]: $\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{\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{\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}$
\begin{align}
&\overbrace{\color{#66f}{\large\int_{0}^{\infty}{\dd x \over x^{n} + 1}}}
^{\ds{\color{#c00000}{t \equiv {1 \over x^{n} + 1}\
\imp\ x = \pars{{1 \over t} - 1}^{1/n}}}}\ =\
\int_{1}^{0}t\,{1 \over n}\,\pars{{1 \over t} - 1}^{1/n - 1}
\pars{-\,{1 \over t^{2}}}\,\dd t
\\[5mm]&={1 \over n}\int_{0}^{1}t^{-1/n}\pars{1 - t}^{1/n - 1}\,\dd t
={1 \over n}\,{\rm B}\pars{1 - {1 \over n},{1 \over n}}
={1 \over n}\,{\Gamma\pars{1 - 1/n}\Gamma\pars{1/n} \over \Gamma\pars{1}}
\\[5mm]&=\color{#66f}{\large{1 \over n}\,{\pi \over \sin\pars{\pi/n}}}
\end{align}

The result is valid when $\ds{\Re\pars{1 - {1 \over n}} > 0}$ and
  $\ds{\Re\pars{1 \over n} > 0}$
  $\ds{\imp\ \color{#c00000}{0 < \Re\pars{1 \over n} < 1}}$.