<s>[INST] To split in to partial fractions, the expression $\frac{1}{x^2(x+a)^2}$ To split in to partial fractions, the expression $\frac{1}{x^2(x+a)^2}$
$\frac{1}{x^2(x+a)^2}=\frac{A}{x}+\frac{B}{x^2}+\frac{C}{(x+a)}+\frac{D}{(x+a)^2}$
One method of finding the values of the constants A,B,C & D is as follows.
$Ax(x+a)^2+B(x+a)^2+C(x^2)(x+a)+Dx^2=1$
$Ax(x^2+a^2+2ax)+B(x^2+2ax+a^2)+C(x^3+ax^2)+Dx^2=1$
$A(x^3+a^2x+2ax^2)+B(x^2+2ax+a^2)+C(x^3+ax^2)+Dx^2=1$
$x^3(A+C)+x^2(2Aa+B+Ca+D)+x(Aa^2+2Ba)+Ba^2=1$
Equating coeffecients of $x^3,x^2,x^1,x^0$
$A+C=0$; $2Aa+B+Ca+D=0$; $Aa^2+2Ba=0$; $Ba^2=1$
$B=\frac{1}{a^2}$
$A=\frac{-2}{a^3}$
$C=\frac{2}{a^3}$
$D=\frac{1}{a^2}$
Is there a shorter method to find the values of A,B,C & D ?
 [/INST] In this equation:
$$Ax(x+a)^2+B(x+a)^2+C(x^2)(x+a)+Dx^2=1
$$
one little thing you can do is to evaluate at $x = -a$ to get $0 +0 +0 +D(-a)^2 = 1$ to get $D$. After that can evaluate at $x=0$ to get $B$.
</s>