Tutorials › Calculus II › Evaluating Indefinite Logarithmic Powers

Reduction Formulas · Tutorial 78 of 998

Evaluating Indefinite Logarithmic Powers

Apply the logarithmic-power recurrence through n = 4 and check each antiderivative by differentiating it.

Intermediate 8 min read

What You'll Learn

  • State the recurrence for the antiderivative of (ln x)^n on x > 0.
  • Use the base case to evaluate powers from n = 1 through n = 4.
  • Write each result as x times a polynomial in ln x.
  • Keep track of signs and coefficients at each reduction step.
  • Verify an antiderivative by differentiating its polynomial form.

From the Recurrence to Explicit Antiderivatives

Repeated integration by parts reduces an integral containing a power of \(\ln x\) to one with a lower power. The recurrence is especially useful when the exponent is a small positive integer: instead of repeating integration by parts from scratch, we can calculate each antiderivative from the one before it.

In this tutorial, \(x\) is positive, so \(\ln x\) is defined. We will evaluate the integrals through the fourth power and write each answer as \(x\) times a polynomial in \(\ln x\). The constant of integration is included in each final answer.

Definition: For each nonnegative integer \(n\), let \(I_n\) denote an antiderivative of \((\ln x)^n\) on \(x>0\). Thus \(I_n'(x)=(\ln x)^n\). We use \(I_0=x\) as a convenient choice of antiderivative for the base case. Each indefinite integral is then given by the chosen \(I_n\) plus an arbitrary constant.

The Recurrence and Its Basis

For a positive integer \(n\), integration by parts gives the recurrence. Choose \(u=(\ln x)^n\) and \(dv=dx\). Then \(du=n(\ln x)^{n-1}\frac{1}{x}\,dx\) and \(v=x\). Substituting these into \(\int u\,dv=uv-\int v\,du\) gives

$$ I_n=x(\ln x)^n-nI_{n-1},\qquad n\ge 1,\quad x>0. $$

This equation is a statement about selected antiderivatives. Adding a constant to an antiderivative changes the constant in the recurrence, but not the family of antiderivatives represented by the formula. To keep the calculations clear, we choose the representatives recursively, beginning with \(I_0=x\), and add \(+C\) to the final indefinite integral.

The recurrence works because integration by parts transfers one factor of \(\ln x\) into a lower power: differentiating \((\ln x)^n\) produces \(n(\ln x)^{n-1}/x\), and multiplying by \(v=x\) cancels the denominator. This is what makes the remaining integral another logarithmic power integral, rather than a different type of integral.

Recurrence rule: Start with \(I_0=x\). For each positive integer \(n\), calculate \(I_n=x(\ln x)^n-nI_{n-1}\). The resulting antiderivative for \(\int(\ln x)^n\,dx\) is \(I_n+C\), where \(C\) is an arbitrary constant.

Worked Examples Through the First Two Powers

Worked Example: The First Power of \(\ln x\)

Use the base case \(I_0=x\) and the recurrence with \(n=1\):

$$ \begin{aligned} I_1 &=x\ln x-I_0\\ &=x\ln x-x. \end{aligned} $$

Therefore, an antiderivative is \(x\ln x-x+C\). To check it, differentiate term by term. Since \(\frac{d}{dx}(x\ln x)=\ln x+1\), we obtain

$$ \frac{d}{dx}(x\ln x-x+C) =(\ln x+1)-1 =\ln x. $$

The derivative matches the integrand, so the result is verified.

Worked Example: The Square of \(\ln x\)

Use the recurrence with \(n=2\), substituting the already calculated \(I_1\):

$$ \begin{aligned} I_2 &=x(\ln x)^2-2I_1\\ &=x(\ln x)^2-2(x\ln x-x)\\ &=x(\ln x)^2-2x\ln x+2x\\ &=x\big((\ln x)^2-2\ln x+2\big). \end{aligned} $$

Thus the indefinite integral is \(x\big((\ln x)^2-2\ln x+2\big)+C\). For the check, set \(L=\ln x\), so \(\frac{dL}{dx}=\frac1x\). Differentiating \(x(L^2-2L+2)\) by the product rule gives

$$ \begin{aligned} \frac{d}{dx}\left[x(L^2-2L+2)\right] &=(L^2-2L+2)+x(2L-2)\frac1x\\ &=L^2-2L+2+2L-2\\ &=L^2\\ &=(\ln x)^2. \end{aligned} $$

This confirms that the polynomial factor has the correct coefficients and signs.

Continuing the Reduction

Each application of the recurrence uses the previous antiderivative. It is helpful to keep the entire expression inside parentheses when writing the result as \(x\) times a polynomial. This makes the coefficients visible and helps prevent a factor of \(x\) from being lost during simplification.

Worked Example: The Cube of \(\ln x\)

For \(n=3\), the recurrence is \(I_3=x(\ln x)^3-3I_2\). Substitute the full expression for \(I_2\):

$$ \begin{aligned} I_3 &=x(\ln x)^3-3x\big((\ln x)^2-2\ln x+2\big)\\ &=x(\ln x)^3-3x(\ln x)^2+6x\ln x-6x\\ &=x\big((\ln x)^3-3(\ln x)^2+6\ln x-6\big). \end{aligned} $$

Thus \(\int(\ln x)^3\,dx=x\big((\ln x)^3-3(\ln x)^2+6\ln x-6\big)+C\). To verify, again write \(L=\ln x\). The polynomial is \(P(L)=L^3-3L^2+6L-6\), with derivative \(P'(L)=3L^2-6L+6\). By the product rule and chain rule,

$$ \begin{aligned} \frac{d}{dx}\left[xP(L)\right] &=P(L)+xP'(L)\frac1x\\ &=L^3-3L^2+6L-6+3L^2-6L+6\\ &=L^3\\ &=(\ln x)^3. \end{aligned} $$

The terms of degrees two, one, and zero cancel, leaving exactly the required third power.

Worked Example: The Fourth Power of \(\ln x\)

For \(n=4\), use \(I_4=x(\ln x)^4-4I_3\). Substituting the entire expression for \(I_3\) gives

$$ \begin{aligned} I_4 &=x(\ln x)^4-4x\big((\ln x)^3-3(\ln x)^2+6\ln x-6\big)\\ &=x(\ln x)^4-4x(\ln x)^3+12x(\ln x)^2-24x\ln x+24x\\ &=x\big((\ln x)^4-4(\ln x)^3+12(\ln x)^2-24\ln x+24\big). \end{aligned} $$

Therefore, \(\int(\ln x)^4\,dx=x\big((\ln x)^4-4(\ln x)^3+12(\ln x)^2-24\ln x+24\big)+C\). To check it, let \(P(L)=L^4-4L^3+12L^2-24L+24\). Then \(P'(L)=4L^3-12L^2+24L-24\). Differentiating the product and applying \(\frac{dL}{dx}=\frac1x\) yields

$$ \begin{aligned} \frac{d}{dx}[xP(L)] &=P(L)+P'(L)\\ &=L^4-4L^3+12L^2-24L+24\\ &\qquad{}+4L^3-12L^2+24L-24\\ &=L^4\\ &=(\ln x)^4. \end{aligned} $$

All lower-degree terms cancel, confirming the fourth-power antiderivative.

A Compact Record of the Results

The recurrence gives the following antiderivatives. The constant \(C\) is arbitrary and may differ from one line to another.

IntegrandAntiderivative
\(1\)\(x+C\)
\(\ln x\)\(x(\ln x-1)+C\)
\((\ln x)^2\)\(x((\ln x)^2-2\ln x+2)+C\)
\((\ln x)^3\)\(x((\ln x)^3-3(\ln x)^2+6\ln x-6)+C\)
\((\ln x)^4\)\(x((\ln x)^4-4(\ln x)^3+12(\ln x)^2-24\ln x+24)+C\)

For each line, the recurrence determines a specific representative antiderivative; adding \(C\) accounts for all antiderivatives on the interval \(x>0\). The recurrence does not mean that the constant must be carried separately through every intermediate line. It is usually cleaner to calculate the polynomial representative first and attach one arbitrary constant at the end.

Why the Polynomial Form Is Useful

Writing the answer as \(xP(\ln x)\) makes verification systematic. If \(P\) is a polynomial and \(L=\ln x\), then the product and chain rules give

$$ \frac{d}{dx}\big[xP(\ln x)\big] =P(\ln x)+P'(\ln x). $$

The factor \(x\) in the product rule cancels the factor \(1/x\) from differentiating \(\ln x\). In the examples, the coefficients are arranged so that \(P(L)+P'(L)=L^n\). This provides a direct check independent of the integration-by-parts calculations.

The recurrence also explains how to organize the calculation: the new leading term is \(x(\ln x)^n\), and the correction subtracts \(n\) times the preceding polynomial expression. That correction is essential. It supplies the lower powers that cancel when the result is differentiated.

Common Pitfall: Losing the Minus Sign

A frequent error is to change the minus sign in the recurrence into a plus sign. For example, an incorrect calculation for the square might begin \(I_2=x(\ln x)^2+2I_1\). Substituting \(I_1=x\ln x-x\) would produce \(x\big((\ln x)^2+2\ln x-2\big)\), which is not an antiderivative of \((\ln x)^2\). Differentiating that incorrect expression gives

$$ \begin{aligned} \frac{d}{dx}\left[x\big((\ln x)^2+2\ln x-2\big)\right] &=(\ln x)^2+2\ln x-2+2\ln x+2\\ &=(\ln x)^2+4\ln x, \end{aligned} $$

which has an unwanted \(4\ln x\) term. The correct recurrence has a minus sign because integration by parts gives \(uv-\int v\,du\). Using that sign yields the verified expression \(x\big((\ln x)^2-2\ln x+2\big)+C\).

Summary

For \(x>0\), the recurrence \(I_n=x(\ln x)^n-nI_{n-1}\), with \(I_0=x\), evaluates the logarithmic-power integrals one exponent at a time. Through \(n=4\), every result has the form \(x\) times a polynomial in \(\ln x\), plus an arbitrary constant. Substitution into the recurrence gives the coefficients; differentiation checks that the lower powers cancel and that the result is the requested integrand.

Check Your Understanding

Use the recurrence and differentiation checks from this tutorial to answer the following questions.

  1. Starting from \(I_0=x\), calculate \(I_1\) and state the full indefinite integral.
  2. What is the coefficient of \((\ln x)^2\) in the polynomial factor for \(I_4\)?
  3. Differentiate \(x\big((\ln x)^3-3(\ln x)^2+6\ln x-6\big)\) and show which terms cancel.
  4. Why must the recurrence contain a minus sign before \(nI_{n-1}\)?
  5. What role does the arbitrary constant \(C\) play in an indefinite integral?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon