`x^2/((2x+1)(x+2)^2)` `=A/(2x+1)+B/(x+2)+C/((x+2)^2)`

Multiplying both sides by `(2x+1)(x+2)^2` gives:

`x^2 = A(x + 2)^2 ` `+ B(2x + 1)(x + 2) ` `+ C(2x + 1)`

Let `x = -2`, and this gives `C = -4/3`.

Let `x = -1/2`, and this gives `A = 1/9`.

Comparing coefficients of `x^2` gives: `A + 2B = 1`.

So `B = 4/9`.

Therefore

`x^2/((2x+1)(x+2)^2)` `=1/(9(2x+1))` `+4/(9(x+2))` `-4/(3(x+2)^2`

Now for the integration:

`int(x^2dx)/((2x+1)(x+2)^2)`

`=int(1/(9(2x+1))+4/(9(x+2))` `{:-4/(3(x+2)^2))dx`

`=1/18ln(2x+1)+4/9ln(x+2)` `{:+4/(3(x+2))+K`

Please support IntMath!