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.

xlnxdx=x22lnxx24+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.

udv=uvvdu\int u\,dv = uv - \int v\,du

Choose u=lnxu = \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=xdxdv = x\,dx and v=x22v = \frac{x^{2}}{2}.

u=lnx,du=1xdx,dv=xdx,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 x221x\frac{x^{2}}{2}\cdot\frac{1}{x} collapses to x2\frac{x}{2}.

xlnxdx=x22lnxx221xdx=x22lnxx2dx\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}.

xlnxdx=x22lnxx24+C\int x\ln x\,dx = \frac{x^{2}}{2}\ln x - \frac{x^{2}}{4} + C

Check it by differentiating

Differentiate x22lnx\frac{x^{2}}{2}\ln x with the product rule to get xlnx+x221x=xlnx+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 xlnxx\ln x.

Why u = ln x and not u = x

Parts only helps when the new integral vdu\int v\,du is easier than the original. Taking u=xu = x and dv=lnxdxdv = \ln x\,dx is a dead end for a reason worth naming: finding vv means integrating lnx\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 lnx\ln x
  2. Inverse trigonometric, such as arctanx\arctan x
  3. Algebraic, such as xx or x2x^{2}
  4. Trigonometric, such as sinx\sin x
  5. Exponential, such as exe^{x}

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

xnlnxdx=xn+1n+1lnxxn+1(n+1)2+C,n1\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: lnxxdx\int \frac{\ln x}{x}\,dx is a substitution with u=lnxu = \ln x, giving (lnx)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 xlnxdx\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 ln1=0\ln 1 = 0 kills the logarithmic term at the lower endpoint and leaves clean arithmetic.

1exlnxdx=[x22lnxx24]1e=(e22e24)(014)=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 xlnx0x\ln x \to 0 as x0+x \to 0^{+} even though lnx\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(xlnxx)\frac{x^{2}}{2}\left(x\ln x - x\right). There is no product rule for integrals, and differentiating that expression does not return xlnxx\ln x.
  • Choosing u=xu = x. It forces you to antidifferentiate lnx\ln x to find vv, which is a harder problem than the one you were given.
  • Dropping the 14\frac{1}{4} and writing x22lnxx22\frac{x^{2}}{2}\ln x - \frac{x^{2}}{2}. The leftover integral is x2dx=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 lnxxdx\int \frac{\ln x}{x}\,dx. That one is a substitution, not parts, and its answer is (lnx)22+C\frac{\left(\ln x\right)^{2}}{2} + C.
  • Ignoring the domain. lnx\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 vduv\,du first. Here x221x\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 x22lnxx24+C\frac{x^{2}}{2}\ln x - \frac{x^{2}}{4} + C. Integration by parts with u=lnxu = \ln x and dv=xdxdv = x\,dx gives x22lnxx2dx\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=lnxdxdv = \ln x\,dx would require you to antidifferentiate lnx\ln x to find vv, which is itself an integration by parts problem. Taking u=lnxu = \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 lnxxdx\int \frac{\ln x}{x}\,dx by substitution, but not this one.

What is the integral of x^n ln x?

For n1n \neq -1 it is xn+1n+1lnxxn+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 lnxxdx=(lnx)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 ln1=0\ln 1 = 0, leaving 14-\frac{1}{4} there, which you then subtract.