Solution:
Write the numerator in terms of the derivative of x2−2x−5, which is 2x−2:
x+3=21(2x−2)+4
Therefore,
∫x2−2x−5x+3dx=21∫x2−2x−52x−2dx+4∫x2−2x−5dx=21I1+4I2
In I1, put x2−2x−5=t, so that (2x−2)dx=dt.
I1=∫tdt=logx2−2x−5+C1
For I2, complete the square:
x2−2x−5=(x−1)2−(6)2
Using ∫x2−a2dx=2a1logx+ax−a+C,
I2=261logx−1+6x−1−6+C2
Substituting I1 and I2,
∫x2−2x−5x+3dx=21logx2−2x−5+62logx−1+6x−1−6+C