# Evaluate: int_0^2 ln(x+4) dx ?

May 5, 2017

${\int}_{0}^{2} \left(\ln \left(x + 4\right)\right) \mathrm{dx} = 6 \ln 6 - 4 \ln 4 - 2$

#### Explanation:

The indefinite integral is:
$\int \text{ " ln(x+4)" } \mathrm{dx}$

First do a u-substitution (I'll use the letter $w$ for clarity, to not get mixed up with integration by parts)
$w = x + 4$
$\frac{\mathrm{dw}}{\mathrm{dx}} = 1$
$\mathrm{dw} = \mathrm{dx}$

$\int \text{ " lnw " } \mathrm{dw}$

Integration by parts:
$\left(\begin{matrix}u = \ln w \\ \mathrm{du} = \frac{1}{w} \mathrm{dw}\end{matrix}\right) \left(\begin{matrix}v = w \\ \mathrm{dv} = 1\end{matrix}\right)$

$w \ln w - \int \left(\frac{w}{w}\right) \mathrm{dw}$

$= w \ln w - \int \left(1\right) \mathrm{dw}$

$= w \ln w - w$
$= \left(x + 4\right) \ln \left(x + 4\right) - \left(x + 4\right)$

Definite integral:
${\int}_{0}^{2} \left(\ln \left(x + 4\right)\right) \mathrm{dx}$
$= {\left[\left(x + 4\right) \ln \left(x + 4\right) - \left(x + 4\right)\right]}_{0}^{2}$

$= \left[6 \ln 6 - 6\right] - \left[4 \ln 4 - 4\right]$

$= 6 \ln 6 - 4 \ln 4 - 2$

May 5, 2017

$6 \ln 6 - 4 \ln 4 - 2 \cong 3.20538$

#### Explanation:

$I = {\int}_{0}^{2} \ln \left(x + 4\right) \mathrm{dx}$

Let $u = x + 4$

$\frac{\mathrm{du}}{\mathrm{dx}} = 1 \to \mathrm{du} = \mathrm{dx}$

Through integration by parts:

$\int f \left(u\right) g ' \left(u\right) \mathrm{du} = f \left(u\right) g \left(u\right) - \int f ' \left(u\right) g \left(u\right) \mathrm{du}$

In this example: $f \left(u\right) = \ln u$ and $g ' \left(u\right) = 1$

$\therefore f ' \left(u\right) = \frac{1}{u}$ and $g \left(u\right) = u$

Hence (indefinite) $I = \ln u \cdot u - \int \frac{1}{u} \cdot u \mathrm{du}$

$= u \ln u - \int 1 \mathrm{du}$

$= u \ln u - u$

Undo substitution:

$I = {\left[\left(x + 4\right) \ln \left(x + 4\right) - \left(x + 4\right)\right]}_{0}^{2}$

$= 6 \ln 6 - 4 \ln 4 - 6 + 4$

$= 6 \ln 6 - 4 \ln 4 - 2 \cong 3.20538$