# Proving the maximum principle for harmonic real valued functions in $\mathbb{R}^n$

Assuming the principle is stated as such:

Let $U\subset\mathbb{R}^n$ be a bounded domain and $u$ harmonic in $U$ such that $\sup_{x\in U}u(x)\leq A$ for some $A\in\mathbb{R}$. Then either $\forall x\in U\ u(x)=A$ or $\forall x\in U \ u(x)<A$.

I'm trying to prove this by showing that $M:=\{x\in U : u(x)=A\}$ is both an open and a closed set in $U$, and then through the connectedness of the domain $U$ to conclude that either $M=U$ or $M=\emptyset$. Showing that it's a closed set is an easy result of $u$ being continuous. I'm having difficulties showing that it's open. I'm trying to show that around each point in $M$ there exists some ball contained in $M$ and $u\equiv A$ inside it. This seems to be a difficult task, not much easier than showing this for $U$ itself. Obviously this should result from $u$ being harmonic but I can't figure out exactly why, any tips here?

-
Use the mean value property. –  Davide Giraudo Oct 9 '11 at 20:29
I guess you meant $\sup_{x\in U}u(x)\leq A$, otherwise the assertion after the "or" is always true. –  Davide Giraudo Oct 9 '11 at 20:48
If the supremum of $u$ is $<A$, there exists no point $x$ such that $u(x)=A$ since $u(x)<A$ for every $x$. Hence the statement you try to prove holds trivially by definition of the supremum. In other words, for harmonicity to be involved, the statement must be modified. –  Did Oct 9 '11 at 20:52
thanks, I've edited the question to make it none-trivial –  Donjim Oct 9 '11 at 22:13