Why This Integral Needs Two Steps
Consider the integral \( \int x\ln(1+x^2)\,dx \). The factor \(x\) resembles the derivative of the expression inside the logarithm, but it is multiplied by a logarithm rather than by a function that can be integrated immediately as a direct substitution. Integration by parts moves the derivative onto the logarithm; a substitution then handles the remaining rational expression.
The method is useful beyond this one integral. In a polynomial-weighted logarithm, integrating the polynomial factor can make the logarithmic factor easier to differentiate. The resulting integral may still need algebraic simplification before it is straightforward to evaluate.
Set Up Integration by Parts
For differentiable functions \(u\) and \(v\), integration by parts follows from the product rule and takes the form
For the target integral, take \(u=\ln(1+x^2)\) and \(dv=x\,dx\). This choice is useful because \(x\,dx\) has a simple antiderivative, while differentiating the logarithm introduces a denominator that can be paired with a substitution.
Differentiate and integrate the chosen factors:
Substituting into the formula gives
At this point, substitution alone is not the most direct move: the numerator has degree three, while the denominator has degree two. First simplify the fraction by division:
because \(x(1+x^2)-x=x^3\). The remaining logarithmic term now has the form suited to a substitution.
Worked Example: The Target Integral
Worked Example: \( \int x\ln(1+x^2)\,dx \)
Apply integration by parts with \(u=\ln(1+x^2)\) and \(dv=x\,dx\). Then \(du=\frac{2x}{1+x^2}\,dx\), and \(v=\frac{x^2}{2}\). Thus
Rewrite the fraction and split the integral:
For the second integral, let \(t=1+x^2\). Then \(dt=2x\,dx\), so \(x\,dx=\frac12\,dt\). Therefore
The absolute value can be removed because \(1+x^2>0\) for every real \(x\). Also, \(\int x\,dx=\frac{x^2}{2}\). Combining these results gives
Substitute this expression back into the integration-by-parts result and collect terms:
To check, differentiate the expression without \(C\):
The derivative is the original integrand, as required.
Why the Two-Step Method Works
Integration by parts is the product rule rearranged. In differential form, the product rule says \(d(uv)=u\,dv+v\,du\). Integrating both sides gives \(uv=\int u\,dv+\int v\,du\), and rearranging yields the integration-by-parts formula. In this problem, the product-rule rearrangement transfers differentiation from the polynomial antiderivative \(x^2/2\) to the logarithm. The resulting factor \(x/(1+x^2)\) is directly connected to the derivative of \(1+x^2\).
The substitution \(t=1+x^2\) works because \(dt=2x\,dx\). The numerator \(x\,dx\) supplies exactly the differential needed, up to the constant factor \(1/2\). This is why the residual integral simplifies after the fraction is divided first.
A Scaled Quadratic
A related integral shows how a constant in the quadratic changes the substitution without changing the strategy. Here the logarithm's argument remains positive for all real \(x\).
Worked Example: \( \int x\ln(1+4x^2)\,dx \)
Set \(u=\ln(1+4x^2)\), \(dv=x\,dx\). Then \(du=\frac{8x}{1+4x^2}\,dx\) and \(v=\frac{x^2}{2}\), so
Let \(t=1+4x^2\). Then \(dt=8x\,dx\) and \(x^2=(t-1)/4\), hence \(x^3\,dx=(t-1)\,dt/32\). The remaining term becomes
Substitute \(t=1+4x^2\) and collect the logarithmic terms:
For verification, set \(q=1+4x^2\), so \(q'=8x\). Differentiating \(\frac18(q\ln q-q)\) gives \(\frac18(q'\ln q+q'-q')=x\ln(1+4x^2)\), the original integrand.
When the Polynomial Has Higher Degree
If the polynomial factor has higher degree, integration by parts still differentiates the logarithm, but the remaining rational expression may require polynomial division. The same basic choices work when an antiderivative of the polynomial factor is easy to find.
Worked Example: \( \int x^3\ln(1+x^2)\,dx \)
Choose \(u=\ln(1+x^2)\), \(dv=x^3\,dx\). Then \(du=\frac{2x}{1+x^2}\,dx\) and \(v=\frac{x^4}{4}\), giving
Divide to simplify the fraction. Indeed, \((1+x^2)(x^3-x)+x=x^5\), so
Integrate each term. The last integral uses \(t=1+x^2\), \(dt=2x\,dx\):
Substituting this result yields
Differentiate to check. The derivative of the first term is \(x^3\ln(1+x^2)+\frac{x^5}{2(1+x^2)}\). The derivatives of the other terms are \(-x^3/2\), \(x/2\), and \(-x/[2(1+x^2)]\). Their nonlogarithmic contributions sum to zero, since
Thus the derivative is \(x^3\ln(1+x^2)\), confirming the result.
Common Mistake: Losing the Factor from the Substitution
A frequent error is to use \(t=1+x^2\), notice \(dt=2x\,dx\), and then replace \(x\,dx\) by \(dt\) instead of by \(\frac12dt\). That loses a factor of two. For example, the incorrect step
does not differentiate back to the original integrand: the derivative of \(\ln(1+x^2)\) is \(2x/(1+x^2)\). The correction is to carry the factor through the substitution:
Checking by differentiation catches the error immediately. In the full target integral, another common slip is to put an extra factor of \(1/2\) in front of \(\int x^3/(1+x^2)\,dx\). The factor \(1/2\) in \(v=x^2/2\) is canceled by the \(2\) in \(du=2x/(1+x^2)\,dx\); the residual integral has coefficient \(1\), not \(1/2\).
Choosing the Method Reliably
For integrals of this form, it helps to keep the steps in order rather than trying substitutions on the original expression at random:
Take the logarithm as \(u\), and choose \(dv\) as the polynomial factor times \(dx\), provided it has a simple antiderivative.
Compute \(du\) by the chain rule and \(v\) by integration, then write the complete residual integral with its coefficient.
If the residual fraction has a numerator degree at least as large as the denominator degree, divide or decompose it first.
When a factor \(x\,dx\) remains alongside \(1+x^2\), the substitution \(t=1+x^2\) reduces the integral to a logarithmic form.
Differentiate the proposed antiderivative and confirm that every nonlogarithmic term cancels.
The key conditions are not tied to this exact quadratic. The real logarithm requires a positive argument throughout the interval being considered, and integration by parts requires differentiability and integrability of the chosen factors there. For \(1+x^2\), positivity holds everywhere; for a different quadratic, check its sign before using a real logarithm on an interval.
Check Your Understanding
Work through these questions by keeping the integration-by-parts and substitution steps separate.
- For \( \int x\ln(1+x^2)\,dx \), what choices of \(u\) and \(dv\) produce the residual integral \( \int x^3/(1+x^2)\,dx \)?
- Show by algebra that \(x^3/(1+x^2)=x-x/(1+x^2)\), then evaluate each term.
- In the substitution \(t=1+4x^2\), express \(x^3\,dx\) in terms of \(t\) and \(dt\).
- Why is \(\ln(1+x^2)\) defined for every real \(x\), and why may its logarithm be written without absolute-value bars?
- Differentiate \( \frac12((1+x^2)\ln(1+x^2)-x^2) \) and identify the cancellation that recovers the integrand.