Let $P \in \mathbb{R}[X]$, with $\deg P = n$. Is it true that
$P$ has only real roots $\quad \Longleftrightarrow \quad P\cdot P'' + (\frac{1}{n}-1)P'^2 \leq 0$ ?
The direct implication can be shown by using Cauchy-Schwarz inequality, but I still lack the reverse (if true).
I apologize to those who have already answered, but a new condition arise: what if $P$ has only nonnegative coefficients?