2. Given positive numbers $x_{i}(i=1,2, \cdots, n)$, such that $\sum_{i=1}^{n} x_{1}=1$. Let
$$
S=\max \left\{\frac{x_{1}}{1+x_{1}}, \frac{x_{2}}{1+x_{1}+x_{2}}, \cdots, \frac{x_{n}}{1+x_{1}+x_{2}+\cdots+x_{n}}\right\} \text {. }
$$

Find the minimum value of $S$.
(Tip: $1-S \leqslant \frac{1+x_{1}+\cdots+x_{k-1}}{1+x_{1}+\cdots+x_{k}}(k=1,2, \cdots$, $n)$, then $(1-S)^{n} \leqslant \frac{1}{2} \Rightarrow S \geqslant 1-\sqrt[n]{\frac{1}{2}}$.)
3. Let $x_{i} \geqslant 0(i=1,2, \cdots, n)$, and $\sum_{i=1}^{n} x_{i}=1(n \geqslant 2)$. Find the maximum value of $\sum_{1 \leqslant i<j \leqslant n} x_{1} x_{j}\left(x_{1}+x_{j}\right)$.
(Tip: $\sum_{1 \leqslant i<j \leqslant n} x_{i} x_{j}\left(x_{i}+x_{j}\right)=\sum_{i=1}^{n}\left(x_{i}^{2}-x_{i}^{3}\right)$, follow Example 6. The maximum value is $\frac{1}{4}$. )