Is it possible to compute $\int_{0}^{\infty} \frac{1}{x^a + 1} dx$ without the residue theorem or Euler's reflection formula. I've been trying to find a way to compute the integral
$$\int_{0}^{\infty}\frac{1}{x^a + 1} dx, \quad a > 1$$
without having to resort to the heavy machinery of complex analysis. I've found two methods to compute this integral but they both use complex. One way is just to use contour integration on the slice of pie with angle $2\pi/a$ and apply the residue theorem, the other method uses u-substitution to turn this integral into the beta function
$$\frac{1}{a}B\left(1/a,1-1/a\right) = \frac{1}{a}\Gamma(1/a)\Gamma(1-1/a)$$
and from here you can use Euler's reflection formula to get the solution. Is there any way to analyze this integral without referencing either the residue theorem or Euler's reflection formula?
 A: For any $b\in(0,1)$, let
$$ f(b) = \int_{0}^{+\infty}\frac{dx}{x^{1/b}+1} = b\int_{0}^{+\infty}\frac{x^b}{x(x+1)}\,dx=b\int_{0}^{1}\frac{x^b+x^{1-b}}{x(x+1)}\,dx. $$
From the representation in the middle it is clear that $g(b)=\frac{f(b)}{b}$ is a log-convex function on $(0,1)$; from the last representation it is clear that $g(b)=g(1-b)$. For any $c\in\left(-1,1\right)$, let
$$ h(c) = g\left(\frac{1+c}{2}\right) = \int_{0}^{1}\frac{x^{1/2-c/2}+x^{1/2+c/2}}{x(x+1)}\,dx \stackrel{x\mapsto x^2}{=} 2\int_{0}^{1}\frac{x^{c}+x^{-c}}{1+x^2}\,dx\stackrel{x\mapsto\exp(-u)}{=}\int_{0}^{+\infty}\frac{\cosh(cu)}{\cosh(u)}\,du.$$
We have that $h(c)$ is an even function and an analytic function over $(-1,1)$. For any $n\geq 0$ we have
$$ h^{(2n)}(0)=\int_{0}^{+\infty}\frac{u^{2n}}{\cosh(u)}\,du=2\int_{0}^{+\infty}u^{2n}\sum_{k\geq 0}(-1)^k e^{-(2k+1)u}\,du = (2n)!\sum_{k\geq 0}\frac{(-1)^k}{(2k+1)^{2n+1}} $$
and
$ \frac{h^{(2n)}(0)}{(2n)!} = \beta(2n+1)$. In particular if we know the ordinary generating function for the Dirichlet $\beta$ function we know $h(c)$ (then $g(b)$ and $f(b)$) and vice-versa. Luckily the OGF of $\beta$ is related to the EGF of Euler zig-zag numbers, which is fairly well-known (thanks to robjohn) and leads us to
$$ h(c)= \frac{\pi}{2\cos\frac{\pi c}{2}}\quad\Longrightarrow\quad f(b)= \frac{\pi b}{\sin(\pi b)}\quad\Longrightarrow\quad \int_{0}^{+\infty}\frac{dx}{x^a+1} = \frac{\pi}{a\sin\frac{\pi}{a}}.$$
A: First we can write
$$\int_0^\infty \frac1{x^a+1}\,dx=\int_0^1 \frac1{x^a+1}\,dx+\int_1^\infty \frac1{x^a+1}\,dx\tag1$$
Enforcing the substitution $x\mapsto 1/x$ in the second integral on the right-hand side of $(1)$ reveals
$$\int_0^\infty \frac1{x^a+1}\,dx=\int_0^1 \left(\frac{1+x^{a-2}}{x^a+1}\right)\,dx\tag2$$
Next, we expand the denominator of the integrand on the right-hand side of $(2)$ in a geometric series to find that
$$\begin{align}
\int_0^\infty \frac1{x^a+1}\,dx &=\sum_{n=0}^\infty (-1)^n \int_0^1 (x^{na}+x^{(n+1)a-2})\,dx\\\\
&=\sum_{n=0}^\infty (-1)^n \left(\frac1{na+1}+\frac{1}{(n+1)a-1}\right)\\\\
&=1+\frac1a\sum_{n=1}^\infty (-1)^n \left(\frac1{n+1/a}-\frac{1}{n-1/a}\right)\tag3\\\\
&=\frac\pi a \csc(\pi/a)\tag4
\end{align}$$
where in going from $(3)$ to $(4)$ we made use of the result posted in the Appendix of THIS ANSWER with $y=1/a$.  Note that this result relied on real analysis only, including using the Fourier series.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{{\displaystyle #1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\sr}[2]{\,\,\,\stackrel{{#1}}{{#2}}\,\,\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
Since $\ds{{1 \over 1 + x} = \sum_{n = 0}^{\infty}\Gamma\pars{1 + n}{\pars{-x}^{n} \over n!}}$:
\begin{align}
& \color{#44f}{\left.\int_{0}^{\infty}{\dd x \over x^{a} + 1}\right\vert_{\Re\pars{a}\ >\ 1}} =
{1 \over a}\int_{0}^{\infty}x^{1/a - 1}\,\,\,{1 \over 1 + x}\dd x =
{1 \over a}\ \overbrace{\Gamma\pars{1 \over a}\
\Gamma\pars{1 - {1 \over a}}}^{\substack{\ds{Ramanujan's}\\[0.5mm] \ds{Master}\\[0.5mm] \ds{Theorem}}}
\\[5mm] = & \ \bbx{\color{#44f}{\pi\,{\csc\pars{\pi/a} \over a}}}
\\ &
\end{align}
