(4) If $|z|=2, u=\left|z^{2}-z+1\right|$, find $\max u$ and $\min u$.

 untranslated text is retained in its original format and line breaks are preserved.
(Answer: When $x=-2$, $u_{\text {max }}=7$; When $x=\frac{5}{4}$, $\min u=\frac{3 \sqrt{3}}{2}$ )