The following is from Section 2.2 of Evans' PDE book: Screenshot here, transcribed below
THEOREM 4 (Strong maximum principle). Suppose $u \in C^{2}(U) \cap C(\bar{U})$ is harmonic within $U$. (i) Then $$ \max _{\bar{U}} u=\max _{\partial U} u . $$ (ii) Furthermore, if $U$ is connected and there exists a point $x_{0} \in U$ such that $$ u\left(x_{0}\right)=\max _{\bar{U}} u, $$ then $u$ is constant within $U$.
Assertion (i) is the maximum principle for Laplace's equation and (ii) is the strong maximum principle. Replacing $u$ by $-u$, we recover also similar assertions with "min" replacing "max".
Proof. Suppose there exists a point $x_{0} \in U$ with $u\left(x_{0}\right)=M:=\max _{\bar{U}} u$. Then for $0<r<\operatorname{dist}\left(x_{0}, \partial U\right)$, the mean-value property asserts $$ M=u\left(x_{0}\right)=f_{B\left(x_{0}, r\right)} u d y \leq M . $$ As equality holds only if $u \equiv M$ within $B\left(x_{0}, r\right)$, we see $u(y)=M$ for all $y \in B\left(x_{0}, r\right)$. Hence the set $\{x \in U \mid u(x)=M\}$ is both open and relatively closed in $U$ and thus equals $U$ if $U$ is connected. This proves assertion (ii), from which (i) follows.
Question 1. Why $\int_{B(x_0,r)}u\,dy\leq M$? even though we already know that $u(x_0)=M=\int_{B(x_0,r)}u\,dy$
Question 2. Why does equality imply that $u\equiv M$ within $B(x_0,r)$?
Therefore, $\int_{B(x_0,r)}u(y)dy=\int_{B(x_0,r)}u(x_0)dy$ implies $\int_{B(x_0,r)}(u(y)-u(x_0))dy=0$ then $u(y)-u(x_0)=0$ forall $y\in B(x_0,r)$?
– eraldcoil Jan 16 '22 at 19:55