A Question about the strong maximum principle in Evans Partial differential equation Evans stated the strong maximum principle as follows: $U\subset\mathbb{R}^n$ a bounded and open set. If $u\in C^2(U)\cap C(\overline{U})$ is harmonic within $U$.
Then,


*

*$\max_{\overline{U}}u=\max_{\partial U}u$

*if $U$ is in addition connected and there exists a point $x_0\in U$ such that $u(x_0)=\max_{\overline{U}}u$ then $u$ is constant within $U$.


I understand the proof of $2$. But why does this already imply 1?
 A: The maximum is attained, because $\overline U$ is compact. And there are only two possibiliies: Either the maximum is attained at some interior point or it is not attained for any interior point (in which case it has to be on the boundary). 
Now 2. says that $u = \mathrm{const}$ in the first case. So in particular, we must have $\max_{\overline U} u = \max_{\partial U} u$.
In the second case this equality is also true, trivially.
A: I tried to prove the Part 1 as follows. Please check if it is valid.
We prove Part 1 by contradiction.  Suppose the conclusion is not true, then $\max_{\overline{U}} u\neq \max_{\partial U} u.$ But since $\partial U\subset \overline{U},$ we have $\max_{\overline{U}} u>\max_{\partial U} u.$  Because $u\in C(\overline{U}),$ with $U$ bounded, it follows that $\overline{U}$ is compact in $\mathbb{R}^n,$ and so there exists $x_0\in \overline{U}$ such that $u(x_0)=\max_{\overline{U}}u.$ Since $\max_{\overline{U}} u>\max_{\partial U} u,$  we infer that $x_0\in U.$   In the case that $U$ is connected, by Part 2, we have $u\Big|_{\overline{U}}=u(x_0),$ which implies that $u\big|_{\partial{U}} =u(x_0),$ and so $\max_{\overline{U}} u=u(x_0)>\max_{\partial U} u=u(x_0),$ which is absurd.  In the case that $U$ is disconnected, by the openness of $U,$ there is a non-empty connected component $W,$ such that $x_0$ is  in the interior  $\text{int }(W)$ of $W.$  Application of Part 2 to $u$ on $W,$ we get $u\Big|_{\overline{W}}=u(x_0),$ which leads to $u\Big|_{\partial W}=u(x_0),$ and so $\max_{\partial W} u=u(x_0).$  Since $\mathbb{R}^n$ is locally connected, we get that $\partial W\subset\partial U,$ and hence $\max_{\partial W}\leq \max_{\partial U}u,$ which implies that 
$u(x_0)=\max_{\overline{U}} u>\max_{\partial U}u\geq \max_{\partial W}u=u(x_0),$ also a contradiction.  Therefore, we have proved that $\max_{\overline{U}} u=\max_{\partial U} u.$  
