Condition for the roots of $x^n+a_1x^{n-1}+a_2x^{n-2}+\ldots+a_n=0$ not all to be real 
Problem Statement:-
Show that the roots of the polynomial equation $$x^n+a_1x^{n-1}+a_2x^{n-2}+\ldots+a_n=0$$ cannot be all real if $(n-1){a_1}^{2}-2na_2\lt0$
The inequality was wrongly written before it has been changed now.


My attempt:-
Attempt 1:-
First I tried differentiating the the function $f(x)=x^n+a_1x^{n-1}+a_2x^{n-2}+\ldots+a_n$ to get 
$$\begin{aligned}
f'(x) &= nx^{n-1}+(n-1)a_1x^{n-2}+(n-2)a_2x^{n-3}+\ldots+a_{n-1}\\
&= \dfrac{n}{x}(f(x))-(a_1x^{n-2}+a_2x^{n-3}+\ldots+na_{n-1})-\dfrac{na_n}{x}
\end{aligned}$$
I was thinking that if I could prove that the no of distinct roots of $f'(x)$ are less than $\left \lfloor{\dfrac{n}{2}}\right\rfloor$, then all the roots of $f(x)=0$ are not real. But I couldn't figure out how to manipulate $f'(x)$ so as to arrive at the condition that the question asks to prove or for that matter how to prove that the no. of roots of $f'(x)$ are less than $\left \lfloor{\dfrac{n}{2}}\right\rfloor$.
Attempt 2:-
I thought that why not start messing around with the expression that we are needed to prove $\lt0$, i.e. $(n-1){a_1}^{2}-2na_2$.
$a_1=-\sum{\alpha} \qquad\qquad a_2=\sum{\alpha\beta}$
So, $$(n-1){a_1}^{2}-2na_2=(n-1)\left(\sum\alpha\right)^2-2n\left(\sum{\alpha\beta}\right)=n\sum{\alpha^2}-\left(\sum{\alpha}\right)^2$$
I don't know how to arrive at the required condition from the point that I reached in this attempt.

Can you push me in the right direction by giving a hint as to what should be my line of thought while attempting the problem

 A: Consider $n$ reals $(\alpha_1,\dots,\alpha_n)$. By Cauchy-Schwarz,
$$(1.\alpha_1+\dots+1.\alpha_n)^2\le (1^2+\dots+1^2)(\alpha_1^2+\dots+\alpha_n^2)$$
so
$$\left(\sum \alpha_i\right)^2\le n\sum \alpha_i^2$$
What you proved with your second try is that for your polynomial, this inequality doesn't stand. So the hypothesis must be wrong, and not all $\alpha_i$ are real.
You were close :-)
A: The inequality should be in the other direction, i.e. the roots cannot be all real if $(n - 1)a_1^2 - 2na_2 < 0$. For example, the equation $x^2 - 3x + 2$ has the two real solutions $x = 1$ and $x = 2$, but $1 \cdot 3^2 - 2\cdot2\cdot2 = 1 > 0$.
Your second attempt leads to the solution.
Let $\alpha_1, \ldots, \alpha_n$ denote the roots of the polynomial (according to their multiplicity). Then $a_1 = -\sum \limits_{i} \alpha_i$ and $a_2 = \sum \limits_{i < j} \alpha_i \alpha_j$. Now if all $\alpha_i$ are real, then by Jensen's inequality
$$\left( \sum \limits_{i} \alpha_i\right)^2 = n^2 \left( \sum \limits_i\frac{1}{n} \alpha_i\right)^2 \le n^2 \sum \limits_i \frac{1}{n} \alpha_i^2 = n \sum \limits_{i} \alpha_i^2$$
holds, but this means
$$(n - 1)a_1^2 - 2n a_2 = n \sum_i \alpha_i^2 - \left(\sum \limits_i \alpha_i\right)^2 \ge 0.$$
