Let (x+3)=Addx(x2−2x−5)+B
(x+3)=A(2x−2)+B
Equating the coefficients of x and constant term on both sides, we obtain
2A=2⇒A=12
& −2A+B=3⇒B=4
∴(x+3)=12(2x−2)+4
⇒∫x+2x2−2x−5dx=∫12(2x−2)+4x2−2x−5dx
=12∫2x−2x2−2x−5dx+4∫1x2−2x−5dx
Let I1=∫2x−2x2−2x−5dx and I2=∫1x2−2x−5dx
∴∫x+3(x2−2x−5)dx=12I1+4I2 ...... (1)
Then, I1=∫2x−2x2−2x−5dx
Let x2−2x−5=t
⇒(2x−2)dx=dt
⇒I1=∫dtt=log|t|=log|x2−2x−5| .......... (2)
I2=∫1x2−2x−5dx
=∫1(x2−2x−5)−6dx
=∫1(x−1)2+(√6)2dx
=12√6log(x−1−√6x−1+√6) .........(3)
Substituting (2) and (3) in (1), we obtain
∫x+3x2−2x−5dx=12log|x2−2x−5|+42√6log∣∣∣x−1−√6x−1+√6∣∣∣+C
=12log|x2−2x−5|+2√6log∣∣∣x−1−√6x−1+√6∣∣∣+C