Solution:
Key idea: If the numerator's degree is not less than the denominator's, divide first to get a polynomial plus a proper fraction; then split the proper fraction into partial fractions.
Step 1 — Divide, because the degrees are equal.
The denominator is (x−1)(x−2)=x2−3x+2. Subtracting it once from the numerator leaves 5x+6.
x2−3x+2x2+2x+8=x2−3x+2(x2−3x+2)+(5x+6)=1+(x−1)(x−2)5x+6
Step 2 — Set up the partial fractions.
We write the proper fraction with constants A and B and clear the denominators.
(x−1)(x−2)5x+6=x−1A+x−2B
5x+6=A(x−2)+B(x−1)
Step 3 — Find A and B.
Putting x=1 removes B, and putting x=2 removes A.
x=1:11Ax=2:16B=−A=−11=B=16
Step 4 — Integrate term by term.
The constant 1 integrates to x and each fraction gives a log term.
∫(x−1)(x−2)x2+2x+8dx=x−11log∣x−1∣+16log∣x−2∣+C
Therefore, ∫(x−1)(x−2)x2+2x+8dx=x−11log∣x−1∣+16log∣x−2∣+C.