For all complex numbers z, let \(f(z) = \left\{ \begin{array}{cl} z^{2}&\text{ if }z\text{ is not real}, \\ -z^2 &\text{ if }z\text{ is real}. \end{array} \right.\)
Find \(f(f(f(f(1+i))))\).
Let's define \(z_0=1+i\). Then we want to find \(f(f(f(f(z_0))))\).
z is not real, so we have\( f(z_0)=z_0^2=(1+i)^2=1+2i+i^2=1+2i-1=2i\).
So \(f(z_0)=2i\) is not real either, and therefore \( f(f(z_0))=f(z_0)^2=(2i)^2=-4.\)
Now things change, because \(f(f(z_0))=-4\) is real and so \(f(f(f(z_0)))=-(-4)^2=-16\).
This is still real, so we have finally:
\(f(f(f(f(z_0))))=-(-16)^2=-256\)