# How do I evaluate $\int \frac{\mathrm{d}x}{e^x + 1}$?

How do I solve evaluate $$\int \frac{\mathrm{d}x}{e^x + 1}\ ?$$

I know that I have to use $u$ substitution but I can't seem to find something to substitute with.

• What substitutions have you tried? – David H Apr 26 '14 at 14:45
• Mh, IMO you have at least three obvious substitutions. $u=e^x$, $u=e^x+1$ or $u=1/(e^x+1)$. Did you try any ? – Yves Daoust Jul 6 at 16:20

Setting $\displaystyle e^x=u,e^x\ dx=du\iff dx=\frac{du}{e^x}=\frac{du}u$$\int\frac{dx}{e^x+1}=\int\frac{du}{u(u+1)}$$ Now$\displaystyle\frac1{u(u+1)}=\frac{u+1-u}{u(u+1)}=\frac1u-\frac1{u+1}$HINT: $$\frac1{e^x+1}=\frac{e^{-x}}{1+e^{-x}}$$ OR $$\frac1{e^x+1}=1-\frac{e^x}{e^x+1}$$ • That may sound stupid, but how did you know that$\frac1{e^x+1}=\frac{e^{-x}}{1+e^{-x}}$? – Maik Klein Apr 26 '14 at 14:47 • Factor out$e^x$in the denominator. Recall$e^{-x}=\frac {1}{e^x}. – user2154420 Apr 26 '14 at 14:52 • @MaikKlein,The question is never stupid.I can say Observation as user2154420 has pointed out. I believe my other answer is more natural – lab bhattacharjee Apr 26 '14 at 14:57 It also equals $$1-\frac{e^x}{1+e^x}$$ Another possibility, if you like series solutions: \begin{align*} \int \frac{1}{e^x + 1}dx &= \int \sum_{n=0}^\infty (-1)^ne^{nx}dx \\ &=\sum_{n=0}^\infty (-1)^n\int e^{nx}{dx} \\ &= C + x + \sum_{n=1}^\infty (-1)^n \frac{1}{n}e^{nx} \\ &= C + x - \log(1 + e^x) \end{align*} So: $$\int\frac{1}{e^x+1}dx=\int\frac{e^{-x}}{1+e^{-x}}dx=-\int \frac{(1+e^{-x})'}{1+e^{-x}}dx=-\ln(1+e^{-x})+C=\ln(\frac{1}{1+e^{-x}})+C$$ Using the above hint that\frac{1}{\mathrm{e}^x+1}=1-\frac{\mathrm{e}^x}{\mathrm{e}^x+1}, we get \begin{align*} \int\frac{1}{\mathrm{e}^x+1}\,\mathrm{d}x&=\int 1-\frac{\mathrm{e}^x}{\mathrm{e}^x+1}\,\mathrm{d}x \\ &= x-\int\frac{\left(\mathrm{e}^x+1\right)'}{\mathrm{e}^x+1}\,\mathrm{d}x \\ &= x-\log\left(\mathrm{e}^x+1\right)+K \end{align*} Once again I'm late but better late than never. Let me think first what kind ofu$substitution should I use because I wanna give the OP different substitution. Aha! Let$u=e^x+1$then$e^x=u-1\;\Rightarrow\; x=\ln(u-1)\;\Rightarrow\; dx=\dfrac1{u-1}\ du, and the integral turns out to be \begin{align} \int\frac{1}{e^x+1}\ dx&=\int\frac1u\cdot\dfrac1{(u-1)}\ du\\ &=\int\left[\dfrac1{u-1}-\frac1u\right]\ du\\ &=\ln(u-1)-\ln u+C\tag1\\ &=\ln e^x-\ln (e^x+1)+C\\ &=x-\ln (e^x+1)+C\\ \end{align} or from(1)\$ we also obtain \begin{align} \int\frac{1}{e^x+1}\ dx &=\ln(u-1)-\ln u+C\\ &=\ln\left(\frac{u-1}{u}\right)+C\\ &=\ln\left(\frac{e^x}{e^x+1}\right)+C\\ &=\ln\left(\frac{1}{1+e^{-x}}\right)+C\\ &=-\ln \left(1+e^{-x}\right)+C. \end{align} Done! :)
If $$u=e^x$$ then $$du=e^x dx$$ and $$du= u dx$$: this in turn implies $$dx= du/u$$ so that the integrand gets $$\frac{1} {(u+1)u} = \frac{1}{u} - \frac{1}{u+1}$$ which integrates into $$\ln(u) - \ln(u+1)$$ which is $$\ln(e^x) - \ln(e^x+1)=x-\ln(e^x + 1)$$
In the interest of making things appear as simple as they are I am posting after a large number of others have posted. $$\int \frac{dx}{e^x+1} = \int \frac 1 {e^x(e^x+1)} \Big( e^x\,dx\Big) = \cdots$$ (And then partial fractions.)
$$\begin{eqnarray*} \int \frac{dx}{1+e^x} &=& \int \left( 1-\frac{e^x}{1+e^x} \right) dx \\ &=& \int \left( 1+\sum_{n=1}^{\infty} (-1)^n e^{nx} \right) dx \\ &=& x+\sum_{n=1}^{\infty} \frac{(-1)^n}{n} e^{nx} +C \\ &=& x- \ln(1+ e^x) +C. \end{eqnarray*}$$