<s>[INST] How do I get the integral of $\frac{1}{(x^2 - x -2)}$ I'm working with this problem $$ \int \frac{1}{x^2 - x - 2}$$
I'm thinking I break up the bottom so that it looks like this $$\int \frac{1}{(x-2)(x+1)} $$
Then I do $$x^2 - x -2 =  \frac{A}{x-2} + \frac{B}{x+1} $$
Multiple both sides by the common denominator and come out with $$ A(x+1) + B(x-2) = x^2 - x - 2 $$
Which equals $$Ax + A + Bx - 2B = x^2 - x - 2$$
Or $$ (A+B)x + (A-2B) = x^2 - x - 2$$
After that I tried to get values for my A and B but it doesn't seem right since I don't have anything for the $x^2$
Did I mess up somewhere?
 [/INST] In your partial fraction,
$\dfrac{1}{(x-2)(x+1)} = \dfrac{A}{x-2} + \dfrac{B}{x+1}$
So,
$\dfrac{1}{(x-2)(x+1)} = \dfrac{A(x+1) + B(x-2)}{(x-2)(x+1)}$
and hence,
$1 = (A+B)x + (A-2B)$
I think you can take it from here.
</s>