<s>[INST] What's wrong with my answer? $\int \frac{3x^2-2}{x^2-4x-12} \mathrm dx$ Here is the original problem: $\int \frac{3x^2-2}{x^2-4x-12}\ \mathrm dx$
After doing polynomial division and factoring the denominator I got this:
$$\int 3 + \frac{12x+36}{(x-6)(x+2)}\ \mathrm dx$$
Then using partial fraction decomposition I got the following:
$$\int 3\ \mathrm dx+ \frac{27}{2}\int \frac{\ \mathrm dx}{x-6} -\frac{3}{2}\int \frac{\ \mathrm dx}{x+2}$$
For the final answer I got this:
$$3x+\frac{27}{2}ln|x-6|-\frac{3}{2}ln|x+2|+C$$
But it says my answer is incorrect.  Can you all spot my error or should I provide more details?
 [/INST] You did the calculation wrong.
$$\frac{3x^2-2}{x^2-4x-12} = \frac{3(x^2-4x-12)-2+12x+36}{x^2-4x-12} = 3+\frac{12x+34}{x^2-4x-12}$$
Now, try to evaluate your integral
</s>