Let $\Omega$ a bounded space. Using the maximum principle I have to show that the following problem has an unique solution.
$$-\Delta u(x)=f(x), x \in \Omega \\ u(x)=g(x), x \in \partial{\Omega}$$
I have done the following:
Let $u_1$, $u_2$ be two different solutions. Then $w=u_1-u_2$ solves the problem $$\left\{\begin{matrix} -\Delta w(x)=0, x \in \Omega \\ w(x)=0, x \in \partial{\Omega} \end{matrix}\right. \Rightarrow \left\{\begin{matrix} \Delta w(x)=0, x \in \Omega \\ w(x)=0, x \in \partial{\Omega} \end{matrix}\right.$$
Can we apply the maximum principle because we have that $\Delta w=0 \geq 0$ ??
From the maximum principle we have that $\max_{\Omega} w=\max_{\partial{\Omega}}w$.
So, we have that $w(x) \leq \max_{\partial{\Omega}}w$.
We will show that $\max_{\partial{\Omega}}w\leq 0$.
We suppose that this is not true, this means that $\exists x_0 \in \partial{\Omega}$: $\max_{\partial{\Omega}}w=w(x_0)>0$.
Is this correct so far??
How could we continue to get a contradiction??
As you pointed out we have \begin{align*} -\Delta w & = 0 \text{ in }\Omega \\ w & = 0 \text{ on }\partial\Omega \end{align*} and \begin{align*} -\Delta (-w) & = 0\text{ in }\Omega \\ -w & = 0\text{ on }\partial\Omega \end{align*} Thus we can use the maximum principle for $w$ and $-w$, yielding $\max_\Omega w = \max_{\partial\Omega} w =0$ and $\max_{\Omega} (-w) = \max_{\partial\Omega} (-w) = 0$. But since $\max (-w) = \min w$ we have $w\equiv 0$.