For $n (n\geq1)$ non-negative real numbers $x_1,x_2,\cdots,x_n$, if their summation is fixed $$ \sum_{i=1}^{n}x_i=a, $$ please prove $$ \sum_{i=1}^nx_i^2\leq a^2. $$
My solution:
I prove this question using mathematical induction.
Suppose in the sequence, $m$ elements ($y_1,\cdots y_m$) are positive and the others are zero.
For $m=1$, the result is apparent. For $m=2$, we have $y_1^2+y_2^2\leq(y_1+y_2)^2=a^2$.
Suppose when $m=s (s\geq3)$, the result $$\sum_{i=1}^nx_i^2=\sum_{i=1}^{s}y_i^2\leq a^2$$ holds.
For $m=s+1$,suppose these elements are $y_1,y_2,\cdots y_{s+1}$. We have $$ \sum_{i=1}^{n}x_i^2=\sum_{i=1}^{s+1}y_i^2=y_1^2+y_2^2+\sum_{i=3}^{s}y_i^2\leq(y_1+y_2)^2+\sum_{i=3}^{s}y_i^2\leq a^2. $$
NOTE:
This solution only involves elementary mathematical knowledge, but I want to know whether there is a/an better/advanced solution.