# Integration of Logarithmic Function

Integration of logarithmic function : If a function 'f' is of the form f(x) = $x^{-1}$ gives us the result in the absolute value of the natural log function, as shown below.

1) $\int_{}^{} x^{-1}dx = \int_{}^{}\frac{1}{x}dx = ln|x| + c$

2) $\int_{}^{} ln(x) dx = x ln|x| - x + c$

3) $\int_{}^{} \log_{a}{x} dx = \frac{x}{ln a}ln(x-1) + c$

## Examples on Integration of Logarithmic Function

Example 1: Integrate $\frac{4}{x}$ with respect to x.

Solution : $\int_{}^{}\frac{4}{x} dx = 4 \int_{}^{}\frac{1}{x} dx$

Use the rule for integration of logarithmic function,
$\int_{}^{}\frac{4}{x} dx$ = 4 ln|x| + c

$\int_{}^{}\frac{4}{x} dx = ln(x^{4}) + c$ ( use the property of logarithm)

Example 2: Integrate $\frac{5}{x-5}$ with respect to x.

Solution : $\int_{}^{}\frac{5}{x-5} dx = 5 \int_{}^{}\frac{1}{x-5} dx$

Use the 'U' substitution method,
Let x - 5 = u
dx = du
$5 \int_{}^{}\frac{1}{x-5} dx = 5 \int_{}^{}\frac{1}{u} du$

Use the integration of logarithmic function rule
= 5 ln|u|
Now plug in u = x - 5
$\int_{}^{}\frac{5}{x-5} dx = 5 ln|x-5| + c$

Example 3: Integrate $\frac{x}{x^{2} +1}$ with respect to x.

Solution : $\int_{}^{}\frac{x}{x^{2} +1} dx$

Use the 'U' substitution method,
Let $x^{2}$ + 1 = u
2x dx = du
x dx = $\frac{1}{2}$ du
$\int_{}^{}\frac{x}{x^{2} +1} dx = \int_{}^{}\frac{1}{u} \frac{1}{2} du$

= $\frac{1}{2} \int_{}^{}\frac{1}{u} du$

Use the integration of logarithmic function rule
= $\frac{1}{2} ln|u|$
Now plug in u = $x^{2} + 1$
$\int_{}^{}\frac{x}{x^{2} +1} dx = \frac{1}{2} ln|x^{2} +1| + c$

Example 4: Integrate $\frac{sin(x)}{cos(x) -3 }$ with respect to x.

Solution : $\int_{}^{}\frac{sin(x)}{cos(x) -3 } dx$

Use the 'U' substitution method,
Let cos(x) - 3 = u
-sin(x) dx = du
sin(x) dx = - du
$\int_{}^{}\frac{sin(x)}{cos(x) -3 } dx = \int_{}^{}\frac{-1}{u} du$

= $-1\int_{}^{}\frac{1}{u} du$

Use the integration of logarithmic function rule
= $- ln|u|$
Now plug in u = $cos(x) -3$
$\int_{}^{}\frac{sin(x)}{cos(x) -3 }dx = - ln|cos(x)-3 | + c$

Example 5: Integrate $4\log_{3}{x}$ with respect to x.

Solution : $\int_{}^{}\log_{3}{x} dx = 4 \int_{}^{}\log_{3}{x} dx$

Use the rule for integration of logarithmic function,
$\int_{}^{} 4\log_{3}{x} dx = \frac{4x}{ln 3}ln(x-1) + c$