Integration by Partial Fractions $\int\frac{1}{(x+1)^3(x+2)}dx$ I'm trying to do a problem regarding partial fractions and I'm not sure if I have gone about this right as my answer here doesn't compare to the answer provided by wolfram alpha. Is it that I can't Seperate things that are raised to powers on the denominator?
http://www.wolframalpha.com/input/?i=integrate+1%2F%28%28x%2B1%29%5E3%28x%2B2%29%29
My Work:
$$\int\frac{1}{(x+1)^3(x+2)}dx$$
$$\frac{1}{(x+1)^3(x+2)}=\frac{A}{(x+1)^3}+\frac{B}{(x+2)}$$
$$1=A(x+2)+B(x+1)^3$$
Plugging $x=-1$
$$1=A(1)+B(0)^3$$
$$A=1$$
Plugging $x=-2$
$$1=A(0)+B(-1)^3$$
$$B=-1$$
$$\int\frac{1}{(x+1)^3(x+2)}dx=\int\left(\frac{1}{(x+1)^3}-\frac{1}{(x+2)}\right)$$
$$\int\left(\frac{1}{(x+1)^3}-\frac{1}{(x+2)}\right)dx=\frac{-1}{2(x+1)^2}-ln|x+2|+C$$

Observe that:
$$x+2 = (x+1)+1$$
Rewrite the numerator as:
$$\left( (x+1)^3+1^3 \right) - (x+1)$$
And cancel using the sum of cubes identity
$$a^3+b^3\equiv(a+b)(a^2-ab+b^2)$$
