30. Let $f(x, y, z)=\sin ^{2}(x-y)+\sin ^{2}(y-z)+\sin ^{2}(z-x), x, y, z \in \mathbf{R}$, find the maximum value of $f(x, y, z)$. (2007 Zhejiang Province Mathematics Competition Problem)
30.
$$\begin{array}{l}
f(x, y, z)=\sin ^{2}(x-y)+\sin ^{2}(y-z)+\sin ^{2}(z-x)= \\
\frac{1}{2}[1-\cos 2(x-y)+1-\cos 2(y-z)+1-\cos 2(z-x)]= \\
\frac{3}{2}-\frac{1}{2}[(\cos 2 x \cos 2 y+\sin 2 x \sin 2 y)+ \\
(\cos 2 y \cos 2 z+\sin 2 y \sin 2 z)+ \\
(\cos 2 z \cos 2 x+\sin 2 z \sin 2 x)] = \\
\frac{3}{2}-\frac{1}{4}\left[(\cos 2 x+\cos 2 y+\cos 2 z)^{2}+(\sin 2 x+\sin 2 y+\sin 2 z)^{2}-3\right]= \\
\frac{9}{4}-\frac{1}{4}\left[(\cos 2 x+\cos 2 y+\cos 2 z)^{2}+(\sin 2 x+\sin 2 y+\sin 2 z)^{2}\right] \leqslant \frac{9}{4}
\end{array}$$

When $\cos 2 x+\cos 2 y+\cos 2 z=\sin 2 x+\sin 2 y+\sin 2 z=0$, $f(x, y, z)$ reaches its maximum value $\frac{9}{4}$. For example, when $x=0, y=\frac{\pi}{3}, z=\frac{2 \pi}{3}$, $f(x, y, z)$ reaches its maximum value $\frac{9}{4}$.