Evaluating $\int_{-1}^{1} \frac{dx}{(e^x+1)(x^2+1)}$ I would like to evaluate the following integral:
$$
\int_{-1}^{1}  \frac{dx}{(e^x+1)(x^2+1)} 
$$
I tried various methods but without success.
 A: Substitution $x \rightarrow -x$ gives $$\int_{-1}^{1}  \frac{dx}{(e^x+1)(x^2+1)}=\int_{-1}^{1}  \frac{dx}{(e^{-x}+1)(x^2+1)}=\int_{-1}^{1}  \frac{e^xdx}{(e^x+1)(x^2+1)}$$
Therefore
$$
\int_{-1}^{1}  \frac{dx}{(x^2+1)}=\int_{-1}^{1}  \frac{dx}{(e^x+1)(x^2+1)} + \int_{-1}^{1}  \frac{e^xdx}{(e^x+1)(x^2+1)}=2\int_{-1}^{1}  \frac{dx}{(e^x+1)(x^2+1)}
$$
Should be easy now.
A: HINT:
Use $$I=\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$$
and $$2I=\int_a^bf(x)dx+\int_a^bf(a+b-x)dx=\int_a^b\left(f(x)+f(a+b-x)\right)dx$$
$$2I=\int_{-1}^1\dfrac{dx}{x^2+1}$$
A: Hint. One may write
$$
\begin{align}
\int_{-1}^{1}  \frac{dx}{(e^x+1)(x^2+1)} &=\int_{-1}^0  \frac{dx}{(e^x+1)(x^2+1)} +\int_0^{1}  \frac{dx}{(e^x+1)(x^2+1)} 
\\\\&=\int_0^1  \frac{dx}{(e^{-x}+1)(x^2+1)} +\int_0^{1}  \frac{dx}{(e^x+1)(x^2+1)} 
\\\\&=\int_0^1  \frac{e^x\:dx}{(e^{x}+1)(x^2+1)} +\int_0^{1}  \frac{dx}{(e^x+1)(x^2+1)} 
\\\\&=\int_0^1  \frac{(e^x+1)\:dx}{(e^{x}+1)(x^2+1)} 
\\\\&=\int_0^1  \frac{dx}{(x^2+1)} 
\end{align}
$$ then it is easier.
A: $\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{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
\color{#f00}{\int_{-1}^{1}{\dd x \over \pars{\expo{x} + 1}\pars{x^{2} + 1}}} & =
\int_{-1}^{0}{\dd x \over x^{2} + 1}\ +\
\overbrace{\int_{-1}^{1}{\mathrm{sgn}\pars{x}\,\dd x \over
\pars{\expo{\verts{x}} + 1}\pars{x^{2} + 1}}}^{\ds{=\ 0}}\ =\
\color{#f00}{{\pi \over 4}}
\end{align}
where $\mathrm{sgn}$ is the sign function:
$\ds{\,\mathrm{sgn}\pars{x} =
\left\lbrace\begin{array}{rcrcl}
\ds{-1} & \mbox{if} & \ds{x} & \ds{<} & \ds{0}
\\[2mm]
\ds{1} & \mbox{if} & \ds{x} & \ds{>} & \ds{0}
\end{array}\right.}$

Why ?. Because
$$
\mathrm{f}\pars{x} \equiv {1 \over \expo{x} + 1} =
\left\lbrace\begin{array}{lcrcl}
\ds{\Theta\pars{-x} + \mathrm{sgn}\pars{x}\mathrm{f}\pars{\verts{x}}} & \mbox{if} & \ds{x} & \ds{\not=} & \ds{0}
\\[2mm]
\ds{\half} & \mbox{if} & \ds{x} & \ds{=} & \ds{0}
\end{array}\right.
$$

$\ds{\Theta}$ is the Heaviside step function.
$\ds{\Theta\pars{x} =
\left\lbrace\begin{array}{rcrcl}
\ds{0} & \mbox{if} & \ds{x} & \ds{<} & \ds{0}
\\[2mm]
\ds{1} & \mbox{if} & \ds{x} & \ds{>} & \ds{0}
\end{array}\right.}$


By the way, $\ds{\mathrm{f}\pars{x}}$ is quite usual in Statistical Physics.

