Consider the function \(f(x)=\sqrt{x}+\frac{1}{\sqrt{x}}=\frac{x+1}{\sqrt{x}}, x\in(0,+ \infty).\) It is easy to verify that \(f\) is non-decreasing on \((1,+\infty)\) and that \(f(x)=f\left(\frac{1}{x}\right)\) for all \(x>0.\) Furthermore, from the given conditions, it follows that only \(x_1\) can be less than \(1\) and that \(\frac{1}{x_2+1} \leq 1-\frac{1}{x_1+1}=\frac{x_1}{x_1+1}.\) Hence, \(\frac{1}{x_1}\leq x_2.\) It is now clear that (for both cases \(1\leq x_1\) and \(x<1\)) that

Equality is attained if and only if \(\frac{1}{x_1+1} = \ldots = \frac{1}{x_n+1},\) or \(\frac{x_1+1}{\sqrt{x_1}}=\ldots = \frac{x_n+1}{\sqrt{x_n}},\) which implies that \(x_1=x_2=\ldots=x_n.\) Thus equality holds if and only if \(x_1=x_2=\ldots=x_n=n-1._\square\)