Solution:
Key idea: When the denominator is a single repeated factor such as (x−1)3, substitute u=x−1 and divide each term of the numerator by u3. Use ∫undu=n+1un+1+C for n=−1, and ∫udu=log∣u∣+C.
Step 1 — Substitute u=x−1.
We put x−1=u, so x=u+1 and dx=du. Then we rewrite the numerator in terms of u.
x2+x+1=(u+1)2+(u+1)+1=u2+3u+3
Step 2 — Split the fraction.
Dividing each term of the numerator by u3 gives simple powers of u.
u3u2+3u+3=u1+u23+u33
Step 3 — Integrate term by term.
We use ∫u−2du=−u−1 and ∫u−3du=−21u−2.
∫(u1+u23+u33)du=log∣u∣−u3−2u23+C
Step 4 — Put back u=x−1.
We replace u by x−1 to return to x.
∫(x−1)3x2+x+1dx=log∣x−1∣−x−13−2(x−1)23+C
Therefore, ∫(x−1)3x2+x+1dx=log∣x−1∣−x−13−2(x−1)23+C, for x=1.