# Understanding a step in a partial fraction decomposition $\int \frac{5x^2-2}{x^2-4x-12}dx$

Here is the problem: $\int \frac{5x^2-2}{x^2-4x-12}dx$

I factored it and got this form:

$\int \frac{5x^2-2}{(x-6)(x+2)}dx$ however the solution shows the next step looking like this: $\int 5+ \frac{20x+58}{(x-6)(x+2)}dx$

I know how to integrate and solve it, but this particular step has me confused. Can you help me to explain how they got there?

The reason I'm confused is because the following steps show the actual decomposition using A, B, etc over their respective denominators.

Edit: Now that I look at it, it looks like they divided it, but I don't understand why there is still a decomposition if the problem can be divided.

-
You must first do polynomial division because for a partial fraction decomposition, you need the degree of the numerator smaller than that of the denominator. – Daniel Fischer Oct 17 '13 at 21:30
@DanielFischer this is my first problem where polynomial division is a prerequisite for the partial fraction decomposition. Thanks for that tip! – free_mind Oct 17 '13 at 21:32

In light of Daniel's comment, lets work on the integrand. I am making the final parts stepwise, so you can check the way well. You have $$\frac{5x^2-2}{x^2-4x-12} \tag{1}$$ $$=\frac{5x^2-2+\color{red}{20x}-\color{blue}{20x}+\color{brown}{60}-\color{yellow}{60}}{x^2-4x-12} \tag{2}$$ $$=\frac{5(x^2-\color{blue}{4x}-\color{yellow}{12})+(\color{red}{20x}+58)}{x^2-4x-12}\tag{3}$$ $$=5+2\times\frac{10x+29}{x^2-4x-12}\tag{4}$$ Now you have to do the partial fraction method because the degree of the nominator is less than the degree of the denominator. Indeed, we have to find constants $A,B$ such that: $$\frac{10x+29}{x^2-4x-12}=\frac{A}{x-6}+\frac{B}{x+2}$$