Best constant approximation in $L^p(\Omega)$ 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.
 A: Consider the case $p=6$ where $\Omega$ consists of three sets of equal measure on which $f$ takes values $0, 1, 3$ respectively.  Then $C_6(f)$ is a root of the quintic polynomial
$x^5 + (x - 1)^5 + (x - 3)^5$, which has Galois group $S_5$ and in particular is not solvable by radicals.  Any "explicit" construction
of $\mu_{p,f}$ would have to somehow involve construction of that root.  In particular
it's not going to have a density that can be written in terms of rational functions
with rational coefficients.
EDIT: On second thought, this may not be as obvious as I thought it was.  For example, a root of an analytic function $p(z)$ can be obtained as
$$\frac{i}{2\pi} \oint_\Gamma \dfrac{z p'(z)\; dz}{p(z)}$$ where $\Gamma$ is a closed positively-oriented contour with that root (and no others) inside it.
A: 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$.
