## Thomas' Calculus 13th Edition

$$x^2-3x+\dfrac{2\ln |x+4|}{3} +\dfrac{1}{3} \ln |x-2|+C$$
Apply the integration by parts formula such follows: $\int a'(x) b(x)=a(x) b(x)-\int a(x) b'(x)dx$ Re-write the integral into partial fractions. $\int \dfrac{(2x^3+x^2-21x+24) dx}{x^2+2x-8}=\int (2x-3)+ \dfrac{x}{x^2+2x-8}dx$ Now $$\int [(2x-3)+ \dfrac{x}{x^2+2x-8}]\space dx=\int (2x-3) dx+(\dfrac{1}{3}) \times \int \dfrac{dx}{x-2}+(\dfrac{2}{3}) \times \int \dfrac{dx}{x+4}\\=x^2-3x+\dfrac{2\ln |x+4|}{3} +\dfrac{1}{3} \ln |x-2|+C$$