# How do you integrate 1/(e^x(e^x+1)) using partial fractions?

Mar 4, 2017

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

#### Explanation:

Rather than using partial fractions directly we can prepare the function for a substitution. As the substitution will have to remove the exponential, let's bring it to the numerator noting that: $\frac{1}{e} ^ x = {e}^{-} x$:

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

Substitute now ${e}^{-} x = t$, $\mathrm{dt} = - {e}^{-} x \mathrm{dx}$

$\int \frac{\mathrm{dx}}{{e}^{x} \left({e}^{x} + 1\right)} = - \int \frac{\mathrm{dt}}{\frac{1}{t} + 1} = - \int \frac{t \mathrm{dt}}{t + 1}$

Now separate in partial fractions simply adding and subtracting $1$ to the numerator:

$\int \frac{\mathrm{dx}}{{e}^{x} \left({e}^{x} + 1\right)} = - \int \frac{t + 1 - 1}{t + 1} \mathrm{dt} = - \int \mathrm{dt} + \int \frac{\mathrm{dt}}{t + 1}$

This are regular integrals we can solve straight away:

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

and undoing the substitution:

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