[proofplan]
Define the maximum set $\Sigma := \{ x \in U : u(x) = M \}$, where $M := \max_{\bar{U}} u \ge 0$. By hypothesis $\Sigma$ is non-empty. We show that $\Sigma$ is simultaneously closed and open relative to $U$. Since $U$ is connected, the only non-empty subset of $U$ that is both open and closed in $U$ is $U$ itself, so $\Sigma = U$ and $u \equiv M$.
The closedness of $\Sigma$ follows from the continuity of $u$. The openness requires the Hopf Lemma (Theorem 101): at any boundary point of $\Sigma$ that lies in $U$, the Hopf Lemma forces a strict outward normal derivative, which contradicts the fact that this point is an interior maximum of $u$.
[/proofplan]
[step:Setup and the maximum set]
Set $M := \max_{\bar{U}} u$. By hypothesis, $M \ge 0$ and there exists $x_0 \in U$ with $u(x_0) = M$. Define
\begin{align*}
\Sigma := \{ x \in U : u(x) = M \}.
\end{align*}
Then $\Sigma \neq \varnothing$ since $x_0 \in \Sigma$. We will show $\Sigma = U$ by proving that $\Sigma$ is both closed and open in the relative topology of $U$, then invoking the connectedness of $U$.
[/step]
[step:Closedness of the maximum set]
The function $u : U \to \mathbb{R}$ is continuous (since $u \in C^2(U)$), and $\Sigma = u^{-1}(\{M\})$ is the preimage of the closed set $\{M\} \subset \mathbb{R}$. Therefore $\Sigma$ is closed relative to $U$.
[/step]
[step:Openness of the maximum set via Hopf's Lemma]
Suppose for contradiction that $\Sigma$ is not open in $U$. Then there exists a point $z \in \Sigma$ and a sequence $(y_k)_{k \ge 1} \subset U \setminus \Sigma$ with $y_k \to z$. In particular, $u(z) = M$ and $u(y_k) < M$ for every $k$.
Since $U$ is open, there exists $R > 0$ with $\overline{B}(z, R) \subset U$. Because $u(y_k) < M$ for points $y_k$ arbitrarily close to $z$, the open set $V := \{ x \in B(z, R) : u(x) < M \}$ is non-empty. Choose a point $y \in V$ (for example, $y = y_k$ for $k$ large enough that $y_k \in B(z, R)$).
Now construct a ball centered at $y$ that is tangent to $\Sigma$ from outside. Define
\begin{align*}
r_0 := \inf\{ |y - p| : p \in \Sigma \cap \overline{B}(z, R) \}.
\end{align*}
Since $y \notin \Sigma$ and $z \in \Sigma \cap \overline{B}(z, R)$, we have $0 < r_0 \le |y - z| < R$. Because $\Sigma \cap \overline{B}(z, R)$ is compact (it is a closed subset of the compact set $\overline{B}(z, R)$), the infimum is attained at some point $z^* \in \Sigma \cap \overline{B}(z, R)$, so $|y - z^*| = r_0$.
Consider the open ball $B(y, r_0)$. By the definition of $r_0$:
- $B(y, r_0) \cap \Sigma = \varnothing$, so $u(x) < M$ for all $x \in B(y, r_0)$.
- The point $z^* \in \partial B(y, r_0) \cap \Sigma$, so $u(z^*) = M$.
We now verify containment. By choosing $k$ large enough that $|y_k - z| < R/2$, we may assume $|y - z| < R/2$. Since $r_0 \le |y - z| < R/2$, the triangle inequality gives, for every $x \in B(y, r_0)$,
\begin{align*}
|x - z| \le |x - y| + |y - z| < r_0 + \frac{R}{2} \le \frac{R}{2} + \frac{R}{2} = R.
\end{align*}
Therefore $B(y, r_0) \subset B(z, R) \subset U$, and likewise $z^* \in \overline{B}(y, r_0) \subset \overline{B}(z, R) \subset U$.
We now apply the Hopf Lemma ([Hopf's Lemma](/theorems/101), Theorem 101) to the ball $B(y, r_0)$. The function $u$ satisfies $Lu \le 0$ in $B(y, r_0)$, with $u(x) < M = u(z^*)$ for all $x \in B(y, r_0)$ and $z^* \in \partial B(y, r_0)$. The Hopf Lemma asserts that the outward normal derivative of $u$ at $z^*$ is strictly positive:
\begin{align*}
\frac{\partial u}{\partial \nu}(z^*) > 0,
\end{align*}
where $\nu = (z^* - y)/|z^* - y|$ is the outward unit normal to $\partial B(y, r_0)$ at $z^*$.
However, $z^* \in \Sigma \subset U$ is an interior maximum of $u$ in $U$, so $\nabla u(z^*) = 0$ (since $u \in C^2(U)$ and $z^*$ is a local — in fact global — maximum point in the open set $U$). This gives
\begin{align*}
\frac{\partial u}{\partial \nu}(z^*) = \nabla u(z^*) \cdot \nu = 0,
\end{align*}
contradicting the strict positivity from the Hopf Lemma.
Therefore, $\Sigma$ is open in $U$.
[/step]
[step:Conclusion by connectedness]
The set $\Sigma$ is non-empty, closed in $U$, and open in $U$. Since $U$ is connected, the only subset of $U$ with all three properties is $U$ itself. Therefore $\Sigma = U$, which means $u(x) = M$ for every $x \in U$. That is, $u$ is constant throughout $U$.
[/step]