TITLE: Best constant approximation in $L^p(\Omega)$
QUESTION [8 upvotes]: For $\Omega$ a bounded open set of $\mathbf{R}^d$ and $f\in L^p(\Omega)$ the  infimum
\begin{align*}
\inf_{C\in\mathbf{R}} \|f-C\|_p
\end{align*}
is reached (by compactness). For $1<p<\infty$ the strict convexity of the norm ensures uniqueness of this constant that we can denote $C_p(f)$. Of course $C_2(f)$ is nothing but the average of $f$ over $\Omega$. For $p=\infty$ (in the considered case of constants), we also have uniqueness : $C_\infty(f)$ is the (arithmetic) mean of the (essential) maximum and minimum of $f$.
For $1<p<\infty$ the following characterization holds : $C_p(f)$ is the only real number ensuring
\begin{align*}
\int_{f>C_p(f)} |f-C_p(f)|^{p-1} = \int_{f<C_p(f)} |f-C_p(f)|^{p-1}.
\end{align*}
I wonder if there exists an explicit formula for the non hilbertian cases. My intuition is that somehow $C_p(f)$ should be the average of $f$ with respect to a probability measure $\mu_{p,f}$ on $\Omega$. I expect the dependence with respect to $p$ to be continuous and that for $p<\infty$, $\mu_{p,f}$ is absolutely continuous with respect to the Lebesgue measure.

REPLY [3 votes]: The constant $C$ that you've constructed is called the barycenter in the metric geometry literature.  Specifically, you're asking about the $p$-barycenter of the measure $f_*m$ on $\mathbb{R}$ where $m$ is Lebesgue measure on $\Omega$.  Except when $p=2$ this is a highly nonlinear construction and there basically can't be a simple formula for it (though I wouldn't know how to formalize or prove such an assertion).
Note that there is a significant difference between the cases $1<p<2$ and $2<p<\infty$, because the uniform convexity of $L^p$ looks differently in the two cases.  In $L^2$ we have the polarization identity $$\|tx+(1-t)y\|_2^2 = t\|x\|_2^2+(1-t)\|y\|_2^2-t(1-t)\|x-y\|_2^2$$.  For $2<p<\infty$ this generalizes to the existence of a constant $c(p)$ so that $$\|tx+(1-t)y\|_p^p \leq t\|x\|_p^p+(1-t)\|y\|_p^p-t(1-t)\|x-y\|_p^p$$ but for $1<p<2$ the identity reads $$\|tx+(1-t)y\|_p^p \leq t\|x\|_p^p+(1-t)\|y\|_p^p-t(1-t)\|x-y\|_p^2$$ (note the exponent $2$ at the very end).
Both inequalities are strong enough to show that the barycenter exists, but they give the theory different character.  The fact that they are inequalities is what makes averaging for $p\neq2$ very different from averaging for $p=2$.