9. Let $x_{1}, x_{2}, \cdots, x_{n} \in \mathbf{R}^{+}$, define $S_{n}=\sum_{i=1}^{n}\left(x_{i}+\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)^{2}$.
(1) Find the minimum value of $S_{n}$;
(2) Under the condition $x_{1}^{2}+x_{2}^{2}+\cdots+x_{n}^{2}=1$, find the minimum value of $S_{n}$;
(3) Under the condition $x_{1}+x_{2}+\cdots+x_{n}=1$, find the minimum value of $S_{n}$. (2005 Zhejiang Province Mathematics
9. (1) $S_{n}=\sum_{i=1}^{n}\left(x_{i}+\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)^{2} \geqslant \sum_{i=1}^{n}\left(2 \sqrt{x_{i} \cdot \frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}}\right)^{2}=$ $4 \sum_{i=1}^{n} \frac{n-1}{n^{2}}=\frac{4(n-1)}{n}$

Therefore, when $x_{i}=\frac{\sqrt{n-1}}{n}$, $S_{n}$ reaches its minimum value.
(2) $S_{n}=\sum_{i=1}^{n}\left(x_{i}+\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)^{2}=\sum_{i=1}^{n}\left(x_{i}^{2}+2 \cdot \frac{n-1}{n^{2}}+\frac{(n-1)^{2}}{n^{4}} \cdot \frac{1}{x_{i}^{2}}\right)=1+$ $\frac{2(n-1)}{n}+\frac{(n-1)^{2}}{n^{4}} \sum_{i=1}^{n} \frac{1}{x_{i}^{2}}=1+\frac{2(n-1)}{n}+\frac{(n-1)^{2}}{n^{4}} \sum_{i=1}^{n} x_{i}^{2} \cdot \sum_{i=1}^{n} \frac{1}{x_{i}^{2}} \geqslant 1+$ $\frac{2(n-1)}{n}+\cdot \frac{(n-1)^{2}}{n^{4}} \cdot n^{2}=1+\frac{2(n-1)}{n}+\frac{(n-1)^{2}}{n^{2}}=\left(1+\frac{n-1}{n}\right)^{2}=(2-$ $\left.\frac{1}{n}\right)^{2}$.

Therefore, when $x_{i}=\frac{1}{\sqrt{n}}$, $S_{n}$ reaches its minimum value $\left(2-\frac{1}{n}\right)^{2}$.
(3) Because by the Cauchy-Schwarz inequality, $\left[\sum_{i=1}^{n} 1 \cdot\left(x_{i}+\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)\right]^{2} \leqslant\left(\sum_{i=1}^{n} 1^{2}\right) \cdot\left(\sum_{i=1}^{n}\left(x_{i}+\right.\right.$ $\left.\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)^{2}$ ), so $S_{n}=\sum_{i=1}^{n}\left(x_{i}+\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)^{2} \geqslant \frac{1}{n}\left[\sum_{i=1}^{n}\left(x_{i}+\frac{n-1}{n^{2}} \cdot \frac{1}{x_{i}}\right)\right]^{2}=$ $\frac{1}{n}\left[1+\frac{n-1}{n^{2}}\left(\sum_{i=1}^{n} x_{i}\right)\left(\sum_{i=1}^{n} \frac{1}{x_{i}}\right)\right]^{2} \geqslant \frac{1}{n}\left(1+\frac{n-1}{n^{2}} \cdot n^{2}\right)^{2}=n$.

Therefore, when $x_{i}=\frac{1}{n}$, $S_{n}$ reaches its minimum value $n$.