Tutorials › Calculus II › Recurrences for Weighted Logarithmic Powers

Reduction Formulas · Tutorial 79 of 998

Recurrences for Weighted Logarithmic Powers

Learn how integration by parts reduces the logarithm power and how to use and verify the resulting recurrence.

Intermediate 9 min read

What You'll Learn

  • State the domain and parameter conditions for the weighted logarithmic-power recurrence.
  • Derive the recurrence by integration by parts.
  • Identify the base case and handle additive constants consistently.
  • Apply the recurrence to several exact examples.
  • Expand the recurrence into a finite formula and check answers by differentiation.
  • Recognize why the method does not apply when the power of \(x\) is \(-1\).

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.

Definition: Fix \(m\in\mathbb R\) with \(m\ne-1\). For each nonnegative integer \(n\), let \(I_n\) denote an antiderivative of \(x^m(\ln x)^n\) on \(x>0\). Thus \(I_n'(x)=x^m(\ln x)^n\). Antiderivatives are determined up to an additive constant.

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.

Theorem: For \(m\ne-1\), \(x>0\), and each integer \(n\ge1\),
$$ \int x^m(\ln x)^n\,dx = \frac{x^{m+1}}{m+1}(\ln x)^n - \frac{n}{m+1}\int x^m(\ln x)^{n-1}\,dx. $$
The starting case is
$$ \int x^m\,dx=\frac{x^{m+1}}{m+1}+C. $$

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\).

1
Choose the factors.
Let \(u=(\ln x)^n\) and \(dv=x^m\,dx\).
2
Differentiate and integrate.
Then \(du=n(\ln x)^{n-1}x^{-1}\,dx\) and \(v=x^{m+1}/(m+1)\).
3
Apply integration by parts.
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.

$$ F_1 = \frac{x^3}{3}\ln x-\frac{1}{3}F_0 = \frac{x^3}{3}\ln x-\frac{x^3}{9}. $$

For \(n=2\), the recurrence gives

$$ \begin{aligned} F_2 &=\frac{x^3}{3}(\ln x)^2-\frac{2}{3}F_1\\ &=\frac{x^3}{3}(\ln x)^2 -\frac{2}{3}\left(\frac{x^3}{3}\ln x-\frac{x^3}{9}\right)\\ &=\frac{x^3}{3}(\ln x)^2-\frac{2x^3}{9}\ln x+\frac{2x^3}{27}. \end{aligned} $$

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\),

$$ \begin{aligned} F_2' &=x^2\bigl(3Q(L)+Q'(L)\bigr)\\ &=x^2\left(L^2-\frac23L+\frac29+\frac23L-\frac29\right)\\ &=x^2(\ln x)^2. \end{aligned} $$

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\):

$$ \begin{aligned} F_1&=x\ln x-F_0=x\ln x-x,\\ F_2&=x(\ln x)^2-2F_1 =x(\ln x)^2-2x\ln x+2x,\\ F_3&=x(\ln x)^3-3F_2\\ &=x(\ln x)^3-3x(\ln x)^2+6x\ln x-6x. \end{aligned} $$

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,

$$ P(L)+P'(L) = (L^3-3L^2+6L-6)+(3L^2-6L+6) = L^3. $$

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

$$ F_1 = -\frac{\ln x}{x} -\frac{1}{-1}F_0 = -\frac{\ln x}{x}-\frac{1}{x}. $$

For the second reduction,

$$ \begin{aligned} F_2 &=-\frac{(\ln x)^2}{x}-\frac{2}{-1}F_1\\ &=-\frac{(\ln x)^2}{x}+2\left(-\frac{\ln x}{x}-\frac{1}{x}\right)\\ &=-\frac{(\ln x)^2+2\ln x+2}{x}. \end{aligned} $$

To check, write \(L=\ln x\) and \(R(L)=L^2+2L+2\). Then \(F_2=-x^{-1}R(L)\), so

$$ \begin{aligned} F_2' &=x^{-2}R(L)-x^{-2}R'(L)\\ &=x^{-2}\bigl((L^2+2L+2)-(2L+2)\bigr)\\ &=x^{-2}(\ln x)^2. \end{aligned} $$

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

Result: For every nonnegative integer \(n\), one particular antiderivative is
$$ F_n(x) = \frac{x^a}{a} \sum_{k=0}^{n} \frac{(-1)^k n!}{(n-k)!a^k}(\ln x)^{n-k}, \qquad a=m+1\ne0. $$
Every antiderivative is \(F_n(x)+C\).

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

$$ \int\ln x\,dx \overset{\text{wrong}}{=}x\ln x+\int 1\,dx =x\ln x+x. $$

The integration-by-parts formula is \(uv-\int v\,du\), not \(uv+\int v\,du\). The correction is

$$ \int\ln x\,dx=x\ln x-\int 1\,dx=x\ln x-x+C. $$

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.

  1. For which real values of \(m\) does this recurrence apply, and what restriction is placed on \(x\)?
  2. Write the reduction formula for \(\int x^m(\ln x)^4\,dx\).
  3. Starting from the base case, use the recurrence to find a particular antiderivative of \(x(\ln x)\).
  4. Why does the displayed formula not apply when \(m=-1\)?
  5. Differentiate your answer to question 3 and verify that it returns the original integrand.

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