Solution

ID: past-exam-of-the-mathematics-course-of-the-year-2-of-the-natural-sciences-course-of-the-university-of-cambridge/2017/paper-2/3/b/solution

This is the Dirichlet principle. Put , so vanishes on the boundary. For real, sufficiently regular functions of finite Dirichlet energy, Green's first identity gives
The surface term is zero because , and the volume term is zero because is a harmonic function. Expanding the square of now gives the stronger identity
Thus the harmonic function minimizes Dirichlet energy among functions with the same boundary values. Equality requires , hence is constant on each connected component; the zero boundary value makes that constant zero on every component having boundary. For an unbounded domain one additionally needs the boundary term at infinity to vanish; the usual bounded regular-domain setting needs no such extra condition.

New to topics? Read the docs here!