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