If $u\in W^{1,p}(\mathbb{R}^n) \cap C^1{(\mathbb{R}^n)}$ and $\omega_n$ is the volume of a ball, may I always suppose that $$|u(x)|=\frac{1}{\omega_n} \int_{B_{1}(x)}|u(x)|dy?$$
How to prove it? I thought this equality was only possible if $u$ was a harmonic function. But now, how can I be sure of this equality? or am I making a confusion about the mean value property? Because there is a result that a function satisfies the mean value property iff is harmonic.
My attempt:
We know that the volume of $B_1(x)\subset \mathbb{R}^n$ is ${\omega_n}=\int_{B_{1}(x)}dy$, so if I replace in the equality above may I take $|u(x)|$ out of the integral, even if the center of the ball is $x$? I mean, can I do this:
\begin{align*} \frac{1}{\omega_n} \int_{B_{1}(x)}|u(x)|dy&= \frac{1}{\int_{B_{1}(x)}dy} \int_{B_{1}(x)}|u(x)|dy\\ & =\frac{\int_{B_1(x)} dy}{\int_{B_1(x)}dy} |u(x)|\\ &=|u(x)| \end{align*}
?????????