# Math Help - integration via partial fractions

1. ## integration via partial fractions

$\int \frac{x^3 +x - 2}{(x^2+1)(x^2+2)} dx$

2. x^3+x-2=(Ax+B)(x^2+2)+(Cx+D)(x^2+1)

3. i had that but how do u solve for each of the 4 variables?

4. x^3+x-2=(Ax+B)(x^2+2)+(Cx+D)(x^2+1)

expand so

x^3+x-2=Ax^3+2Ax+Bx^2+2B+Cx^3+Cx+Dx^2+D

so 1x^3+x-2=(A+C)x^3+(B+D)x^2+(2A+C)x+(2B+D)

so (set them equal to the coefficients)

A+C=1
B+D=0
2A+C=1
2B+D=-2

you have two equations for 2 variables in both cases let A=1-C for example and substitue in so 2(1-C)+C=1 so 2-C=1 C=1 so A=0

i'm doing this on the computer i could be wrong though..my math that is

5. i got the answer to be:

$-2 tan^{-1} (x) + \frac{1}{2} ln | x^2 + 2 | + \frac{2}{\sqrt{2}} tan^{-1} \left( \frac{x}{\sqrt{2}}\right) + C$

6. that is correct