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
    $\begingroup$ This is called "partial fraction decomposition", not "mock-long-division". You can verify it by performing the operation on the right hand side; the "trick" to do the decomposition is to factor $x^2+x-2=(x-1)(x+2)$ and solve the equation $$\frac{-x+2}{x^2+x-2} = \frac{A}{x+1}+\frac{B}{x-2}.$$Look around here for "partial fraction decomposition". And what is "WA"? $\endgroup$ – Arturo Magidin Feb 3 '12 at 4:52
  • $\begingroup$ @ArturoMagidin I was about to ask what is "WA" too. I believe it is Wolfram Alpha. $\endgroup$ – user38268 Feb 3 '12 at 4:55
  • $\begingroup$ @ArturoMagidin: WA (=wolframalpha) stated me that one needs to use long-division to deduce this, I was flaggergasted, hence "mock-long-division". $\endgroup$ – hhh Feb 3 '12 at 4:56
  • $\begingroup$ Where did Wolfram alpha state this? When doing integrals of rational functions, the first step is often to do long division, and then a partial fraction decomposition using the remainder. What's the context? $\endgroup$ – Arturo Magidin Feb 3 '12 at 5:05
  • $\begingroup$ @ArturoMagidin: here when you press "show steps". This problem is a slight variation but I think it is misleading instructed as "long-division". $\endgroup$ – hhh Feb 3 '12 at 5:16

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.