One question on a problem set was the following:
Show that $x^2 - y^2 = 1$ can be rewritten as $z^2 + \bar{z}^2 = 2$. (With $z = x + iy$)
So I started working from the first expression based on the algebraic definition of $Re$ and $Im$ to see where it would lead me:
$$ \begin{align} x^2 - y^2 & = Re(z)^2 - Im(z)^2\\ & = (\frac{z + \bar{z}}{2})^2 - (\frac{z - \bar{z}}{2})^2\\ & = \frac{1}{4}(z^2 - z^2 + 2z\bar{z} + 2z\bar{z} + \bar{z}^2 - \bar{z}^2)\\ & = \frac{1}{4}(4z\bar{z}) \\ & = z\bar{z} \end{align} $$
Okay, so this is progress I suppose, but if we look more closely we actually see that this is wrong:
$$ z\bar{z} = (x + iy)(x - iy) = x^2 + y^2 $$
... What the heck? How did that happen, we started with $x^2 + y^2$ and ended up with $x^2 + y^2$. What happened here? What is it that I'm missing that's causing this to happen.
EDIT: I also knew from the beginning that $x^2 - y^2 = z^2$, but the question asked me to solve it in terms of $Re$ and $Im$, so that's what I tried to do.
Note that $\operatorname{Im}(z) = \dfrac{1}{2\color{red}{i}}(z - \bar{z})$ so
$$\operatorname{Re}(z)^2 - \operatorname{Im(z)}^2 = \left(\frac{z + \bar{z}}{2}\right)^2 - \left(\frac{z - \bar{z}}{2i}\right)^2 = \left(\frac{z + \bar{z}}{2}\right)^2 + \left(\frac{z - \bar{z}}{2}\right)^2.$$