# How do you integrate ln(x^2+4)?

There is already a solution here

Apr 6, 2018

$x \ln \left({x}^{2} + 4\right) - 2 x + 4 a r c \tan \left(\frac{x}{2}\right) + C .$

#### Explanation:

We will use the following Rule of Integration by Parts :

$\int u \cdot v \mathrm{dx} = u \int v \mathrm{dx} - \int \left\{\frac{\mathrm{du}}{\mathrm{dx}} \cdot \int v \mathrm{dx}\right\} \mathrm{dx}$.

We take, $u = \ln \left({x}^{2} + 4\right) \Rightarrow \frac{\mathrm{du}}{\mathrm{dx}} = \frac{1}{{x}^{2} + 4} \cdot 2 x , \mathmr{and} ,$

$v = 1 \therefore \int v \mathrm{dx} = x$.

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

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

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

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

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

$= x \ln \left({x}^{2} + 4\right) - 2 \left\{x - 4 \cdot \frac{1}{2} a r c \tan \left(\frac{x}{2}\right)\right\}$,

$= x \ln \left({x}^{2} + 4\right) - 2 x + 4 a r c \tan \left(\frac{x}{2}\right) + C .$