17 Let $n \geqslant 2, x_{1}, x_{2}, \cdots, x_{n}$ be real numbers, and $\sum_{i=1}^{n} x_{i}^{2}+\sum_{i=1}^{n-1} x_{i} x_{i+1}=1$, for each given positive integer $k, 1 \leqslant k \leqslant n$, find the maximum value of $\left|x_{k}\right|$.
17. From the given conditions, we have $2 \sum_{i=1}^{n} x_{i}^{2} + 2 \sum_{i=1}^{n-1} x_{i} x_{i+1} = 2$. That is, $x_{1}^{2} + (x_{1} + x_{2})^{2} + (x_{2} + x_{3})^{2} + \cdots + (x_{n-2} + x_{n-1})^{2} + (x_{n-1} + x_{n})^{2} + x_{n}^{2} = 2$. For a given positive integer $k$, $1 \leqslant k \leqslant n$, by the mean inequality, we get $\sqrt{\frac{x_{1}^{2} + (x_{1} + x_{2})^{2} + \cdots + (x_{k-1} + x_{k})^{2}}{k}} \geqslant \frac{|x_{1}| + |x_{1} + x_{2}| + \cdots + |x_{k-1} + x_{k}|}{k} \geqslant \frac{|x_{1} - (x_{1} + x_{2}) + \cdots + (-1)^{k-1} (x_{k-1} + x_{k})|}{k} = \frac{|x_{k}|}{k}$. Therefore, $\frac{x_{1}^{2} + (x_{1} + x_{2})^{2} + \cdots + (x_{k-1} + x_{k})^{2}}{k} \geqslant \frac{x_{k}^{2}}{k^{2}}$, which means $x_{1}^{2} + (x_{1} + x_{2})^{2} + \cdots + (x_{k-1} + x_{k})^{2} \geqslant \frac{x_{k}^{2}}{k}$. Similarly, we can get $(x_{k} + x_{k+1})^{2} + \cdots + (x_{n-1} + x_{n})^{2} + x_{n}^{2} \geqslant \frac{x_{k}^{2}}{n-k+1}$. Adding the above two inequalities, we get $|x_{k}| \leqslant \sqrt{\frac{2 k (n+1-k)}{n+1}} (k=1,2, \cdots, n)$, with equality holding if and only if $x_{1} = -(x_{1} + x_{2}) = (x_{2} + x_{3}) = \cdots = (-1)^{k-1} (x_{k-1} + x_{k})$ and $x_{k} + x_{k+1} = -(x_{k+1} + x_{k+2}) = \cdots = (-1)^{n-k} x_{n}$, that is, if and only if $x_{i} = x_{k} (-1)^{i-k} \frac{i}{k} (i=1,2, \cdots, k-1)$ and $x_{j} = x_{k} (-1)^{j-k} \frac{n+1-j}{n-k+1} (j=k+1, k+2, \cdots, n)$, then $|x_{k}| = \sqrt{\frac{2 k (n+1-k)}{n+1}}$. Thus, $|x_{k}|_{\max} = \sqrt{\frac{2 k (n+1-k)}{n+1}}$.