Solution (source code)

= Solution

The difference $u_1-u_2$ is subharmonic. If $M=\max_{\overline\Omega}(u_1-u_2)>0$, its maximum set lies in $\Omega$. At any point of this set, comparison with the harmonic replacement on a small ball and the <Strong maximum principle for harmonic functions> show that the whole ball belongs to the maximum set. The set is therefore both open and closed in the connected domain $\Omega$, so it is all of $\Omega$, contradicting the boundary inequality. Thus $u_1\leq u_2$ throughout $\Omega$. This is the comparison principle for subharmonic and superharmonic functions.