<s>[INST] Trouble with partial fractions and complex numbers $$f(z) = \frac{3}{(z+1)(z-i)} = \frac{A}{z+1} + \frac{B}{z-i}$$
$$z(A + B) + B - Ai = 3$$
$$A + B = 0$$
$$B-Ai=3$$
Somehow, I end up with $B = - \frac{3}{(1+i)}$
Is that the way to go?
 [/INST] One practical way to do partial fractions which are of the type $\frac{1}{(x-a)(x-b)}$ is to simply let the answer be $\frac{1}{x-a}-\frac{1}{x-b}$ and adjust the constant term after calculation. In our case we have:
$$\frac{1}{z+1}-\frac{1}{z-i}=\frac{z-i-z-1}{(z+1)(z-i)}\\=-\frac{1+i}{(z+1)(z-i)}$$ from which one directly infers that we must have:
$$\frac{1}{(z+1)(z-i)}=-\frac{1}{1+i}\Big(\frac{1}{z+1}-\frac{1}{z-i}\Big)$$
or that
$$\frac{3}{(z+1)(z-i)}=-\frac{3}{1+i}\Big(\frac{1}{z+1}-\frac{1}{z-i}\Big)$$
This technique is usually much quicker than solving by forming linear equations.
</s>