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\).
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.
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
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
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
To check, differentiate each term:
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
Differentiate the result to verify it:
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:
Differentiate the expression. Using the product rule on \(-x^{-1}\ln x\) gives
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\).
Indeed, the integration-by-parts calculation is
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:
Worked Example: The Special Case
Evaluate \(\int x^{-1}\ln x\,dx\) for \(x>0\). Since \(x^{-1}=1/x\), use the special formula:
For the check, differentiate the proposed answer:
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\).
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.
- For which real values of \(p\) does the general formula for \(\int x^p\ln x\,dx\) apply?
- Use the general formula to find \(\int x^4\ln x\,dx\), and verify the answer by differentiation.
- Evaluate \(\int x^{-3}\ln x\,dx\). Explain why this exponent is allowed in the general formula.
- Find \(\int \ln x/x\,dx\) and verify it by differentiation.
- What fails if \(p=-1\) is substituted into the general formula?