AP Calculus BC

Integral of x ln x: Answer, Parts Setup, Mistakes

The integral of x ln x with respect to x is (x^2/2) ln x - x^2/4 + C. Integration by parts with u = ln x and dv = x dx gives (x^2/2) ln x minus the integral of x/2, and that leftover integral is elementary. LIATE picks the logarithm as u because differentiating ln x removes the logarithm entirely.

∫xln⁡x dx=x22ln⁡x−x24+C\int x\ln x\,dx = \frac{x^{2}}{2}\ln x - \frac{x^{2}}{4} + C

How to integrate x ln x by parts

The integrand is a product of an algebraic factor and a logarithm, and neither one is the derivative of the other, so substitution has nothing to grip. That combination is the signature of integration by parts.

∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du

Choose u=ln⁡xu = \ln x. Differentiating it gives 1x\frac{1}{x}, which is algebraic, so the logarithm disappears from the problem in one step. That leaves dv=x dxdv = x\,dx and v=x22v = \frac{x^{2}}{2}.

u=ln⁡x,du=1x dx,dv=x dx,v=x22u = \ln x, \quad du = \frac{1}{x}\,dx, \quad dv = x\,dx, \quad v = \frac{x^{2}}{2}

Substituting into the formula, the new integral simplifies before you integrate it, because x22⋅1x\frac{x^{2}}{2}\cdot\frac{1}{x} collapses to x2\frac{x}{2}.

∫xln⁡x dx=x22ln⁡x−∫x22⋅1x dx=x22ln⁡x−∫x2 dx\int x\ln x\,dx = \frac{x^{2}}{2}\ln x - \int \frac{x^{2}}{2}\cdot\frac{1}{x}\,dx = \frac{x^{2}}{2}\ln x - \int \frac{x}{2}\,dx

That remaining integral is the power rule, and it contributes x24\frac{x^{2}}{4}.

∫xln⁡x dx=x22ln⁡x−x24+C\int x\ln x\,dx = \frac{x^{2}}{2}\ln x - \frac{x^{2}}{4} + C

Check it by differentiating

Differentiate x22ln⁡x\frac{x^{2}}{2}\ln x with the product rule to get xln⁡x+x22⋅1x=xln⁡x+x2x\ln x + \frac{x^{2}}{2}\cdot\frac{1}{x} = x\ln x + \frac{x}{2}. Differentiating −x24-\frac{x^{2}}{4} gives −x2-\frac{x}{2}. The two halves cancel and leave xln⁡xx\ln x.

Why u = ln x and not u = x

Parts only helps when the new integral ∫v du\int v\,du is easier than the original. Taking u=xu = x and dv=ln⁡x dxdv = \ln x\,dx is a dead end for a reason worth naming: finding vv means integrating ln⁡x\ln x, which is itself a parts problem, so you have made the question harder before you have started.

The LIATE ordering encodes this. Logarithmic sits first precisely because logarithms are awkward to antidifferentiate and pleasant to differentiate.

  1. Logarithmic, such as ln⁡x\ln x
  2. Inverse trigonometric, such as arctan⁡x\arctan x
  3. Algebraic, such as xx or x2x^{2}
  4. Trigonometric, such as sin⁡x\sin x
  5. Exponential, such as exe^{x}

The general power case follows the same working, and it is worth knowing because it covers ∫xln⁡x dx\int \sqrt{x}\ln x\,dx and similar problems without redoing parts.

∫xnln⁡x dx=xn+1n+1ln⁡x−xn+1(n+1)2+C,n≠−1\int x^{n}\ln x\,dx = \frac{x^{n+1}}{n+1}\ln x - \frac{x^{n+1}}{\left(n+1\right)^{2}} + C, \quad n \neq -1

Setting n=1n = 1 reproduces the result on this page. The excluded case n=−1n = -1 is genuinely different: ∫ln⁡xx dx\int \frac{\ln x}{x}\,dx is a substitution with u=ln⁡xu = \ln x, giving (ln⁡x)22+C\frac{\left(\ln x\right)^{2}}{2} + C, and no parts is needed.

Where the integral of x ln x shows up on the AP exam

Integration by parts is Topic 6.11 in Unit 6, marked BC only in the CED, so ∫xln⁡x dx\int x\ln x\,dx can appear on BC but not on AB. Unit 6 carries a weighting of 15 to 20 percent on both exams, and Topic 6.14 is where the technique choice itself is assessed.

