How do I evaluate $\int_{-1}^1\frac{dx}{(1+x^2)(e^x+1)}$? How do I evaluate:

$$\int_{-1}^1\frac{dx}{(1+x^2)(e^x+1)}$$

The answer given in the book is written below.
$$\int_{-1}^1\frac{dx}{(1+x^2)(e^{-x}+1)} \tag{1}$$
$$=\int_{-1}^1\frac{e^x}{(1+x^2)(e^x+1)}dx \tag{2}$$
On adding $(1)$ and $(2)$, we get:
$$\Rightarrow 2I=\int_{-1}^1\frac{e^x+1}{(1+x^2)(e^x+1)}dx \tag{3}$$
$$=\int_{-1}^1\frac{dx}{1+x^2} =2\int_{0}^1\frac{dx}{1+x^2} \tag{4}$$
$$\Rightarrow I=\int_{0}^1\frac{dx}{1+x^2}=[ \tan^{-1}x]\:_{0}^{1}\:=\:\frac{\pi}{4} \tag{5}$$
$(2): \int_{a}^{b}{f(x)dx}=\int_{a}^{b}{f(a+b-x)dx}$
$(4): \frac{1}{1+x^2} \text{ is an even function}$
I understood how to solve the integral, but I'm not able to understand how the original integral changed to the integral in $(1)$.
It might be something basic, most probably related to exponents but please tell because I'm a complete beginner in calculus.
 A: Guys I got the answer $$\int_{-1}^1\frac{dx}{(1+x^2)(e^{-x}+1)}$$ the numerator and denominator were multiplied with $e^x$ so the term $(e^{-x}+1)$ changed to $$e^{-x+x} \Rightarrow e^{0} = 1$$ and $1$ in $(e^{-x}+1)$ changed to $e^{x}$, so finally the denominator is equal to $$1+e^x \Leftrightarrow e^x+1.$$
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{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \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{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
There is an identity $\ds{\pars{~\Theta\ \mbox{is the}\ Heaviside\ Theta\ Function~}}$:
\begin{align}
&{1 \over \expo{x} + 1} =
\left\{\begin{array}{lcl}
\ds{\underbrace{\Theta\pars{-x} + {\on{sgn}\pars{x} \over \expo{\verts{x}} + 1}}
_{\ds{\substack{\mbox{Note that the}\ }
\\
second\ term\ \mbox{is an}
\\
\underline{odd\ function}.}}} & \mbox{if} & \ds{x \not= 0}
\\[3mm]
\ds{1 \over 2} & \mbox{if} & \ds{x = 0}
\end{array}\right.
\\[1cm] & \mbox{Then,}\quad
\int_{-1}^{1}{\dd x \over \pars{1 + x^{2}}\pars{\expo{x} + 1}}
\\[2mm] & \phantom{\mbox{Then,}\ }=
\int_{-1}^{0}{\dd x \over 1 + x^{2}} = \bbx{\pi \over 4} \\ &
\end{align}
A: Answer:
$I= \int\limits_{-1}^{1} \frac{dx}{(1+x^2)(e^x+1) } $=
We put $x=-y$
$I=\int\limits_{1}^{-1} - \frac{dy}{(1+y^2)(e^{-y}+1)} =\int\limits_{-1}^{1} \frac{e^{y}}{(1+y^2)(e^{y} +1)}  =
\int\limits_{-1}^{1}  \frac{e^{y}+1-1}{(1+y^2)(e^{y} +1)} $
$2I=\int\limits_{-1}^{1} \frac{1}{1+y^2 } $
$I=\frac{[arct(y) ]_{-1}^{1}}{2} =\frac{\pi}{4}$
