Why introduce a recurrence?
An integral such as \(\int x^m(\ln x)^n\,dx\) combines a power of \(x\) with a power of its logarithm. When \(n\) is a positive integer, integration by parts can lower the logarithm power by one. That creates a useful recurrence: instead of integrating the full expression in one step, we relate it to an integral of the same type with a smaller exponent.
The parameter \(m\) can be any fixed real number except \(-1\). The excluded value matters because the antiderivative of \(x^m\) used in integration by parts has a different form when \(m=-1\). Throughout, the logarithm is the natural logarithm and \(x>0\), its real domain.
The recurrence and its base case
Set \(a=m+1\), so \(a\ne0\). For \(n\ge1\), choose \(u=(\ln x)^n\) and \(dv=x^m\,dx\) in integration by parts. Then \(du=n(\ln x)^{n-1}\frac{1}{x}\,dx\) and \(v=\frac{x^{m+1}}{m+1}=\frac{x^a}{a}\). Substitution gives the reduction formula.
The recurrence reduces \(n\), not \(m\): the weight \(x^m\) remains unchanged, while the logarithm power drops from \(n\) to \(n-1\). The coefficient \(n\) comes from differentiating \((\ln x)^n\); the denominator \(m+1\) comes from integrating \(x^m\).
For a precise recursive calculation, one can select particular antiderivatives \(F_n\) by setting \(F_0=x^{m+1}/(m+1)\) and then defining \(F_n\) from the right-hand side of the recurrence using \(F_{n-1}\). This fixes the constants consistently. If the expressions are written with indefinite-integral signs instead, the equality is understood up to an additive constant.
Why the method works
Integration by parts follows from the product rule. If \(u\) and \(v\) are differentiable, then \((uv)'=u'v+uv'\). Integrating both sides and rearranging yields \(\int u\,dv=uv-\int v\,du\), with an additive constant for indefinite integrals. Here, the logarithmic factor is chosen as \(u\) because its derivative lowers its power; the power of \(x\) is chosen as \(dv\) because it has a simple antiderivative when \(m\ne-1\).
Let \(u=(\ln x)^n\) and \(dv=x^m\,dx\).
Then \(du=n(\ln x)^{n-1}x^{-1}\,dx\) and \(v=x^{m+1}/(m+1)\).
The remaining product \(v\,du\) is \(\frac{n}{m+1}x^m(\ln x)^{n-1}\,dx\), giving the stated recurrence.
The calculation also proves the recurrence directly: substituting the specified \(u\), \(v\), and \(du\) into \(\int u\,dv=uv-\int v\,du\) gives exactly the displayed expression. The assumptions ensure the steps are valid on \(x>0\): \(\ln x\) is differentiable there, \(x^m\) has antiderivative \(x^{m+1}/(m+1)\) for \(m\ne-1\), and the logarithmic exponent is a nonnegative integer.
Worked examples
Worked Example: A quadratic logarithm with \(m=2\)
Evaluate \(\int x^2(\ln x)^2\,dx\). Here \(a=m+1=3\). Start with \(F_0=x^3/3\), then apply the recurrence at each level.
For \(n=2\), the recurrence gives
Check by differentiating. Write \(L=\ln x\) and \(Q(L)=\frac13L^2-\frac29L+\frac{2}{27}\), so \(F_2=x^3Q(L)\). Since \(L'=1/x\),
Worked Example: A third power of the logarithm with \(m=0\)
Evaluate \(\int(\ln x)^3\,dx\). Now \(a=1\), and the base case is \(F_0=x\). Use the recurrence successively for \(n=1,2,3\):
For the check, let \(P(L)=L^3-3L^2+6L-6\). Differentiating \(xP(\ln x)\) gives \(P(\ln x)+P'(\ln x)\), because \((\ln x)'=1/x\). In this case,
Therefore \(F_3'=(\ln x)^3\), as required.
Worked Example: A negative real exponent with \(m=-2\)
Evaluate \(\int x^{-2}(\ln x)^2\,dx\). This value of \(m\) is allowed: it is real and not \(-1\). Here \(a=m+1=-1\), so \(F_0=-x^{-1}\). The first reduction is
For the second reduction,
To check, write \(L=\ln x\) and \(R(L)=L^2+2L+2\). Then \(F_2=-x^{-1}R(L)\), so
Repeated reduction and the finite expansion
After \(n\) applications, the recurrence ends at the base case. To see the pattern, write \(a=m+1\). Each application contributes a new term with one fewer power of \(\ln x\); the remaining integral is multiplied by the next factor from the decreasing exponent \(n,n-1,\ldots\). The resulting finite expression is
For \(n=0\), the sum has just the \(k=0\) term and gives \(x^a/a\), matching the base case. For \(n\ge1\), the first term of the sum is \(x^a(\ln x)^n/a\). The remaining terms equal \(-n/a\) times the corresponding sum for \(n-1\): replacing \(k\) by \(j+1\) in those terms gives the coefficient \(-\frac{n}{a}\frac{(-1)^j(n-1)!}{(n-1-j)!a^j}\). Thus the finite expression satisfies the recurrence and the base case. This verifies the expansion.
The expansion is often a convenient way to write the final result, but the recurrence is the main working tool: it tells you how to build the answer one step at a time and makes the source of every term visible.
Common sign error and the exceptional exponent
A frequent mistake is to lose the minus sign in integration by parts. For instance, with \(m=0\) and \(n=1\), an incorrect calculation might write
The integration-by-parts formula is \(uv-\int v\,du\), not \(uv+\int v\,du\). The correction is
Differentiating the incorrect expression gives \(\ln x+2\), not \(\ln x\); differentiating the corrected expression gives \(\ln x+1-1=\ln x\). A derivative check catches the sign error immediately.
The condition \(m\ne-1\) is essential to this particular recurrence. If \(m=-1\), then integrating \(x^m=x^{-1}\) gives \(\ln x\), not \(x^{m+1}/(m+1)\); the denominator \(m+1\) would be zero. Do not substitute \(m=-1\) into the formula. That exceptional integrand requires a different approach.
Using the recurrence reliably
For a new integral in this family, first verify \(x>0\), identify the fixed value of \(m\), and check that \(m\ne-1\). Then identify the nonnegative integer \(n\). Begin with the base integral and reduce the logarithm power one level at a time, carefully keeping the factor \(-n/(m+1)\) at each step. Finally, differentiate the proposed antiderivative and compare the result with the original integrand.
The recurrence is useful precisely because it replaces a higher logarithmic power with a lower one while preserving the same weight. It turns a sequence of increasingly complicated-looking integrals into a finite, organized calculation.
Check Your Understanding
Try each question using the recurrence, and check any proposed antiderivative by differentiating it.
- For which real values of \(m\) does this recurrence apply, and what restriction is placed on \(x\)?
- Write the reduction formula for \(\int x^m(\ln x)^4\,dx\).
- Starting from the base case, use the recurrence to find a particular antiderivative of \(x(\ln x)\).
- Why does the displayed formula not apply when \(m=-1\)?
- Differentiate your answer to question 3 and verify that it returns the original integrand.