Solution (source code)

= Solution

For $n\geq3$, the radial function
$$
u(x)=1-|x|^{2-n}
$$
is harmonic on $\mathbb R^n\setminus\overline{B_1(0)}$, vanishes on the unit sphere, and is positive in the domain. It therefore violates the <weak maximum principle for elliptic operators>. In two dimensions the corresponding counterexample is $u(x)=\log|x|$, since the <fundamental solution of the Laplace equation> changes from a power to a logarithm.