Let $I=[0,1]$. For $p\in[1,\infty]$ define $C_p$ as the best constant such that for all $f\in L^p(I)$ $$ \left\|f-\int_If\,\right\|_{L^p(I)}\leq C_p\inf_{c\in\mathbb{R}}\left\|f-c\,\right\|_{L^p(I)}. $$ The following properties are fairly elementary:
- $1\leq C_p\leq 2$. The first inequality is trivial, the second follows by convexity: for any $c$ $$ \left\|f-\int_If\,\right\|_{L^p(I)}\leq \left\|f-c\,\right\|_{L^p(I)}+\left\|c-\int_If\,\right\|_{L^p(I)}\leq 2\left\|f-c\,\right\|_{L^p(I)}. $$
- $C_2=1$. This is a standard argument: to minimize $\left\|f-c\,\right\|_{L^2(I)}^2$ we differentiate with respect to $c$: $$ \frac{\partial}{\partial c}\left\|f-c\,\right\|_{L^2(I)}^2=2c-2\int_I f, $$ so the average is the minimizer.
- $C_\infty=2$. No better constant exists for the sequence $f_n=n\mathbf{1}_{[0,1/n]}$. Indeed, $\|f_n-1\|_{L^\infty(I)}=n-1$ and the optimal choice is $\|f_n-n/2\|_{L^\infty(I)}=n/2$.
- $C_1=2$. For the same sequence $f_n=n\mathbf{1}_{[0,1/n]}$, one has $\|f_n-1\|_{L^1(I)}=2(n-1)/n$ and the optimal choice is $\|f_n-0\|_{L^1(I)}=1$.
What can be said about $p\neq 1,2,\infty$? The topic of best constant (or more generally, polynomial) approximation is very classical but I could not find results on this particular question.
Based on the above, I computed numerically the suggested constant by taking $f_{100}$, which gives the corresponding approximate lower bounds
- $C_3\geq 1.0553$
- $C_4\geq 1.1465$
- $C_5\geq 1.2340$
- $C_6\geq 1.3096$
- $C_{10}\geq 1.5114$
- $C_{15}\geq 1.6425$
- $C_{25}\geq 1.7645$