0
$\begingroup$

$\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$

  • 0
    @ArturoMagidin: I see now, overlooked the fine print -- did the long-division so spontaneously that did not think about it. Very well you right, good to get it clear then, thank you for clarification.2012-02-03

1 Answers 1

2

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$.