The Product of a Power and a Logarithm
The integrand \(x\ln x\) combines a simple power with a function whose antiderivative is not obvious at first sight. No substitution rewrites it as a basic integral, so integration by parts is the tool. The key question is which factor to differentiate. The logarithm is the natural choice: its derivative \(1/x\) is algebraic, while the power \(x\) integrates easily by the power rule. Differentiating the logarithm removes it from the integrand entirely.
Throughout this tutorial \(x>0\), because \(\ln x\) is defined only for positive \(x\). All antiderivatives below are valid on the interval \((0,\infty)\).
Deriving the Antiderivative
Let \(u=\ln x\) and \(dv=x\,dx\). Then \(du=\frac{1}{x}\,dx\) and \(v=\frac{x^2}{2}\). The parts formula \(\int u\,dv=uv-\int v\,du\) gives
The integrand in the new integral simplifies: \(\frac{x^2}{2}\cdot\frac1x=\frac{x}{2}\). This is the moment where the logarithm disappears. The remaining integral is a power: \(\int\frac{x}{2}\,dx=\frac{x^2}{4}\). Therefore
The second form factors out \(x^2/4\), which makes it easy to read the sign of the antiderivative and to evaluate it at endpoints. The strategy extends to \(x^n\ln x\) for \(n\ne-1\): the same choice \(u=\ln x\) leaves \(\int \frac{x^n}{n+1}\cdot\frac1x\,dx=\frac{1}{n+1}\int x^{n}\,dx\), which is again a power. The exceptional case \(n=-1\) gives \(\int\frac{\ln x}{x}\,dx\), which is better done by the substitution \(w=\ln x\).
Why the Other Choice Is Worse
Suppose we tried \(u=x\) and \(dv=\ln x\,dx\) instead. We would first need an antiderivative of \(\ln x\), namely \(v=x\ln x-x\), which itself requires integration by parts. The resulting integral \(\int (x\ln x-x)\,dx\) still contains the original problem. The calculation can be made to work, but it is longer and more error-prone. The general rule of thumb is to choose \(u\) as the function that becomes simpler (or disappears) when differentiated, and logarithms and inverse trigonometric functions typically belong in that role.
Worked Examples
Worked Example: A Definite Integral from 1 to e
Evaluate \(\int_1^e x\ln x\,dx\).
Use the antiderivative \(F(x)=\frac{x^2}{2}\ln x-\frac{x^2}{4}\). At \(x=e\), \(\ln e=1\), so \(F(e)=\frac{e^2}{2}-\frac{e^2}{4}=\frac{e^2}{4}\). At \(x=1\), \(\ln 1=0\), so \(F(1)=-\frac14\). Hence
The integrand rises from \(0\) at \(x=1\) to \(e\) at \(x=e\), over an interval of length \(e-1\approx1.72\). An average height near \(1.2\) gives an area near \(2.1\), consistent with the computed value.
Worked Example: A Constant Multiple
Find \(\int 6x\ln x\,dx\) for \(x>0\).
Constants can be pulled out of the integral, so the problem is \(6\) times the basic result:
Differentiate to check: \(\frac{d}{dx}\bigl(3x^2\ln x\bigr)=6x\ln x+3x\), and \(\frac{d}{dx}\bigl(-\tfrac32x^2\bigr)=-3x\). The terms \(3x\) and \(-3x\) cancel, leaving \(6x\ln x\).
Worked Example: A Logarithm of a Power
Find \(\int x\ln(x^3)\,dx\) for \(x>0\).
For \(x>0\), the logarithm rule gives \(\ln(x^3)=3\ln x\). So the integral equals \(3\int x\ln x\,dx\):
Simplifying the integrand first is a good habit. Without it one would apply the chain rule to differentiate \(\ln(x^3)\) as \(\frac{3x^2}{x^3}=\frac3x\), which leads to the same result with more bookkeeping.
Common Mistake: Forgetting to Integrate the Leftover Term
After parts, the new integral is \(\int \frac{x}{2}\,dx\). A common slip is to stop at the simplification and write \(\frac{x}{2}\) as the contribution, giving the incorrect antiderivative \(\frac{x^2}{2}\ln x-\frac{x}{2}\). The factor \(\frac{x}{2}\) is the integrand of the remaining integral, not its value, so one more power-rule step is required.
The wrong answer fails the derivative check at once: \(\frac{d}{dx}\left[\frac{x^2}{2}\ln x-\frac x2\right]=x\ln x+\frac x2-\frac12\), which is not \(x\ln x\). The correct term \(-\frac{x^2}{4}\) differentiates to \(-\frac{x}{2}\), and that cancels the stray \(+\frac{x}{2}\) produced by the product rule on the first term.
Conditions and Interpretation
The antiderivative \(\frac{x^2}{2}\ln x-\frac{x^2}{4}\) is defined for \(x>0\). It also has a limit as \(x\to0^+\): since \(x^2\ln x\to0\), the antiderivative tends to \(0\), which means \(\int_0^b x\ln x\,dx\) converges as an improper integral even though \(\ln x\) is unbounded near zero. For \(x<0\) the expression \(x\ln|x|\) is a different integrand with its own antiderivative, so one should not extend the formula across \(x=0\) without care.
A Reliable Procedure
Problems that combine a logarithm with a power of \(x\) all follow the same plan. Working through the steps in order keeps the algebra short and makes the final check straightforward.
Confirm that the argument of the logarithm is positive on the interval of interest. For \(\ln x\), that means \(x>0\).
Set \(u=\ln x\), so \(du=\frac1x\,dx\). Let \(dv\) be the power of \(x\) that remains.
Use the power rule for \(v\). For \(dv=x\,dx\) this gives \(v=\frac{x^2}{2}\).
Multiply \(v\) by \(\frac1x\). The logarithm has disappeared and a power of \(x\) remains.
Use the power rule again. Then combine the pieces and factor if convenient.
Differentiate the answer. The product rule on the first term must reproduce \(x\ln x\) after the polynomial terms cancel.
Worked Example: Area Under the Curve
Find the area under \(y=x\ln x\) from \(x=1\) to \(x=3\), where the curve lies above the \(x\)-axis.
With \(F(x)=\frac{x^2}{2}\ln x-\frac{x^2}{4}\), we have \(F(3)=\frac92\ln3-\frac94\) and \(F(1)=-\frac14\). The area is
As a reasonableness check, the curve rises from height \(0\) at \(x=1\) to \(3\ln3\approx3.30\) at \(x=3\). The area under a rising curve over a base of length \(2\) is less than the rectangle of height \(3.30\), which has area \(6.6\), and more than the triangle under the chord, which has area \(3.30\), minus the bulge from concavity. A value near \(2.9\) fits the actual shape, which starts very flat and climbs late.
Generalizing to Other Powers
The same method handles \(\int x^n\ln x\,dx\) whenever \(n\ne-1\). With \(u=\ln x\) and \(dv=x^n\,dx\), we get \(v=\frac{x^{n+1}}{n+1}\), and after simplifying \(v\,du=\frac{x^n}{n+1}\,dx\), the final result is
Setting \(n=1\) recovers the formula in this tutorial, since \(\frac{x^2}{2}\ln x-\frac{x^2}{4}\) has denominators \(2\) and \(2^2\). The pattern is easy to remember: the power increases by one, the coefficient of the logarithm is divided by the new exponent, and the polynomial term is divided by the new exponent squared. For example, \(\int x^2\ln x\,dx=\frac{x^3}{3}\ln x-\frac{x^3}{9}+C\).
Quick Reference
| Integrand | Antiderivative | Condition |
|---|---|---|
| \(\ln x\) | \(x\ln x-x\) | \(x>0\) |
| \(x\ln x\) | \(\frac{x^2}{2}\ln x-\frac{x^2}{4}\) | \(x>0\) |
| \(x^2\ln x\) | \(\frac{x^3}{3}\ln x-\frac{x^3}{9}\) | \(x>0\) |
| \(x^n\ln x\) | \(\frac{x^{n+1}}{n+1}\ln x-\frac{x^{n+1}}{(n+1)^2}\) | \(x>0,\ n\ne-1\) |
Where This Fits in the Course
This tutorial belongs to the module “Integration by Parts I”. The tutorial just before it is “Integrating The Natural Logarithm,” and the one that follows is “Power-Weighted Logarithm Integrals.” Both tutorials use the logarithm as the function to differentiate; here the partner is a power of \(x\).
Check Your Understanding
Use the derivation and the examples above to answer these questions.
- Why is \(\ln x\) chosen as \(u\) in \(\int x\ln x\,dx\)?
- Evaluate \(\int_1^4 x\ln x\,dx\) and verify your answer numerically.
- What antiderivative do you obtain for \(\int x^3\ln x\,dx\)? Check it by differentiating.
- Explain why \(\int \frac{\ln x}{x}\,dx\) needs a substitution rather than the power-rule version of this method.
- What error does the expression \(\frac{x^2}{2}\ln x-\frac{x}{2}\) contain?