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+4x−5=(x+5)(x−1), since the numbers 5 and −1 have product −5 and sum 4.
(x+5)(x−1)x+1=x+5A+x−1B
x+1=A(x−1)+B(x+5)
Step 2 — Find A and B.
Putting x=−5 removes B, and putting x=1 removes A.
x=−5:−4Ax=1:2B=−6A=32=6B=31
Step 3 — Integrate.
Each fraction integrates to a log term.
∫x2+4x−5x+1dx=32log∣x+5∣+31log∣x−1∣+C
Therefore, ∫x2+4x−5x+1dx=32log∣x+5∣+31log∣x−1∣+C.