Solution:
Key idea: A proper rational function whose denominator factorises can be split into partial fractions: a linear factor (x−p) gets x−pA, a repeated factor (x−p)2 gets x−pA+(x−p)2B, and an irreducible quadratic gets quadraticBx+C. Each piece then integrates using ∫x−pdx=log∣x−p∣+C.
Step 1 — Factorise and set up the partial fractions.
We factorise x2−x−2=(x−2)(x+1), since the numbers −2 and 1 have product −2 and sum −1.
(x−2)(x+1)2x+7=x−2A+x+1B
2x+7=A(x+1)+B(x−2)
Step 2 — Find A and B.
Putting x=2 removes B, and putting x=−1 removes A.
x=2:11Ax=−1:5B=3A=311=−3B=−35
Step 3 — Integrate.
Each fraction integrates to a log term.
∫x2−x−22x+7dx=311log∣x−2∣−35log∣x+1∣+C
Therefore, ∫x2−x−22x+7dx=311log∣x−2∣−35log∣x+1∣+C.