For all complex numbers z, let f(z)={z2 if z is not real,−z2 if z is real.
Find f(f(f(f(1+i)))).
Let's define z0=1+i. Then we want to find f(f(f(f(z0)))).
z is not real, so we havef(z0)=z20=(1+i)2=1+2i+i2=1+2i−1=2i.
So f(z0)=2i is not real either, and therefore f(f(z0))=f(z0)2=(2i)2=−4.
Now things change, because f(f(z0))=−4 is real and so f(f(f(z0)))=−(−4)2=−16.
This is still real, so we have finally:
f(f(f(f(z0))))=−(−16)2=−256