17. Let the complex number $z$ satisfy $|z|=1$. Try to find the maximum and minimum values of $\left|z^{3}-3 z-2\right|$.
17. From $\left|z^{3}-3 z-2\right| \geqslant 0$, when $z=-1$, $\left|z^{3}-3 z-2\right|_{\text {min }}=0$; also $\left|z^{3}-3 z-2\right|=\mid(z+1)^{2}$
$$
\begin{array}{l}
(z-2)|=| z+\left.1\right|^{2} \cdot|z-2|, \text { and }|z+1|^{2}=(z+1)(\bar{z}+1)=2+2 \operatorname{Re}(z),|z-2|^{2}=(z-2)(\bar{z}-2) \\
=5-4 \operatorname{Re}(z) \text {. Let } z=x+y i, x, y \in \mathbf{R}, x \in[-1,1] \text {, so } \\
\quad\left|z^{3}-3 z-2\right|=(2+2 x) \sqrt{5-4 x} \leqslant\left[\frac{(2+2 x)+(2+2 x)+(5-4 x)}{3}\right]^{\frac{3}{2}}=3 \sqrt{3},
\end{array}
$$

When and only when $z=\frac{1 \pm \sqrt{3} i}{2}$, $\left|z^{3}-3 z-2\right|_{\max }=3 \sqrt{3}$.