Let $f \in L^1[0,1]$, can we approximate $f$ by a polynomial, in sup norm ?
I know that the algebra of polynomials is dense in algebra of continuous functions, wrt to sup norm, And I know that if $f \in L^1[0,1]$, for any $\epsilon > 0$, we can find a continuous function $g \in C[0,1]$, such that $||f-g||_1=\int^1_0 |f-g| < \epsilon$. these being said, Is the following possible ?
if $f \in L^1[0,1]$, for any $\epsilon > 0$, we can find a polynomial $P$, such that $$\sup_{x\in [0,1]}|f-P| < \epsilon$$ I already appreciate your help.
The function $$ f(x) = \begin{cases} 1, &\text{if $x$ is rational}, \\ 0, &\text{if $x$ is irrational} \end{cases} $$ is measurable and bounded, hence integrable on any bounded interval. But $\sup_{x\in[0,1]} |f(x)-P(x)| \ge \frac12$ for any polynomial $P$ (indeed, any continuous function $P$).