AP Calculus BC

Integral of x^2 ln x: Why ln x Should Be u

The integral of x squared times ln x is x cubed ln x over 3, minus x cubed over 9, plus C. Integration by parts is the technique, and ln x is the choice that finishes in one pass: it differentiates to 1/x, which cancels most of the leftover polynomial.

x2lnxdx=x3lnx3x39+C\int x^{2}\ln x\,dx = \frac{x^{3}\ln x}{3} - \frac{x^{3}}{9} + C

Choosing u and dv

Integration by parts needs the product x2lnxx^{2}\ln x split into uu and dvdv. LIATE ranks the logarithm ahead of the algebraic factor, so u=lnxu = \ln x and dv=x2dxdv = x^{2}\,dx.

That gives du=1xdxdu = \frac{1}{x}\,dx and v=x33v = \frac{x^{3}}{3}.

x2lnxdx=x3lnx3x331xdx\int x^{2}\ln x\,dx = \frac{x^{3}\ln x}{3} - \int \frac{x^{3}}{3}\cdot\frac{1}{x}\,dx
=x3lnx313x2dx=x3lnx3x39+C= \frac{x^{3}\ln x}{3} - \frac{1}{3}\int x^{2}\,dx = \frac{x^{3}\ln x}{3} - \frac{x^{3}}{9} + C

The leftover integral is a plain power, which is the whole reason for that choice. Differentiating lnx\ln x removed the logarithm from the problem, and the 1x\frac{1}{x} it produced cancelled a power off x3x^{3}.

Compare it with x^2 e^x

In x2exdx\int x^{2}e^{x}\,dx the polynomial is uu, because differentiating x2x^{2} grinds it down while exe^{x} integrates back to itself. The ranking flips here for one reason: lnx\ln x is the factor you do not want to integrate, and it is the factor that gets simpler when differentiated.

So the rule underneath both problems is the same. Take as uu whichever factor improves under differentiation, and as dvdv whichever factor you can antidifferentiate on sight. Whenever lnx\ln x sits in a product, it wins the uu slot.

Count the passes

x^2 ln x needs parts once. x^2 e^x needs parts twice, because the polynomial has to be differentiated down to a constant. If your choice of u leads to a second pass here, you chose the slower u.

The mistakes students make

Two of these three give answers that differentiate to something visibly close to x2lnxx^{2}\ln x, which is why they survive a quick glance.

  • Setting u=x2u = x^{2} and dv=lnxdxdv = \ln x\,dx. That needs lnxdx=xlnxx\int\ln x\,dx = x\ln x - x before the first line can be written, and the leftover integral 2x(xlnxx)dx\int 2x\left(x\ln x - x\right)dx reproduces the original integral, so you have to solve a circular equation instead of finishing in one line.
  • Dropping the 1x\frac{1}{x} from dudu, which turns the second integral into x33dx\int\frac{x^{3}}{3}\,dx and produces x3lnx3x412\frac{x^{3}\ln x}{3} - \frac{x^{4}}{12}.
  • Stopping at x3lnx3x33\frac{x^{3}\ln x}{3} - \frac{x^{3}}{3}. Integrating x2x^{2} contributes a second factor of 13\frac{1}{3}, so the denominator of the last term is 99.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of x^2 ln x?

It is x3lnx3x39+C\frac{x^{3}\ln x}{3} - \frac{x^{3}}{9} + C, valid for x>0x > 0 since lnx\ln x is undefined otherwise.

Why is u = ln x and not x^2?

Because lnx\ln x has no antiderivative you would want as vv, and differentiating it gives 1x\frac{1}{x}, which reduces the leftover integral to x2dx\int x^{2}\,dx.

Does x^2 ln x need integration by parts twice?

No. One pass removes the logarithm completely. The two-pass version of this shape is x2exdx\int x^{2}e^{x}\,dx, where the polynomial is uu.