
I know how to prove it using strong maximum principle, but I need to show it using conditions for a relative maximum.
Does this mean using second derivative test?
I think if $p\in \Omega$ and $u(p)$ is strictly larger than the maximum of $u$ on $\partial\Omega$, for $\epsilon>0$ small enough, consider the function $u(x)+\epsilon|x-p|^2$. Then the function $u(x)+\epsilon|x-p|^2$ is still sub harmonic. But by the second derivative test, $\Delta u<0$ in order to attain a local maximum. so $u(p)$ cannot be a local maximum for the function $u(x)+\epsilon|x-p|^2$. So it cannot be a local maximum for $u(x)$.
Does this seem correct? I feel somewhere is wrong. Thanks so much!
Thanks very much!
You're right to feel something is wrong: Try giving a detailed argument why $p$ not being a local maximum for $u(x)+\varepsilon|x-p|^2$ implies $p$ not a local maximum for $u$.
You're on the right track though. Consider $v_\varepsilon(x)=u(x)+\varepsilon|x|^2$ (without loss of generality we assume that $0\notin \Omega$). The arguments you use give that $v_\varepsilon$ can't have a local maximum inside $\Omega$ so that there is $x_\varepsilon\in \partial \Omega$ such that $v_\varepsilon(x_\varepsilon)$ is the maximum of $v_\varepsilon$ in $\bar{\Omega}$. Clearly $v_\varepsilon\to u$ uniformly in $\bar{\Omega}$ and $u\leq v_\varepsilon \leq v_{\varepsilon'}$ whenever $\varepsilon\leq \varepsilon'$. This implies that along some subsequence $x_\varepsilon\to x\in \partial \Omega$ and $u(x)$ is a maximum for $u$.