Why Positive Endpoints Matter
Definite logarithmic integrals require attention to both the integration method and the interval. The natural logarithm \(\ln x\) is defined for \(x>0\), so an integral of \(\ln x\) over an interval \([a,b]\) is directly covered by the formulas here when \(0<a<b\). The same condition applies to \(x\ln x\).
Once an antiderivative is known, a definite integral is found by evaluating it at the upper endpoint and subtracting its value at the lower endpoint. In an integration-by-parts calculation, this subtraction includes the boundary term. Keeping that term visible is the central bookkeeping step.
The Definite-Integral Formulas
The earlier material on integrating the natural logarithm and integrating \(x\) times the natural logarithm gives the corresponding antiderivatives. For positive \(x\), these are \(x\ln x-x\) and \(\frac{x^2}{2}\ln x-\frac{x^2}{4}\), respectively. The Fundamental Theorem of Calculus says that if \(F'=f\) on \([a,b]\), then \(\int_a^b f(x)\,dx=F(b)-F(a)\).
These formulas do not require either endpoint to be \(1\), and they do not require the logarithms of the endpoints to be integers or otherwise especially simple. If an endpoint is \(1\), use \(\ln 1=0\). If the bounds are reversed, the integral changes sign, but this tutorial will use \(a<b\) to keep the endpoint order fixed.
Why the Boundary Term Must Be Included
For a definite integral, integration by parts states that \(\int_a^b u\,dv=[uv]_a^b-\int_a^b v\,du\), provided the functions involved are differentiable as needed on the interval. The bracket is not optional: it records the value of the product \(uv\) at both endpoints. The two logarithmic formulas follow directly from that rule.
Set \(u=\ln x\) and \(dv=dx\). Then \(du=\frac{1}{x}\,dx\) and \(v=x\). These expressions are defined on \([a,b]\) because \(a>0\).
\(\int_a^b \ln x\,dx=[x\ln x]_a^b-\int_a^b x\frac{1}{x}\,dx=[x\ln x]_a^b-(b-a)\).
\([x\ln x]_a^b-(b-a)=b\ln b-a\ln a-b+a\), which is the first stated formula.
Then \(du=\frac{1}{x}\,dx\) and \(v=\frac{x^2}{2}\). Thus \(\int_a^b x\ln x\,dx=[\frac{x^2}{2}\ln x]_a^b-\frac12\int_a^b x\,dx\).
\(\frac12\int_a^b x\,dx=\frac12[\frac{x^2}{2}]_a^b=\frac{b^2-a^2}{4}\). Subtracting this gives the second stated formula.
This derivation explains the source of the terms \(-x\) and \(-\frac{x^2}{4}\): they come from the remaining integrals after integration by parts. The endpoint evaluation then subtracts the entire lower-endpoint expression, including any negative terms within it.
Worked Examples
Worked Example: Integrating \(\ln x\) from \(1\) to \(e\)
Evaluate \(\int_1^e \ln x\,dx\). The bounds are positive and ordered, so use the first formula: \[ \int_1^e \ln x\,dx=[x\ln x-x]_1^e. \] At the upper endpoint, \(\ln e=1\), so \(e\ln e-e=e-e=0\). At the lower endpoint, \(\ln 1=0\), so \(1\ln 1-1=0-1=-1\). Therefore, \[ \int_1^e \ln x\,dx=0-(-1)=1. \] To check, differentiate the antiderivative: \(\frac{d}{dx}(x\ln x-x)=\ln x+1-1=\ln x\). Substitution of the bounds gives the same value \(0-(-1)=1\).
Worked Example: Integrating \(x\ln x\) from \(1\) to \(2\)
Evaluate \(\int_1^2 x\ln x\,dx\). Use the second formula: \[ \int_1^2 x\ln x\,dx= \left[\frac{x^2}{2}\ln x-\frac{x^2}{4}\right]_1^2. \] At \(x=2\), the expression is \(\frac{4}{2}\ln 2-\frac{4}{4}=2\ln 2-1\). At \(x=1\), it is \(\frac{1}{2}\ln 1-\frac{1}{4}=0-\frac14=-\frac14\). Subtract the lower value: \[ (2\ln 2-1)-\left(-\frac14\right) =2\ln 2-1+\frac14 =2\ln 2-\frac34. \] For a check, differentiate \(F(x)=\frac{x^2}{2}\ln x-\frac{x^2}{4}\): \[ F'(x)=x\ln x+\frac{x^2}{2}\frac1x-\frac{x}{2} =x\ln x+\frac{x}{2}-\frac{x}{2} =x\ln x. \] The endpoint values are \(F(2)=2\ln 2-1\) and \(F(1)=-\frac14\), confirming the result.
Worked Example: Integrating \(\ln x\) from \(2\) to \(4\)
Evaluate \(\int_2^4 \ln x\,dx\). The formula gives \[ \int_2^4\ln x\,dx=[x\ln x-x]_2^4 =(4\ln4-4)-(2\ln2-2). \] Since \(\ln4=\ln(2^2)=2\ln2\), the upper value is \(4(2\ln2)-4=8\ln2-4\). The lower value is \(2\ln2-2\). Subtracting, \[ (8\ln2-4)-(2\ln2-2) =8\ln2-4-2\ln2+2 =6\ln2-2. \] Check the antiderivative by differentiation: \(\frac{d}{dx}(x\ln x-x)=\ln x\). Evaluating it at \(4\) and \(2\) produces the displayed difference, so the endpoint order and subtraction are consistent.
Worked Example: Integrating \(x\ln x\) from \(1\) to \(e^2\)
Evaluate \(\int_1^{e^2}x\ln x\,dx\). First use \(\ln(e^2)=2\): \[ \int_1^{e^2}x\ln x\,dx =\left[\frac{x^2}{2}\ln x-\frac{x^2}{4}\right]_1^{e^2}. \] At the upper endpoint, the value is \[ \frac{(e^2)^2}{2}\ln(e^2)-\frac{(e^2)^2}{4} =\frac{e^4}{2}(2)-\frac{e^4}{4} =e^4-\frac{e^4}{4} =\frac{3e^4}{4}. \] At the lower endpoint, it is \(\frac12\ln1-\frac14=-\frac14\). Hence \[ \int_1^{e^2}x\ln x\,dx =\frac{3e^4}{4}-\left(-\frac14\right) =\frac{3e^4+1}{4}. \] Differentiating the antiderivative gives \(x\ln x\), as checked in the preceding example. The upper and lower values above therefore verify the result, including the positive contribution \(+\frac14\) from subtracting the lower endpoint.
A Common Boundary-Term Error
A frequent mistake is to stop after evaluating only the product term in integration by parts. For instance, an incorrect calculation might say \(\int_1^e\ln x\,dx=[x\ln x]_1^e=e\). This omits the remaining integral \(\int_1^e 1\,dx\). The correct calculation is \[ \int_1^e\ln x\,dx=[x\ln x]_1^e-\int_1^e1\,dx =e-0-(e-1)=1. \] Equivalently, use the complete antiderivative \(x\ln x-x\): its values are \(0\) at \(e\) and \(-1\) at \(1\), so their difference is \(1\). The incorrect value \(e\) also fails the full integration-by-parts formula because the subtracted integral has not been accounted for.
A second, closely related source of error is mishandling the lower endpoint. If \(F(a)\) is negative, then subtracting it makes a positive contribution. For example, in the integral from \(1\) to \(2\) of \(x\ln x\), the lower value is \(-\frac14\). The endpoint difference is \(F(2)-F(1)=F(2)-(-\frac14)\), not \(F(2)-\frac14\).
How to Organize a Definite Logarithmic Integral
Write the antiderivative and the endpoint bracket before substituting numbers. This separates the calculus from the arithmetic and makes the lower-bound subtraction explicit. A reliable sequence is:
- Confirm that both bounds are positive and identify the integrand as \(\ln x\) or \(x\ln x\).
- Write the matching antiderivative inside square brackets with the original bounds.
- Evaluate the full bracketed expression at the upper endpoint.
- Evaluate the full expression at the lower endpoint, simplifying values such as \(\ln1=0\).
- Subtract the lower value using parentheses, then simplify.
- Check that differentiating the chosen antiderivative recovers the integrand.
The derivative check verifies the antiderivative, while careful endpoint substitution verifies the definite evaluation. Both checks matter: a correct antiderivative can still produce an incorrect numerical or symbolic answer if the endpoints are reversed or the lower value is not subtracted as a whole.
Why These Integrals Are Useful
Definite integrals measure accumulated quantities over finite intervals. The formulas here give exact values for the accumulated natural logarithm and for the logarithm weighted by \(x\). The weighting changes how strongly different parts of the interval contribute: in \(x\ln x\), the factor \(x\) grows across a positive interval, so the integrand is not simply the logarithm alone.
For these two integrands, the essential method is already familiar from integration by parts: select factors, retain the boundary term, and evaluate the remaining integral. In a definite problem, the bounds are part of the calculation from the beginning. Keeping them visible helps prevent sign errors and makes the result easier to check.
Check Your Understanding
Use the endpoint formulas and show the upper and lower values explicitly.
- Evaluate \(\int_1^e\ln x\,dx\). What are the two endpoint values of \(x\ln x-x\)?
- Evaluate \(\int_1^2x\ln x\,dx\), keeping the lower endpoint in parentheses before simplifying.
- Write the definite integration-by-parts expression for \(\int_a^b\ln x\,dx\) using \(u=\ln x\) and \(dv=dx\), where \(0<a<b\).
- What term is missing from the incorrect calculation \(\int_1^e\ln x\,dx=[x\ln x]_1^e\)?
- Why is the condition \(a>0\) needed for these formulas to apply on \([a,b]\)?