Evaluate the integral: I = integral (x²+x) ln(x+1) dx
Evaluate the integral: $$ I = \int \left(x^2+x\right)\ln(x+1)\,dx. $$
Explanation of Method
Integration by parts with $u=\ln(x+1)$, $dv=(x^2+x)\,dx$ leaves a leftover integral of two improper rational functions, each of which requires polynomial division — and each division leaves a genuine remainder term over $x+1$ that must be tracked through to the end.
- Choose $u=\ln(x+1)$, $dv=(x^2+x)\,dx$.
- Differentiate $u$ and integrate $dv$.
- Divide each leftover fraction, keeping the remainder terms.
- Integrate and combine everything, including the logarithmic remainder.
Step 1 · Set up integration by parts
Let:
$$ u = \ln(x+1) \quad \Rightarrow \quad du = \frac{dx}{x+1}, \qquad dv = (x^2+x)\,dx \quad \Rightarrow \quad v = \frac{x^3}{3}+\frac{x^2}{2}. $$
Step 2 · Apply the formula
$$ I = \left(\frac{x^3}{3}+\frac{x^2}{2}\right)\ln(x+1) - \int \left(\frac{x^3}{3}+\frac{x^2}{2}\right)\frac{dx}{x+1}. $$
Step 3 · Divide each term, keeping remainders
Polynomial division gives remainders that must not be dropped:
$$ \frac{x^3}{x+1} = x^2-x+1 - \frac{1}{x+1}, \qquad \frac{x^2}{x+1} = x-1 + \frac{1}{x+1}. $$
So the leftover integrand becomes:
$$ \frac13\left(x^2-x+1-\frac{1}{x+1}\right) + \frac12\left(x-1+\frac{1}{x+1}\right) = \frac{x^2}{3}+\frac{x}{6}-\frac16 + \frac{1}{6(x+1)}, $$
where the two remainder fractions combine as $-\tfrac13+\tfrac12=\tfrac16$ times $\tfrac{1}{x+1}$ — this term does not cancel and must be carried through.
Step 4 · Integrate and combine
Integrating the leftover piece:
$$ \int \left(\frac{x^2}{3}+\frac{x}{6}-\frac16+\frac{1}{6(x+1)}\right) dx = \frac{x^3}{9}+\frac{x^2}{12}-\frac{x}{6}+\frac16\ln|x+1|. $$
Subtracting this from the $uv$ term:
$$ I = \left(\frac{x^3}{3}+\frac{x^2}{2}\right)\ln(x+1) - \frac{x^3}{9}-\frac{x^2}{12}+\frac{x}{6}-\frac16\ln|x+1| + C. $$
Combining the two logarithm terms:
$$ I = \left(\frac{x^3}{3}+\frac{x^2}{2}-\frac16\right)\ln(x+1) - \frac{x^3}{9}-\frac{x^2}{12}+\frac{x}{6} + C. $$
Summary Table
| Piece | Contribution |
|---|---|
| $x^3/(x+1)$ remainder | $-1/(x+1)$ |
| $x^2/(x+1)$ remainder | $+1/(x+1)$ |
| Combined remainder | $\tfrac16\cdot\tfrac{1}{x+1}$, integrates to $\tfrac16\ln|x+1|$ |
Additional Notes
- The domain requires $x>-1$, where $\ln(x+1)$ is defined.
- A common pitfall here is to divide $x^3/(x+1)$ and $x^2/(x+1)$ and drop their remainder terms (treating the division as exact), since each division alone leaves what looks like a small leftover. In fact the two remainders combine to a nonzero $\tfrac16/(x+1)$ term that integrates to an extra $\tfrac16\ln|x+1|$ contribution — omitting it produces an antiderivative that does not differentiate back to the original integrand.
- The result can be checked by differentiating the final expression: the polynomial terms cancel exactly (as verified by combining $\left(\tfrac{x^3}{3}+\tfrac{x^2}{2}-\tfrac16\right)\big/(x+1)$ with $-x^2/3-x/6+1/6$, which is identically zero), leaving just $(x^2+x)\ln(x+1)$.
Result
The solution to the integral is: