[proofplan]
We reduce to the maximum principle for harmonic [functions](/page/Function). The difference $w = u - v$ is continuous on $\overline{D}$, harmonic on $D$, and vanishes on $\partial D$. The maximum principle forces $w \leq 0$; applying it to $-w$ forces $w \geq 0$.
[/proofplan]
[step:Form the difference $w = u - v$ and apply the maximum principle]
Define $w = u - v$. Since $u$ and $v$ are continuous on $\overline{D}$ and harmonic on $D$, $w$ is continuous on $\overline{D}$ and harmonic on $D$ (the Laplacian is linear: $\Delta w = \Delta u - \Delta v = 0$ on $D$). The [boundary](/page/Boundary) condition $u = v$ on $\partial D$ gives $w = 0$ on $\partial D$.
By the [Strong Maximum Principle](/theorems/32) for harmonic functions, a harmonic function on a bounded connected domain attains its maximum on the boundary. Since $D$ is bounded, $w$ attains its maximum on $\overline{D}$ at some point $z \in \overline{D}$. If $z \in D$, the strong maximum principle implies $w$ is constant on $D$, hence on $\overline{D}$ by [continuity](/page/Continuity), so $w \equiv 0$. If $z \in \partial D$, then $\max_{\overline{D}} w = w(z) = 0$, so $w \leq 0$ on $\overline{D}$.
Applying the same argument to $-w$ (which is also continuous on $\overline{D}$, harmonic on $D$, and vanishes on $\partial D$): $-w \leq 0$ on $\overline{D}$, i.e., $w \geq 0$ on $\overline{D}$.
Combining: $w = 0$ on $\overline{D}$, i.e., $u = v$ on $\overline{D}$.
[/step]