# How would you integrate ln(x^2 + 1)?

Jul 27, 2018

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

#### Explanation:

Integrate by parts:

$\int \ln \left({x}^{2} + 1\right) \mathrm{dx} = \int \ln \left({x}^{2} + 1\right) \frac{d}{\mathrm{dx}} \left(x\right) \mathrm{dx}$

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

$\int \ln \left({x}^{2} + 1\right) \mathrm{dx} = x \ln \left({x}^{2} + 1\right) - 2 \int {x}^{2} / \left({x}^{2} + 1\right) \mathrm{dx}$

Now:

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

and using the linearity of the integral:

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

These are well known integrals, so:

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