There is an easy method to perform a partial fraction decomposition - described here, under the "Repeated Real Roots" title, for the coefficient A2.
The problem is - this method doesn't work in some cases, for example:
$$ \frac{1}{(2 + j \omega)^2 \, (4 + j \omega)} = \frac{A}{2 + j \omega} + \frac{B}{(2 + j \omega)^2} + \frac{C}{4 + j \omega} $$
The coefficients B,C get their proper value:
$$
B = \frac{1}{4 + j \omega} \Big|_{\omega=2j} = \frac 12
$$
$$
C = \frac{1}{(2 + j \omega)^2} \Big|_{\omega=4j} = \frac 14
$$
But the coefficient A get a false value:
$$
A = \frac{d}{d \omega} \left( \frac{1}{4 + j \omega} \right)\Big|_{\omega=2j}
= \frac{-j}{4}
$$
The true/proper value for A is $-\frac 14$.
I wonder what is the general formula for this kind of elegant/quick/easy trick to find the coefficients during partial fraction decomposition?
suppose that you want to decompose $\frac{P(x)}{Q(x) (x-\rho)^n}$, with $Q(\rho) \ne 0$ :
$$\frac{P(x)}{Q(x) (x-\rho)^n} - \frac{a}{(x-\rho)^n} = \frac{P(x) - a Q(x) }{Q(x) (x-\rho)^n} = \frac{(x-\rho) S(x) + b }{Q(x) (x-\rho)^n} = \frac{S(x)}{Q(x) (x-\rho)^{n-1}} + \frac{b }{Q(x) (x-\rho)^n}$$
($S(x)$ and $b$ are obtained by Euclidean division of $P(x) - a Q(x)$ by $(x-\rho)$)
the target is to choose $a$ such that $b= 0$ : hence choosing $a$ such that the polynomial $P(x) - a Q(x)$ vanishes at $x = \rho$, which is always possible since $Q(\rho) \ne 0$ :
$$a = \frac{P(\rho)}{Q(\rho)}$$
hence, by induction we see that we can decompose any rational function :
$$\frac{P(x)}{\prod_i (x-\rho_i)^{e_i}} = R(x) + \sum_i \sum_{k=1}^{e_i} \frac{a_{i,k}}{(x-\rho_i)^{k}}$$