TITLE: Does every positive continuous function have a non-negative interpolating polynomial of every degree?
QUESTION [22 upvotes]: Let $f:[a,b] \to (0,\infty)$ be a continuous function. Then is it necessarily true that for every $n\ge 1$, we can find $n+1$ distinct points $\{x_0,x_1,...,x_n\}$ in $[a,b]$ such that the interpolating polynomial $p_n(x)$ of $f$ at those points is non-negative on $[a,b]$ i.e. $p_n(x) \ge 0,\forall x \in [a,b]$ ? 
NOTE: $p_n(x)$ is the unique, degree at most $n$,  polynomial such that $f(x_i)=p_n(x_i),\forall i=0,1,...,n$.

REPLY [3 votes]: This question was recently studied in that paper:
F. Charles, M. Campos-Pinto, B. Després, Algorithms for positive polynomial approximation, hal-01527763,
assuming that the function $f$ is Lipschitz on the interval. Let $[a,b]=[0,1]$. The interpolating polynomials $p_{n}$ are seeked in the form
\begin{align*}
p_{n}(x) & =a_{p}^{2}(x)+x(1-x)b_{p-1}^{2}(x),\quad n=2p+1,\\
p_{n}(x) & =xa_{p}^{2}(x)+(1-x)b_{p}^{2}(x),\quad n=2p,
\end{align*}
with $a_{p}$ and $b_{p}$ polynomials of degree $p$, and $b_{p-1}$ a polynomial of degree $p-1$, which are classical representations for non-negative polynomials in $[0,1]$.
The interpolation points are chosen to be $0$, $1$, and $n-1$ points in $(0,1)$ which are obtained through a converging fixed point algorithm for a map defined on $(0,1)^{n-1}$.
Some details when $n=2$ or $n=3$ : first, let $f(y)=g^{2}(y)$ with $g(y)>0$.

when $n=2$,  $p_{2}(x)$ is seeked in the form $a_{1}^{2}(x)+x(1-x)b_{0}^{2}$. One sets
$a_{1}(0)=g(0)>0$ and $a_{1}(1)=-g(1)<0$ so that there exists $\alpha\in(0,1)$ with $a_{1}(\alpha)=0$. It then suffices to choose $b_{0}$ such that $f(\alpha)=\alpha(1-\alpha)b_{0}^{2}$.
when $n=3$, $p_{3}(x)$ is seeked in the form $xa_{1}^{2}(x)+(1-x)b_{1}^{2}(x)$. One shows that there exists $0<\alpha<\beta<1$ such that
\begin{align}
a_{1}(1) & =g(1), \quad a_{1}(\alpha)  =-g(\alpha)/\sqrt{\alpha},  \quad a_{1}(\beta)  =0,\\
b_{1}(0) & =-g(0),  \quad b_{1}(\alpha)  =0,  \quad b_{1}(\beta)  =g(\beta)/\sqrt{1-\beta},
\end{align}
which is checked through direct calculations.

The general case $n\geq4$ consists in generalizing the above conditions and showing that there exists $n-1$ interpolation points in $(0,1)$ that satisfy these conditions.