Artificial intelligent assistant

Condition with square roots for positivity of polynomial on interval I recently encountered the following curious property : Let $f$ be a quadratic real polynomial, with $f(0),f(\frac{1}{2}),f(1)$ positive. Then $f$ is nonnegative on $[0,1]$ if and only if $$ \Bigg|\sqrt{f(1)}-\sqrt{f(0)}\ \Bigg| \leq 2\sqrt{f\left(\frac{1}{2}\right)} $$ I found a straightforward but somewhat painstaking, computational proof of this (I will eventually post that proof if no feedback arrives). I am hoping for better proofs, which is why I'm posting it here.

Here is an improved version of my original proof : Let $\delta=f(\frac{1}{2})-\left(\frac{\sqrt{f(1)}-\sqrt{f(0)}}{2}\right)^2$ and $a=\sqrt{f(0)}, b=\sqrt{f(1)}$. Using Lagrange interpolation, we have

$$ \begin{array}{lcl} f(t) &=& f(0) (1-t)(1-2t) + f(\frac{1}{2})4t(1-t)+f(1)t(2t-1) \\\ &=& a^2 (1-t)(1-2t) + ((a-b)^2+4\delta) t(1-t)+ b^2 t(2t-1) \\\ &=& (bt-a(1-t))^2+4\delta t(1-t) \tag{1} \end{array} $$

If $\delta \geq 0$, then $f$ is nonnegative on $[0,1]$ by (1). Conversely, suppose $\delta <0$. There is a $t_0\in (0,1)$ such that $bt_0=a(1-t_0)$ (namely, $t_0=\frac{a}{a+b}$), and from (1) we deduce $f(t_0)=4\delta t_0(1-t_0)<0$, so $f$ is not nonnegative on $[0,1]$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy da9066fef9a66dd88cbd5fff1ed5c39a