Answer
$$\int \frac{d x}{1+e^{x}}=x-\ln \left(e^{x}+1\right)+C $$
Work Step by Step
Given $$\int \frac{d x}{1+e^{x}}$$
\begin{array}{l}{\text { Let } u=e^{x}, \ \ d u=e^{x} d x \ \text { and } d x=\frac{d u}{u} \text { . Then } \\
\begin{aligned}I&=\int \frac{d x}{1+e^{x}}\\
&=\int \frac{d u}{(1+u) u}\\
\text{Since} \ \ \ \frac{1}{u(u+1)}
&=\frac{A}{u}+\frac{B}{u+1}\end{aligned} \\
\Rightarrow} \\ {1=A(u+1)+B u \\
\text { Setting } u=-1 \Rightarrow B=-1 . \text { Setting } u=0\Rightarrow A=1. \text { Thus, }} \\ {\begin{aligned}I&=\int \frac{d u}{u(u+1)}\\&=\int\left(\frac{1}{u}-\frac{1}{u+1}\right) d u\\&=\ln |u|-\ln |u+1|+C\\
&=\ln e^{x}-\ln \left(e^{x}+1\right)+C\\
&=x-\ln \left(e^{x}+1\right)+C
\end{aligned}}\end{array}