Tutorials › Calculus II › Power-Weighted Logarithm Integrals

Integration by Parts I · Tutorial 35 of 998

Power-Weighted Logarithm Integrals

Use integration by parts to integrate \(x^p\ln x\), and distinguish the general formula from the special case \(p=-1\).

Beginner 9 min read

What You'll Learn

  • State the domain and exponent conditions for the power-weighted logarithm formula
  • Derive the formula using integration by parts
  • Evaluate the antiderivative for positive, fractional, and negative exponents
  • Handle the exceptional exponent \(p=-1\) separately
  • Check an antiderivative by differentiating it
  • Identify and correct the error of substituting \(p=-1\) into the general formula

Why the Exponent Matters

Integrals of the form \(x^p\ln x\) combine a power with a logarithm. Integration by parts is a natural method: differentiating \(\ln x\) removes the logarithm, while integrating the power is straightforward except at one exponent. That exception, \(p=-1\), changes the form of the answer and must be handled separately.

Here \(p\) is a fixed real number and the variable satisfies \(x>0\). The positivity condition matters: it gives \(\ln x\) its real-valued domain and defines \(x^p\) for arbitrary real \(p\).

Definition: For a fixed real exponent \(p\), a power-weighted logarithm integral is an integral with integrand \(x^p\ln x\), considered on \(x>0\). The logarithm \(\ln x\) is the natural logarithm.

The General Formula

When \(p\ne -1\), the power rule gives an antiderivative of \(x^p\) as \(x^{p+1}/(p+1)\). Applying integration by parts with \(u=\ln x\) and \(dv=x^p\,dx\) yields the formula.

Theorem: For \(x>0\) and a fixed real number \(p\ne -1\),
$$ \int x^p\ln x\,dx = \frac{x^{p+1}\ln x}{p+1} - \frac{x^{p+1}}{(p+1)^2} +C. $$

The constant \(C\) is arbitrary. The condition \(p\ne -1\) is essential: the displayed expression contains \(p+1\) in its denominators. It is not a formula that can be used by simply substituting \(p=-1\).

Why the Formula Works

The integration-by-parts formula for indefinite integrals is \(\int u\,dv=uv-\int v\,du\), where \(v\) is an antiderivative of \(dv\). For this integrand, choose \(u=\ln x\) and \(dv=x^p\,dx\). Since \(x>0\), the derivative of \(\ln x\) is \(1/x\). Since \(p\ne -1\), an antiderivative of \(x^p\) is \(x^{p+1}/(p+1)\). Thus \(du=dx/x\) and \(v=x^{p+1}/(p+1)\).

Substituting those choices into the rule gives

$$ \begin{aligned} \int x^p\ln x\,dx &=\frac{x^{p+1}\ln x}{p+1} -\int \frac{x^{p+1}}{p+1}\frac{1}{x}\,dx\\ &=\frac{x^{p+1}\ln x}{p+1} -\frac{1}{p+1}\int x^p\,dx\\ &=\frac{x^{p+1}\ln x}{p+1} -\frac{x^{p+1}}{(p+1)^2}+C. \end{aligned} $$

In the second line, \(x^{p+1}/x=x^p\). In the final line, the power rule applies again because \(p\ne-1\). This derives the claimed expression, rather than relying on a pattern from individual examples.

It is also useful to verify the expression directly. Differentiating its nonconstant part gives

$$ \begin{aligned} \frac{d}{dx}\left( \frac{x^{p+1}\ln x}{p+1} -\frac{x^{p+1}}{(p+1)^2} \right) &=\frac{(p+1)x^p\ln x+x^{p+1}/x}{p+1} -\frac{(p+1)x^p}{(p+1)^2}\\ &=x^p\ln x+\frac{x^p}{p+1} -\frac{x^p}{p+1}\\ &=x^p\ln x. \end{aligned} $$

The extra terms cancel, leaving exactly the original integrand. This check also confirms both the sign and the squared denominator in the formula.

Worked Examples

Worked Example: A Positive Integer Exponent

Evaluate \(\int x^2\ln x\,dx\) for \(x>0\). Here \(p=2\), so \(p+1=3\), and \(p\ne-1\). Substituting into the general formula gives

$$ \begin{aligned} \int x^2\ln x\,dx &=\frac{x^{2+1}\ln x}{2+1} -\frac{x^{2+1}}{(2+1)^2}+C\\ &=\frac{x^3\ln x}{3}-\frac{x^3}{9}+C. \end{aligned} $$

To check, differentiate each term:

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

The derivative is the original integrand, so the antiderivative is correct.

Worked Example: A Fractional Exponent

Evaluate \(\int \sqrt{x}\ln x\,dx\) on \(x>0\). Write \(\sqrt{x}=x^{1/2}\), so \(p=1/2\) and \(p+1=3/2\). The reciprocal of \(3/2\) is \(2/3\), and the reciprocal of \((3/2)^2=9/4\) is \(4/9\). Therefore

$$ \begin{aligned} \int \sqrt{x}\ln x\,dx &=\frac{x^{3/2}\ln x}{3/2} -\frac{x^{3/2}}{(3/2)^2}+C\\ &=\frac{2}{3}x^{3/2}\ln x-\frac{4}{9}x^{3/2}+C. \end{aligned} $$

Differentiate the result to verify it:

$$ \begin{aligned} \frac{d}{dx}\left(\frac{2}{3}x^{3/2}\ln x-\frac{4}{9}x^{3/2}\right) &=\frac{2}{3}\left(\frac{3}{2}x^{1/2}\ln x+x^{3/2}\frac{1}{x}\right) -\frac{4}{9}\left(\frac{3}{2}x^{1/2}\right)\\ &=x^{1/2}\ln x+\frac{2}{3}x^{1/2}-\frac{2}{3}x^{1/2}\\ &=\sqrt{x}\ln x. \end{aligned} $$

The calculation uses \(x^{3/2}/x=x^{1/2}\), valid for \(x>0\). The two nonlogarithmic terms cancel as required.

Worked Example: A Negative Exponent Other Than \(-1\)

Evaluate \(\int x^{-2}\ln x\,dx\) on \(x>0\). Here \(p=-2\), so \(p+1=-1\), which is nonzero. The general formula still applies:

$$ \begin{aligned} \int x^{-2}\ln x\,dx &=\frac{x^{-1}\ln x}{-1}-\frac{x^{-1}}{(-1)^2}+C\\ &=-\frac{\ln x}{x}-\frac{1}{x}+C. \end{aligned} $$

Differentiate the expression. Using the product rule on \(-x^{-1}\ln x\) gives

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

This verifies the result. A negative exponent is not automatically exceptional: only \(p=-1\) makes the power-rule denominator \(p+1\) equal to zero.

The Exceptional Exponent \(p=-1\)

When \(p=-1\), the integrand becomes \(\ln x/x\). The antiderivative of \(x^{-1}\) is not given by the usual power rule: it is \(\ln x\) on \(x>0\). Applying integration by parts with \(u=\ln x\) and \(dv=dx/x\) gives \(du=dx/x\) and \(v=\ln x\).

Theorem: For \(x>0\),
$$ \int \frac{\ln x}{x}\,dx = \frac{(\ln x)^2}{2}+C. $$

Indeed, the integration-by-parts calculation is

$$ \begin{aligned} \int \frac{\ln x}{x}\,dx &=(\ln x)(\ln x)-\int \ln x\,\frac{1}{x}\,dx\\ &=(\ln x)^2-\int \frac{\ln x}{x}\,dx. \end{aligned} $$

Adding the integral on the right to both sides gives twice the integral equal to \((\ln x)^2\), so division by \(2\) gives the stated antiderivative, up to an arbitrary constant. A direct derivative check confirms it:

$$ \frac{d}{dx}\left(\frac{(\ln x)^2}{2}\right) =\frac{1}{2}\cdot 2\ln x\cdot\frac{1}{x} =\frac{\ln x}{x}. $$

Worked Example: The Special Case

Evaluate \(\int x^{-1}\ln x\,dx\) for \(x>0\). Since \(x^{-1}=1/x\), use the special formula:

$$ \int x^{-1}\ln x\,dx =\int \frac{\ln x}{x}\,dx =\frac{(\ln x)^2}{2}+C. $$

For the check, differentiate the proposed answer:

$$ \frac{d}{dx}\left(\frac{(\ln x)^2}{2}+C\right) =\frac{1}{2}\cdot 2\ln x\cdot \frac{1}{x}+0 =\frac{\ln x}{x} =x^{-1}\ln x. $$

The derivative reproduces the integrand, including its factor \(x^{-1}\).

A Common Mistake: Using the General Formula at \(p=-1\)

A tempting but invalid step is to substitute \(p=-1\) into the general formula. That produces denominators \(p+1=0\) and \((p+1)^2=0\), so the expression is undefined. It does not give an antiderivative.

For example, writing \(x^{p+1}\ln x/(p+1)-x^{p+1}/(p+1)^2\) and then setting \(p=-1\) results in division by zero. The correction is to recognize that the power integral changes at this exponent: \(\int x^{-1}\,dx=\ln x+C\), and then use integration by parts or the separate formula to obtain \((\ln x)^2/2+C\).

Takeaway: First check whether \(p=-1\). If \(p\ne-1\), use the power-weighted logarithm formula. If \(p=-1\), integrate \(\ln x/x\) as \((\ln x)^2/2+C\).

Choosing and Checking the Method

For an integral of this form, the key decision is the exponent, not whether the exponent is positive, negative, or fractional. If \(p\ne-1\), integration by parts reduces the logarithm-weighted integral to the power integral \(\int x^p\,dx\), which is elementary under precisely that condition. If \(p=-1\), the integrand is \(\ln x/x\), whose antiderivative follows from the chain rule applied to \((\ln x)^2/2\).

In either case, differentiation is a reliable final check. For the general expression, the product rule creates one \(x^p/(p+1)\) term, and differentiating the second term creates the same quantity with the opposite sign. For the special expression, the chain rule gives \(\ln x/x\) directly. These checks are especially useful because errors in the sign or the power of \(p+1\) can leave an answer looking plausible while its derivative is wrong.

The condition \(x>0\) should remain in view throughout. It ensures that \(\ln x\) and the real power \(x^p\) are defined as used here, and that the derivative \(d(\ln x)/dx=1/x\) applies on the domain. The formulas describe antiderivatives on this positive domain.

Check Your Understanding

Try each question, paying particular attention to the exponent condition and the derivative check.

  1. For which real values of \(p\) does the general formula for \(\int x^p\ln x\,dx\) apply?
  2. Use the general formula to find \(\int x^4\ln x\,dx\), and verify the answer by differentiation.
  3. Evaluate \(\int x^{-3}\ln x\,dx\). Explain why this exponent is allowed in the general formula.
  4. Find \(\int \ln x/x\,dx\) and verify it by differentiation.
  5. What fails if \(p=-1\) is substituted into the general formula?

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