Let $\mathbb R\_d[t]$ be the set of univariate polynomials in the variable $t$ of degree $d$, and $S$ be the set of elements of $\mathbb R\_d[t]$ that are nonnegative on $[0, 1]$. Does the following equivalent hold for a polynomial $p \in \mathbb R\_d[t]$?


$$p \in S \iff \int\_0^1 p(t) q(t) \ge 0 \; \forall q \in S.$$



For univariate polynomial is non-negativity on an interval equivalent to having a nonnegative scalar product with non-negative polynomials
Here is a counter-example for $d=1$. In this simple case $S$ is just the set of linear combinations of $x$ and $1-x$ with nonnegative coefficients.


$$p(x)=3x-1$$


$$\int\_0^1 p(x)x\ dx=\frac12$$


$$\int\_0^1p(x)(1-x)\ dx=0$$


Then $\int\_0^1pq\ge0\ \forall q\in S$, but $p\notin S$.


