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
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 :-)