Solution (source code)

= Solution

A standard form of the <Kakutani solution of the Dirichlet problem> uses a bounded <domain> $D\subset\mathbb R^d$, continuous <Dirichlet boundary data> $f\in C(\partial D)$, and regularity of every boundary point for the <Dirichlet problem>. The boundedness of $D$ makes $\partial D$ a <compact set>, so $f$ is a <bounded function> and a <uniformly continuous function>. A bounded domain with $C^2$ boundary is a sufficient geometric case; one must not omit boundary regularity for an arbitrary bounded domain.

One standard analytic characterization of a <regular boundary point> on a bounded domain is the existence of a positive harmonic barrier: for each $\xi\in\partial D$ there is a <harmonic function> $h_\xi\in C(\overline D)$ with $h_\xi(\xi)=0$ and $h_\xi(x)>0$ for $x\in\overline D\setminus\{\xi\}$. This is the harmonic form of a <barrier for the Dirichlet problem>; the barrier characterization of regularity is a standard fact of <potential theory>.

Let $B$ be $d$-dimensional <Brownian motion> started at $x\in D$ and let $\tau_D=\inf\{t\geq0:B_t\notin D\}$ be its <Brownian exit time>. Then the unique solution in $C(\overline D)\cap C^2(D)$ is
$$
\boxed{u(x)=\mathbb E_x[f(B_{\tau_D})]\quad(x\in D),\qquad u(\xi)=f(\xi)\quad(\xi\in\partial D).}
$$
Equivalently, $u(x)=\int_{\partial D}f(\xi)\,\omega_D(x,d\xi)$, where $\omega_D$ is <harmonic measure>, the exit <probability distribution> of <Brownian motion>. The <harmonic function> equation is $\Delta u=0$, with the <Laplace operator> convention $\Delta=\sum_j\partial_j^2$.