For 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(i)+f(1)+f(-1)+f(-i).
Edit: nvm I figured it out, the answer was 2:
f(i) is not a real number so that means i^2 = -1.
f(1) is real, so 1+2=3
f(-1) is real, so -1+2=1
f(-i) is not real so (-i)^2 = -1
-1 + 3 + 1 - 1 = 2