# What is the indefinite integral of ln(1+x)?

Aug 20, 2016

$\left(x + 1\right) \ln \left(1 + x\right) - x + C$

#### Explanation:

We have:

$I = \int \ln \left(1 + x\right) \mathrm{dx}$

We will use integration by parts, which takes the form:

$\int u \mathrm{dv} = u v - \int v \mathrm{du}$

So, for $\int \ln \left(1 + x\right) \mathrm{dx}$, let:

$\left\{\begin{matrix}u = \ln \left(1 + x\right) \text{ "=>" "du=1/(1+x)dx \\ dv=dx" "=>" } v = x\end{matrix}\right.$

Fitting this into the integration by parts formula:

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

In integrating the second bit, you could long divide, but this is simpler:

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

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

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

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

Both of these are fairly simple integrals:

$I = x \ln \left(1 + x\right) - x + \ln \left(1 + x\right) + C$

Factoring $\ln \left(1 + x\right)$:

$I = \left(x + 1\right) \ln \left(1 + x\right) - x + C$