If $a,b,c,d,e$ are real numbers such that $$ \left\{ \begin{array}{lcl} \phantom{0}40-e &=& a+b+c+d, \\ 400-e^2 &=& a^2+b^2+c^2+d^2, \end{array} \right. $$ find $\max(e)$.
In the solution provided, I don't understand equation $(1)$:
We know that \begin{align*} (40-e)^2 &= (a+b+c+d)^2 \\ &= a^2 + b^2 + c^2 + d^2 + 2(ab+ac+ad+bc+bd+cd). \end{align*} Now note that $2xy\leq x^2+y^2$ for all reals $x,y$. Hence $$ (40-e)^2 \leq 4(a^2+b^2+c^2+d^2). \tag{1} $$
I understand why $2xy\leq x^2+y^2$, but I'm not sure how the author derives the above inequality. $4(a^2+b^2+c^2+d^2)$ doesn't seem to represent the sum of two squares. The way the proof is worded so far implies this is obvious, so I think I'm clearly missing something. An explanation as to why the above inequality is true would be very much appreciated.
He is using it for $$2ab \leq a^2+b^2$$ $$2ac \leq a^2+c^2$$ $$2ad \leq a^2+d^2$$ $$2bc \leq b^2+c^2$$ $$2bd \leq b^2+d^2$$ and $$2cd \leq c^2+d^2$$