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 — Part (i): factorise and set up the partial fractions.
We factorise x2+2x−8=(x+4)(x−2) and write the identity for A and B.
(x+4)(x−2)x+7=x+4A+x−2B
x+7=A(x−2)+B(x+4)
Step 2 — Part (i): find A and B.
Putting x=−4 removes B, and putting x=2 removes A.
x=−4:3Ax=2:9B=−6A=−21=6B=23
Step 3 — Part (i): integrate.
Each fraction integrates to a log term.
∫x2+2x−8x+7dx=−21log∣x+4∣+23log∣x−2∣+C
Step 4 — Part (ii): factorise and set up the partial fractions.
We factorise x2−3x+2=(x−1)(x−2).
(x−1)(x−2)x=x−1A+x−2B
x=A(x−2)+B(x−1)
Step 5 — Part (ii): find A and B.
Putting x=1 removes B, and putting x=2 removes A.
x=1:1Ax=2:2B=−A=−1=B=2
Step 6 — Part (ii): integrate.
Each fraction integrates to a log term.
∫x2−3x+2xdx=2log∣x−2∣−log∣x−1∣+C
Therefore, (i) −21log∣x+4∣+23log∣x−2∣+C; (ii) 2log∣x−2∣−log∣x−1∣+C.