Separate f(z) into real and imaginary parts I'm doing some practice problems about complex numbers.  I want to break $f(z)=(1-z)/(1+z)$ into real and imaginary parts $u(x,y)$ and $v(x,y)$ such that $f(z)=u+iv$.  I did a different problem like this correctly, so I think it's more the algebra than the complex number aspect that's hard for me here.  I know the answer is 
$$u=\frac{1-x^2-y^2}{(1+x)+y^2}, v=\frac{-2y}{(1+x)^2+y^2}$$
$z=x+iy$, so $$f(z)=\frac{1-(x+iy)}{1+(x+iy)}=\frac{1-x-iy}{1+x+iy}$$
I get that it needs to be split into two fractions so that the $i$ can be pulled out.  I just have no idea how to make that work.  Or the rest of the algebra for that matter.
 A: You just need to realise the denominator: 
$$f(z) = \frac{(1-x) - iy}{(1+x) + iy} \times \frac{(1+x) - iy}{(1+x)-iy}$$ $$= \frac{(1-x)(1+x) -y^2}{(1+x)^2+y^2} + \frac{i(-y(1-x) - y(1+x))}{(1+x)^2 + y^2}$$ $$= \frac{1-x^2 - y^2}{(1+x)^2 + y^2} + i \frac{-y + yx - y - yx}{(1+x)^2 + y^2}  $$ and so it is clear that $u = \frac{1-x^2-y^2}{(1+x)^2 + y^2}$ and $v = \frac{-2y}{(1+x)^2 + y^2}$ as required. 
A: $$f(z)=\frac {(1-z)}{(1+z)} = \frac {(1-z)(1+\bar z)}{(1+z)(1+\bar z)}$$
$$=\frac {1-z+\bar z -z\bar z}{1+z+\bar z +z\bar z}$$
The bottom part is real so you can multiply the top and split real and imaginary parts.
A: Hint: $\frac{1}{a+i*b} = \frac{1}{a+i*b}\frac{a-i*b}{a-i*b} = \frac{a+i*b}{a^2+b^2}$
A: $f(z)=\frac{(1-x)-iy}{(1+x)+iy}\times\frac{(1+x)-iy}{(1+x)-iy}=\frac{(1-x^2-y^2)}{(1+x)^2+y^2}+i\frac{-2y}{(1+x)^2+y^2}$.
A: \begin{align}
\dfrac{1-z}{1+z}
&= \dfrac{1-z}{1+z}\dfrac{1+\bar{z}}{1+\bar{z}} \\
&= \dfrac{1-|z|^2-(z-\bar{z})}{|1+z|^2} \\
&= \dfrac{1-|z|^2}{|1+z|^2}+i\dfrac{-2y}{|1+z|^2}\\
&= \dfrac{1-x^2-y^2}{(1+x)^2+y^2}+i\dfrac{-2y}{(1+x)^2+y^2}
\end{align}
A: What I would do is this:
Given
$f(z) = \dfrac{1 -z}{1 + z}, \tag 1$
multiply both the numerator and denominator by 
$\overline{1 + z} = 1 + \bar z; \tag 2$
this will cause the denominator to become real; with
$z = x + iy, \tag 4$
we have
$(1 + z)(1 + \bar z) = (1 + x + iy)(1 + x - iy) = (1 + x)^2 + y^2; \tag 5$
also,
$(1 - z)(1 + \bar z) = (1 - x - iy)(1 + x - iy) = 1 + x - iy - x - x^2 + ixy - iy- ixy - y^2 = (1 - x^2 - y^2) -2iy; \tag 6$
thus,
$f(z) = f(x, y) = u(x, y) + iv(x, y) = \dfrac{1 - x^2 - y^2}{(1 + x)^2 + y^2} - i\dfrac{2y}{(1 + x)^2 + y^2}. \tag 7$
