\(\displaystyle\int{\frac{{{1}}}{{{2}+{e}^{{-{x}}}}}}{\left.{d}{x}\right.}\)

Apply the negative exponent rule \(\frac{1}{a^{n}}=a^{-n}\)

\(\displaystyle\int{\frac{{{1}}}{{{2}+{e}^{{-{x}}}}}}{\left.{d}{x}\right.}=\int{\frac{{{1}}}{{{2}+{\frac{{{1}}}{{{e}^{{{x}}}}}}}}}{\left.{d}{x}\right.}=\int{\frac{{{e}^{{{x}}}}}{{{2}{e}^{{{x}}}+{1}}}}{\left.{d}{x}\right.}\)

Let \(u=2e^{x}\Rightarrow du=2e^{x}dx\Rightarrow \frac{1}{2}du=e^{x}dx\)

\(\displaystyle\int{\frac{{{e}^{{{x}}}}}{{{2}{e}^{{{x}}}+{1}}}}{\left.{d}{x}\right.}=\int{\frac{{{\frac{{{1}}}{{{2}}}}{d}{u}}}{{{u}}}}={\frac{{{1}}}{{{2}}}}\int{\frac{{{d}{u}}}{{{u}}}}\)

Integrate

\(\displaystyle{\frac{{{1}}}{{{2}}}}\int{\frac{{{d}{u}}}{{{u}}}}={\frac{{{1}}}{{{2}}}}{\ln}{\left|{u}\right|}+{C}\)

Putting the answer back in terms of x, \(\displaystyle{u}={2}{e}^{{{x}}}+{1}\)

\(\displaystyle{\frac{{{1}}}{{{2}}}}{\ln{{\left({2}{e}^{{{x}}}+{1}\right)}}}+{C}\)