Partial Fraction Decomposition of $\frac{z+4}{(z+1+2i)(z+1-2i)}$ I have the fraction $\frac{z+4}{(z+1+2i)(z+1-2i)}$. I want to partial decompose this fraction, but I am not seeing how to do it. I know that the answer is a=$\frac{1}{2}$+$\frac{3i}{4}$ and b=$\frac{1}{2}$-$\frac{3i}{4}$, where
$$\frac{z+4}{(z+1+2i)(z+1-2i)}= \frac{a}{z+1+2i}+\frac{b}{z+1-2i},\quad a,b \in \mathbb C.
$$
I tried to write $a=c+di$ and $b=e+fi$ but I didn't got the answer. I also tried $a(z+1-2i) + b(z+1+2i)$ but this is not right because it gave me $a+b=1$ and $a+b=4$.
Thank you for your help in advance!
 A: Let $k=1+2i$, then we want to find $a$ and $b$ such that
$$\frac{z+4}{(z+k)(z+\bar{k})}=\frac{a}{z+k}+\frac{b}{z+\bar{k}}$$
Or $$z+4=(z+\bar{k})a+(z+k)b$$
Then setting $z=-\bar{k}$ and $z=-k$ we obtain $b=\frac{-\bar{k}+4}{k-\bar{k}}=\frac{-(1-2i)+4}{(1+2i)-(1-2i)}=\frac{3+2i}{4i}=\frac{1}{2}-\frac{3}{4}i$ and $a=\frac{1}{2}+\frac{3}{4}i$ respectively.
A: Starting with $a(z+1-2i) + b(z+1+2i)=z+4$ should give the right answer; in particular it doesn't lead to $1=4$. Your comment about "the coefficient of $i$" makes it pretty clear what went wrong: Rewrite as $$(a(z+1)+b(z+1))+i(-2a+2b)=z+4;\tag{*}$$now looking at "the coefficient of $i$" gives $$-2a+2b=0,$$etc. That's wrong, because for example the imaginary part of $i(-2a+2b)$ is not $-2a+2b$, and the imaginary part of $z+4$ is not $0$, because $a$, $b$ and $z$ are complex numbers.
Instead simply do the usual thing. Collect terms: $$(a+b)z+(a(1-2i)+b(1+2i))=z+4.$$Now the constant term in (*) shows that $$(1-2i)a+(1+2i)b=0,$$the coefficient of $z$ shows that $$a+b=1,$$and you can simply solve those two equations for $a$ and $b$.
