Solution (source code)

= Solution

The domain is the union of the horizontal and vertical strips. The four connected components of its boundary carry the constants $a,b,c,d$ in the northeast, northwest, southwest and southeast, respectively.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2016/iii/paper-201-cross-domain.png]
{title=The cross-shaped domain, its four boundary values, and the auxiliary upper strip used for the limit at infinity}

First justify finiteness of $T$. A small open ball around $(2,2)$ lies outside the domain. By part (b), <planar Brownian motion> visits that ball almost surely in finite time. A continuous path from $z\in D$ to that ball must meet $\partial D$ first. Hence $T<\infty$ almost surely, and $B_T\in\partial D$ by continuity.

The <harmonic function> $u$ is smooth inside $D$. The <Itô formula>, localized on relatively compact subdomains, makes $u(B_{t\wedge T})$ a local <martingale>. Its boundary definition uses the continuous extension of $u$. Since $u$ is bounded, this stopped process is a true <martingale> with <uniform integrability>: pass through the compact exhaustion using <bounded convergence theorem>. In particular $\mathbb E_z u(B_{t\wedge T})=u(z)$.

Now $B_{t\wedge T}\to B_T$ almost surely as $t\to\infty$. The <dominated convergence theorem>, boundedness of $u$, and its continuous boundary values give the <bounded harmonic representation with almost sure Brownian exit>:
$$
\boxed{u(z)=\mathbb E_z u(B_T)=\mathbb E_z f(B_T).}
$$
\b[Almost sure exit and boundedness of the harmonic function are both used.] The domain's unboundedness causes no loss of <expectation> here because the stopped function values are uniformly bounded.