Proving that if $P(X)=a_n X^n+ \cdots+a_1 X + a_0$ has only real and simple roots then $a_{k-1}a_{k+1} \le a_k^2$ How to prove that if $P(X)=a_n X^n+ \cdots+a_1 X + a_0 \in \mathbb R[X]$ has only real and simple roots then $a_{k-1}a_{k+1} \le a_k^2$ for $1 \le k \le n-1$?
 A: How about $P(X)=X^2+X+1$?  We have $a_0=a_1=a_2=1$, so $a_1^2\geq a_0a_2$, but $P(X)$ has no real roots.
Are you trying to somehow make a connection with Newton's Inequalities (see https://en.wikipedia.org/wiki/Newton%27s_inequalities)?
EDIT: The question has been changed.  So, the counterexample above does not reflect the current question.

Solution to the Current Version:
This proof does not assume that the roots of $P(X)$ are simple.  The only requirement is that the roots are real.  Without loss of generality, we can assume that $a_n\neq 0$.  Let $k\in\{1,2,\ldots,n-1\}$.  By Newton's Inequalities, $$\left(\frac{(-1)^{n-k}a_k}{\binom{n}{k}a_n}\right)^2 \geq \left(\frac{(-1)^{n-k+1}a_{k-1}}{\binom{n}{k-1}a_n}\right)\left(\frac{(-1)^{n-k-1}a_{k+1}}{\binom{n}{k+1}a_n}\right)\,.$$
Therefore,
$$a_k^2\geq \frac{\binom{n}{k}^2}{\binom{n}{k-1}\binom{n}{k+1}}a_{k-1}a_{k+1}\,.$$
If $a_{k-1}a_{k+1}\leq 0$, the inequality $a_{k-1}a_{k+1}\leq a_k^2$ is trivial.  If $a_{k-1}a_{k+1}>0$, we observe that $\binom{n}{k}^2> \binom{n}{k-1}\binom{n}{k+1}$, so
$$a_k^2\geq \frac{\binom{n}{k}^2}{\binom{n}{k-1}\binom{n}{k+1}}a_{k-1}a_{k+1}> a_{k-1}a_{k+1}\,.$$
A: Here is another proof.
Suppose $P=\sum_{k=0}^na_kX^k$ is a polynomial with degree $n\ge2$ and real coefficients.
Suppose also that $P$ has $n$ distinct real roots $\rho_1,\dots,\rho_n$. It is well known that :
$$\frac{P'}P=\sum_{k=1}^n\frac1{X-\rho_k}$$Derivation of the previous equality leads to :
$$\frac{P''P-P'^2}{P^2}=-\sum_{k=1}^n\frac1{\left(X-\rho_k\right)^2}\tag{$\star$}$$Hence :
$$\forall t\in\mathbb{R},\,P''(t)P(t)<P'(t)^2\tag{$\star\star$}$$This is true when $t\neq\rho_k$ for all $k\in\{1,\ldots,n\}$ as a consequence of $(\star)$  and this is also true when $t=\rho_k$ for some $k$, since $P(\rho_k)=0$ and $P'(\rho_k)\neq0$.
By Rolle's theorem, all the polynomials $P,P',\ldots,P^{(n-2)}$ have distinct real roots. Replacing $P$ by $P^{(k)}$ (with $0\le k\le n-2$) in $(\star\star)$, we get :
$$\forall t\in\mathbb{R},P^{(k+2)}(t)P^{(k)}(t)<P^{(k+1)}(t)^2$$
Now, evaluating at $t=0$ :
$$P^{(k+2)}(0)P^{(k)}(0)<P^{(k+1)}(0)^2$$In other words :
$$(k+2)!\,a_{k+2}\,k!\,a_k<[(k+1)!]^2\,a_{k+1}^2$$
After simplification and re-indexation :
$$\boxed{\forall k\in\{1,\ldots,n-1\},\,a_{k+1}a_{k-1}<\frac{k}{k+1}a_{k}^2}$$
which is slightly better than the required inequalities.
Remark - Those necessary conditions are not sufficient. For example, take $P=(X-1)^2(X+1)=X^3-3X+2$, for which $1$ is a root with multiplicity $2$ :
$$a_2a_0=0<\frac92=\frac12a_1$$
$$a_3a_1=-3<0=\frac23a_2$$
