I have recently been reading about inequalities, and in this section discussing AM-GM inequalities, I was faced by this question that I couldn't understand its solution. Note: I cant find a relationship between the solution and AM-GM. I would be very thankful if someone can take me through the solution.
The problem is as follows :-
Let $a_1,a_2,...,a_n$ be positive numbers such that $\frac{1}{1+a_1}+\frac{1}{1+a_2}+...+\frac{1}{1+a_n} = 1$. Prove that
$$\sqrt{a_1}+...+\sqrt{a_n}\ge(n-1)(\frac{1}{\sqrt{a_1}}+...+\frac{1}{\sqrt{a_n}})$$
The solution was :-
$\sum_{i=1}^n \frac{1}{1+a_i} = 1 \Rightarrow \sum_{i=1}^n \frac{a_i}{1+a_i} = n-1$
Observe that
$$\sum_{i=1}^n \sqrt{a_i}-(n-1)\sum_{i=1}^n \frac{1}{\sqrt{a_i}}=\sum_{i=1}^n \frac{1}{1+a_i}\sum_{i=1}^n \sqrt{a_i} - \sum_{i=1}^n \frac{a_i}{1+a_i}\sum_{i=1}^n \frac{1}{\sqrt{a_i}}$$
$$= \sum_{i,j} \frac{a_i-a_j}{(1+a_j)\sqrt{a_i}}=\sum_{i\gt j} \frac{(\sqrt{a_i}\sqrt{a_j}-1)(\sqrt{a_i}-\sqrt{a_j})^2(\sqrt{a_i}+\sqrt{a_j})}{(1+a_i)(1+a_j)\sqrt{a_i}\sqrt{a_j}}$$
Since $1 \ge \frac{1}{1+a_i}+\frac{1}{1+a_j}=\frac{2+a_i+a_j}{1+a_i+a_j+a_ia_j}$, we can deduce that $a_ia_j \ge 1$. Hence the terms of the last sum are positive.
I am really struggling to understand this proof and if someone could simplify it and (maybe show where it is related to AM-GM inequalities), I would be very grateful.