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!
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$.