Inequality problem: $(a_1+a_2+\dots+a_n)^2 \le n^2 (a_1^2+a_2^2+\dots+a_n^2)$

cauchy-schwarz-inequalityinequality

If $a_1,a_2,\dots,a_n \in R^+$, then prove that
$$(a_1+a_2+\dots+a_n)^2 \le n^2 (a_1^2+a_2^2+\dots+a_n^2)$$
I attempted to solve this problem but was unable to.I used the Cauchy Schwarz Inequality for the two sets $\{1,1,1, \dots\}$ and $\{a_1,a_2,\dots,a_n\}$ but the result was $$(a_1+a_2+\dots+a_n)^2 \le n(a_1^2+a_2^2+\dots+a_n^2).$$
Could you please help me in solving this problem?

Best Answer

While your attempt leads to an answer, as explained in a comment, by noting $n \le n^2$, there is a way that seems more elementary to me:

Let $a_m$ be the largest of the $a_i$, then $$(a_1+a_2+\dots+a_n)^2 \le (na_m)^2 = n^2 a_m^2 \le n^2 (a_1^2+a_2^2+\dots+a_n^2) $$