# How to integrate $\int\frac{3x+2}{x^2-x-2}dx$

This is the indefinite integral I have to evaluate: $$\int\frac{x^3}{x^2-x-2}dx$$ so by using the long division on polynomials technique, I got to: $$\frac{x^2}{2}+x+\int\frac{3x+2}{x^2-x-2}dx$$ How do I continue from here? I thought of using "integration of rational functions" but it didn't work.

• Factor the denominator and use partial fractions. – user31415926535 Jul 2 '15 at 11:52
• Partial fractions, write ${3x+2\over x^2-x-2}={A\over x-2}+{B\over x+1}$. – David Mitra Jul 2 '15 at 11:52
• What didn't work in "integration of rational functions" ? This IS a rational function. – Yves Daoust Jul 2 '15 at 12:09
• @DavidMitra thaks! (I solved) – Yagel Jul 2 '15 at 12:12

## 2 Answers

Specifically, you have that $$\frac{3x+2}{x^2 - x - 2} = \frac{A}{x-2} + \frac{B}{x+1}$$

The usual technique reveals that $A = \frac{8}{3}$ and $B = \frac{1}{3}$

Hence \begin{align}\frac{x^3}{x^2 - x - 2} &= x + 1 + {\color{blue}{\frac{3x+2}{(x-2)(x+1)}}} \\ \\ &= x + 1 + \frac{8}{3(x-2)} + \frac{1}{3(x+1)} \end{align}

So that \begin{align} \int \frac{x^3}{x^2 - x - 2} \, \mathrm{d}x &= \int x + 1 + {\color{blue}{\frac{3x+2}{x^2 - x - 2}}} \\ &= \int x + 1 + \frac{8}{3(x-2)} + \frac{1}{3(x+1)} \, \mathrm{d}x \end{align}

Hence $$\int \frac{x^3}{x^2 - x - 2} = x + \frac{x^2}{2} + \frac{8}{3}\ln |x-2| + \frac{1}{3} \ln |x+1| + \mathrm{C}$$

Hint : $\frac{3x+2}{x^2-x-2}=\frac{3}2\frac{2x-1}{x^2-x-2}+\frac{7}2\frac{1}{x^2-x-2}$ (other useful forms are possible as pointed out in the comments)