TITLE: Easy partial fraction decomposition with complex numbers
QUESTION [6 upvotes]: 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?

REPLY [2 votes]: Here are the mechanics of the trick.  Let's multiply your equation by $4+j\omega$:
$$
\frac{1}{(2 + j \omega)^2 \, }
 = \frac{(4 + j \omega)A}{2 + j \omega}
 + \frac{(4 + j \omega)B}{(2 + j \omega)^2}
 + C.
$$
Now things nicely fall out if we look at $\omega = 4j$:
$$\frac{1}{(2-4)^2} = C.$$
But ... the left side is just the original expression with the $(4+j\omega)$ "covered up" (since we multiplied everything by $4+j\omega$).  Evaluating this covered-up expression at the root we covered up gives the coefficient.
Things don't all cancel away with a repeated root.  Multiply by $2 + j\omega$:
$$
\frac{1}{(2 + j \omega) \, (4 + j \omega)}
 = A
 + \frac{B}{(2 + j \omega)}
 + \frac{(2 + j \omega)C}{4 + j \omega}.
$$
There's still the $2 + j \omega$ in the denominator under $B$ so the "trick" fails and we have to find it some other way.