Help me with this mock-long-division $\frac{-x+2}{x^{2}+x-2}=\frac{-4}{3(x+2)}+\frac{1}{3(x-1)}$

147 Views Asked by At

$$\frac{-x+2}{x^{2}+x-2}=\frac{-4}{3(x+2)}+\frac{1}{3(x-1)}$$

Wolphram Alpha states that one can do this with long division, I cannot immediately realize it. Could someone show the trick to simplify the LHD to RHD?

Context: Trying to compute $$\int \frac{x^2}{x^2+x-2}\,dx$$

1

There are 1 best solutions below

0
On BEST ANSWER

The trick is to realise that the denominator can be factored as

$x^2 + x - 2 = (x+2)(x-1)$.

Then you make an ansatz (educated guess) that the right hand side can be written as

$$\frac{A}{x+2} + \frac{B}{x-1}$$

and solve for $A$ and $B$. In fact if you do this, you get after making denominators common the equation

$2 - x = A(x-1) + B(x+2)$.

From which substituting in $x = 1$ gives $3B = 1$, or $B = 1/3$. Similarly substituting in $x = -2$ gives $4 = -3A$, so that $A = -4/3$.