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.



Best constant approximation in $L^p(\Omega)$
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.


