integral of $\frac{1}{(1+e^{-x})}$ I make the substitution $u=1+e^{-x}$ which gives $-\dfrac{e^x}{u}\ du$.
Integrating gives me $$-e^x\ln(1+e^{-x}) + C,$$
but the answer is $\ln(e^x +1) + C$.
What am I doing wrong?

We have with $u=e^{-x}$ so $du=-e^{-x}dx\implies dx=-\frac{du}{u}$
$$\int \frac{dx}{1+e^{-x}}=-\int\frac{du}{u(1+u)}=\int\frac{du}{1+u}-\int\frac{du}{u}=\ln(1+u)-\ln u+C\\=\ln\left(1+e^x\right)+C$$