Definite versions from 11 to some upper limit are the common form, because ln⁡1=0\ln 1 = 0 kills the logarithmic term at the lower endpoint and leaves clean arithmetic.

∫1exln⁡x dx=[x22ln⁡x−x24]1e=(e22−e24)−(0−14)=e2+14\int_{1}^{e} x\ln x\,dx = \left[\frac{x^{2}}{2}\ln x - \frac{x^{2}}{4}\right]_{1}^{e} = \left(\frac{e^{2}}{2} - \frac{e^{2}}{4}\right) - \left(0 - \frac{1}{4}\right) = \frac{e^{2} + 1}{4}

That evaluates to about 2.0972.097. Note the lower endpoint contributes +14+\frac{1}{4} because you are subtracting −14-\frac{1}{4}, which is the sign slip most often made here.

The integrand is also a standard improper integral example on BC, since xln⁡x→0x\ln x \to 0 as x→0+x \to 0^{+} even though ln⁡x\ln x diverges there. The xx factor wins, which is a useful instance of the growth comparison BC expects you to know.

Common mistakes with the integral of x ln x

  • Multiplying antiderivatives to get x22(xln⁡x−x)\frac{x^{2}}{2}\left(x\ln x - x\right). There is no product rule for integrals, and differentiating that expression does not return xln⁡xx\ln x.
  • Choosing u=xu = x. It forces you to antidifferentiate ln⁡x\ln x to find vv, which is a harder problem than the one you were given.
  • Dropping the 14\frac{1}{4} and writing x22ln⁡x−x22\frac{x^{2}}{2}\ln x - \frac{x^{2}}{2}. The leftover integral is ∫x2 dx=x24\int \frac{x}{2}\,dx = \frac{x^{2}}{4}, and halving happens once in vv and again in the power rule.
  • Confusing this with ∫ln⁡xx dx\int \frac{\ln x}{x}\,dx. That one is a substitution, not parts, and its answer is (ln⁡x)22+C\frac{\left(\ln x\right)^{2}}{2} + C.
  • Ignoring the domain. ln⁡x\ln x requires x>0x > 0, so a definite integral with a negative endpoint does not exist.

Simplify before you integrate

After substituting into the parts formula, always simplify v duv\,du first. Here x22⋅1x\frac{x^{2}}{2}\cdot\frac{1}{x} becomes x2\frac{x}{2}, and students who integrate before cancelling often lose the factor.

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 ln x?

It is x22ln⁡x−x24+C\frac{x^{2}}{2}\ln x - \frac{x^{2}}{4} + C. Integration by parts with u=ln⁡xu = \ln x and dv=x dxdv = x\,dx gives x22ln⁡x−∫x2 dx\frac{x^{2}}{2}\ln x - \int \frac{x}{2}\,dx, and the leftover integral is x24\frac{x^{2}}{4}.

Why is u = ln x rather than u = x?

Because dv=ln⁡x dxdv = \ln x\,dx would require you to antidifferentiate ln⁡x\ln x to find vv, which is itself an integration by parts problem. Taking u=ln⁡xu = \ln x instead removes the logarithm in one differentiation.

Is the integral of x ln x on the AP Calculus AB exam?

No. It requires integration by parts, Topic 6.11, which the CED marks BC only. AB students are expected to handle ∫ln⁡xx dx\int \frac{\ln x}{x}\,dx by substitution, but not this one.

What is the integral of x^n ln x?

For n≠−1n \neq -1 it is xn+1n+1ln⁡x−xn+1(n+1)2+C\frac{x^{n+1}}{n+1}\ln x - \frac{x^{n+1}}{\left(n+1\right)^{2}} + C. The excluded case n=−1n = -1 is ∫ln⁡xx dx=(ln⁡x)22+C\int \frac{\ln x}{x}\,dx = \frac{\left(\ln x\right)^{2}}{2} + C, which needs substitution instead.

What is the definite integral of x ln x from 1 to e?

It equals e2+14\frac{e^{2} + 1}{4}, about 2.0972.097. The lower endpoint is easy because ln⁡1=0\ln 1 = 0, leaving −14-\frac{1}{4} there, which you then subtract.