8. Given complex numbers $z_{1}, z_{2}, z_{3}$ satisfy $\left|z_{1}\right|=\left|z_{2}\right|=\left|z_{3}\right|=1,\left|z_{1}+z_{2}+z_{3}\right|=r$, where $r$ is a given real number, then the real part of $\frac{z_{1}}{z_{2}}+\frac{z_{2}}{z_{3}}+\frac{z_{3}}{z_{1}}$ is $\qquad$ (expressed in terms of $r$).
Answer: $\frac{r^{2}-3}{2}$.
Solution: Let $w=\frac{z_{1}}{z_{2}}+\frac{z_{2}}{z_{3}}+\frac{z_{3}}{z_{1}}$. By the property of the modulus of complex numbers, we have
$$
\overline{z_{1}}=\frac{1}{z_{1}}, \quad \overline{z_{2}}=\frac{1}{z_{2}}, \quad \overline{z_{3}}=\frac{1}{z_{3}},
$$

Thus, $w=z_{1} \overline{z_{2}}+z_{2} \overline{z_{3}}+z_{3} \overline{z_{1}}$. Therefore,
$$
r^{2}=\left(z_{1}+z_{2}+z_{3}\right)\left(\overline{z_{1}}+\overline{z_{2}}+\overline{z_{3}}\right)=\left|z_{1}\right|^{2}+\left|z_{2}\right|^{2}+\left|z_{3}\right|^{2}+w+\bar{w}=3+2 \operatorname{Re} w,
$$

Solving for $\operatorname{Re} w=\frac{r^{2}-3}{2}$.