How do you integrate  (1/(e^x+1))dx ?

Mar 25, 2017

$x - \ln \left({e}^{x} + 1\right) + C$

Explanation:

Let ${e}^{\frac{x}{2}} = \tan \theta$. Then $\frac{1}{2} {e}^{\frac{x}{2}} \mathrm{dx} = {\sec}^{2} \theta d \theta$.

$\int \frac{\mathrm{dx}}{{e}^{x} + 1} = 2 \int \frac{\frac{1}{2} {e}^{\frac{x}{2}} \mathrm{dx}}{{e}^{\frac{x}{2}} \left({e}^{x} + 1\right)} = 2 \int \frac{{\sec}^{2} \theta d \theta}{\tan \theta \left({\sec}^{2} \theta\right)} = 2 \int \cos \frac{\theta}{\sin} \theta d \theta$

$= 2 \ln \left\mid \sin \right\mid \theta$

From $\tan \theta = {e}^{\frac{x}{2}}$ draw a right triangle to see that $\sin \theta = {e}^{\frac{x}{2}} / \sqrt{{e}^{x} + 1}$:

$= 2 \ln \left\mid {e}^{\frac{x}{2}} / \sqrt{{e}^{x} + 1} \right\mid = \ln \left\mid {e}^{x} / \left({e}^{x} + 1\right) \right\mid = x - \ln \left({e}^{x} + 1\right) + C$

Apr 21, 2018

$\int \setminus \frac{1}{{e}^{x} + 1} \setminus \mathrm{dx} = - \ln \left(1 + {e}^{- x}\right) + C = x - \ln \left({e}^{x} + 1\right) + C$

Explanation:

Note that:

$\frac{1}{{e}^{x} + 1} = {e}^{- x} / \left(1 + {e}^{- x}\right) = - \frac{d}{\mathrm{dx}} \ln \left(1 + {e}^{- x}\right)$

So:

$\int \setminus \frac{1}{{e}^{x} + 1} \setminus \mathrm{dx} = - \ln \left(1 + {e}^{- x}\right) + C$

If you prefer, note that:

$- \ln \left(1 + {e}^{- x}\right) = - \ln \left(\frac{{e}^{x} + 1}{{e}^{x}}\right)$

$\textcolor{w h i t e}{- \ln \left(1 + {e}^{- x}\right)} = \ln \left({e}^{x}\right) - \ln \left({e}^{x} + 1\right)$

$\textcolor{w h i t e}{- \ln \left(1 + {e}^{- x}\right)} = x - \ln \left({e}^{x} + 1\right)$

So the integral can be expressed as:

$\int \setminus \frac{1}{{e}^{x} + 1} \setminus \mathrm{dx} = x - \ln \left({e}^{x} + 1\right) + C$