TITLE: Stone-Weierstrass for monotone functions
QUESTION [5 upvotes]: Let $\; f : [0,1] \to \mathbb{R} \;$ be continuous and non-decreasing. $\;\;$ Let $\epsilon$ be a real number such that $\; 0 < \epsilon \;$.

Does it follow that that there exists a real polynomial $p$ such that $p$ is non-decreasing on

$\;$ $[0,1]$

$\;$ all of $\mathbb{R}$

and for all members $x$ of $[0,1]$, $\; |f(x)+(-(p(x)))| < \epsilon \;\;$?

REPLY [5 votes]: In fact, the Bernstein polynomials approximating $f$ are non-decreasing on $[0,1]$.  A cute way to see this is via coupling (I learned this from Lindvall's book Lectures on the Coupling Method):
The $n$th Bernstein polynomial $p_n(x)$ can be written as $\mathbf{E}\Big[f\big(\frac{\sum_{i=1}^n Z^x_i}{n}\big)\Big]$, where $Z^x_i$ are Bernoulli random variables with parameter $x$.  If $0\leq x\leq y\leq 1$, then we can define the variables $Z^x_i$ and $Z^y_i$ on the same probability space, such that $Z^x_i\leq Z^y_i$, which immediately gives $p_n(x)\leq p_n(y)$.