<s>[INST] Integration of $\int \frac{x^2}{(x-3)(x+2)^2}$ by partial fractions 
Integration of $\int \frac{x^2}{(x-3)(x+2)^2}$

I know that we can use substitution to make the expression simplier before solving it, but I am trying to solve this by using partial fractions only.
$\frac{x^2}{(x-3)(x+2)^2} = \frac{A}{x-3} + \frac{B}{x+2} + \frac{C}{(x+2)^2} = \frac{A(x+2)^2+B(x-3)(x+2) + C(x-3)}{(x-3)(x+2)} = \frac{Ax^2 + 4Ax + 4A + Bx^2 - Bx - 6B +Cx - 3C}{(x-3)(x+2)}$
Looking at the numerator: $x^2(A+B) + x(4A-B+C) + (4A-6B-3C)$
So, comparing coefficients:
$A+B=1$,
$4A-B+C=0$
$4A-6B-3C=0$
I am struggling to solve these 3 equations to find A,B,C
 [/INST] There is another way of finding $A$, $B$ and $C$ which is more efficient than forming and solving simultaneous equations.
Starting with the identity $$x^2=A(x+2)^2+B(x-3)(x+2)+C(x-3)$$
Choose values of $x$ to make the brackets zero.
So, putting $x=2$ gives $$4=C(-5)\implies C=-\frac45$$
Putting $x=3$ gives $$9=A(25)\implies A=\frac{9}{25}$$
Now that you’ve run out of convenient values of $x$ you can put $x=0$ or just look at coefficients, such as $x^2$:
$$1=A+B\implies B=\frac{16}{25}$$
</s>