Evaluate Integrals Involving Logarithms - Tutorial

Evaluate integrals involving natural logarithmic functions: A tutorial, with examples and detailed solutions. Also exercises with answers are presented at the end of the tutorial. You may want to use the table of integrals and the properties of integrals in this site. In what follows, \( C \) is a constant of integration and can take any constant value.

Examples with Solutions

Example 1

Evaluate the integral \[ \int \ln(x) \, dx \] Solution to Example 1:
Let \( U = \ln(x) \) and \( V' = 1 \) and use integration by parts. Hence \( U' = \dfrac{1}{x} \) and \( V = x \)
\[ \int \ln(x) \, dx = \int U V' \, dx \\\\ = U V - \int U' V \, dx \\\\ = x \ln(x) - \int 1 \, dx \\\ = x \ln(x) - x + C \] Check: Differentiate \( x \ln(x) - x + C \) and see that you obtain \( \ln(x) \) which is the integrand in the given integral. This is a way to check the answer to indefinite integrals evaluation.

Example 2

Evaluate the integral \[ \int \ln(2x + 1) \, dx \] Solution to Example 2:
Substitution: Let \( u = 2x + 1 \) which leads to \( \dfrac{du}{dx} = 2 \) or \( du = 2 \, dx \) or \( dx = \dfrac{du}{2} \), the above integral becomes \[ \int \ln(2x + 1) \, dx = \dfrac{1}{2} \int \ln(u) \, du \]
We now use integral formulas for \( \ln(x) \) (found in example 1) function to obtain \[ \int \ln(2x + 1) \, dx = \dfrac{1}{2} \int \ln(u) \, du = \dfrac{1}{2} [u \ln(u) - u] + C \] We now substitute \( u \) by \( 2x + 1 \) into the above to obtain \[ \int \ln(2x + 1) \, dx = \dfrac{1}{2}(2x + 1) \ln(2x + 1) - \dfrac{1}{2}(2x + 1) + C \] \[ = \dfrac{1}{2}(2x + 1) \ln(2x + 1) - x - \dfrac{1}{2} + C \] \[ = \dfrac{1}{2}(2x + 1) \ln(2x + 1) - x + K \] where \( K = C - \dfrac{1}{2} \) and is a constant.
Check: Differentiate \( \dfrac{1}{2}(2x + 1) \ln(2x + 1) - x + K \) and see that you obtain \( \ln(2x + 1) \) which is the integrand in the given integral. This is a way to check the answer to indefinite integrals evaluation.

Example 3

Evaluate the integral \[ \int x \ln x \, dx \] Solution to Example 3:
Let \( f(x) = \ln x \) and \( g'(x) = x \) which gives \( f'(x) = \dfrac{1}{x} \) and \( g(x) = \dfrac{x^2}{2} \).
Using the integration by parts \[ \int f(x) g'(x) \, dx = f(x) g(x) - \int f'(x) g(x) \, dx \] , we obtain \[ \int x \ln x \, dx = \left[ \dfrac{x^2}{2} \ln x - \int \dfrac{x^2}{2} \cdot \dfrac{1}{x} \, dx \right] \] \[ = \dfrac{x^2}{2} \ln x - \int \dfrac{x}{2} \, dx \] \[ = \dfrac{x^2}{2} \ln x - \dfrac{x^2}{4} + C \].
Practice: Differentiate \( \dfrac{x^2}{2} \ln x - \dfrac{x^2}{4} + C \) to obtain the integrand \( x \ln x \) in the given integral.

Example 4

Evaluate the integral \[ \int \dfrac{\ln(x)}{x} \, dx \] Solution to Example 4:
Let \( u = \ln x \) so that \( \dfrac{du}{dx} = \dfrac{1}{x} \); after substitution, the given integral can be written as \[ \int \dfrac{\ln(x)}{x} \, dx = \int u \, du \] Integrate to obtain \[ \dfrac{u^2}{2} + C \] Substitute \( u \) by \( \ln x \) \[ = \left[\ln x\right]^2 / 2 + C \] As an exercise, check the final answer by differentiation.


Exercises

Evaluate the following integral.

1. \( \displaystyle \int x^3 \ln x \, dx \)
2. \( \displaystyle \int (x - \ln x) \, dx \)

Answers to Above Exercises

1. \( x^4 \ln x / 4 - x^4 / 16 + C \)
2. \( -x \ln x + x^2 / 2 + x + C \)

More references and Links