Integral of Brownian motion in a 2-d box Let $A=(a,b)\times (c,d) \subset \mathbb{R}^2$ with $0 \in A$ and $(B_t)$ be standard two dimensional Brownian motion. Additionally, let $\tau_A := \inf \{t\geq 0: B_t \notin A\}$ and let $g:A \to \mathbb{R}$ be a smooth bounded function which can be written as $g(x,y)=u(x)v(y)$.
I am investigating the random variable
$$\int_0^{\tau_A} g(B_s) ds$$
in particular I am interested in the expectation
$$E[\int_0^{\tau_A} g(B_s) ds].$$
I know that there is a connection to the Dirichlet problem but I am interested in calculating or estimating (in both directions) this expression in a stochastical way. E.g., a bound, which contains the $L^1$ norm of $g$ would be very interesting.
Since the domain $A$ is an "easy" one and $B_t$ consists of two one dimensional independent Brownian motions $B_t=(B_t^1, B_t^2)$, I have tried to reduce the problem into one dimension in the following way:
\begin{align*} 
E[\int_0^{\tau_A} g(B_s) ds] &= E^1 E^2 [\int_0^{\tau_{(a,b)}^1 \wedge  \tau_{(c,d)}^2} g(B_s^1,B_s^2) ds] \\
&= \int_0^{\infty}E^1 \big[ 1_{[0, \tau^1_{(a,b)})}(s)  u(B^1_s) \big] E^2 \big[1_{[0, \tau^2_{(c,d)})}(s) v(B^2_s)\big] d s
\end{align*}
The superscripts $\{1,2\}$ refer to the distributions of the respective Brownian motion.
Now I have no further ideas on how to proceed and am not familiar with tools that could help me here.
I would appreciate any help!
 A: Even though I think that Ali had done the spadework to tackle the problem by his PDE approach, it might be worthwhile to post my own conclusion based on this. Since it was already mentioned in the above discussion that the $L^1$ norm is problematic, as it leads to divergencies (for $h\rightarrow 0$), I decided to continue using the $L^2$ norm. In this regard, if $||\cdot||$ is the $L^2$ norm, then the following sequence of steps sets a simple upper bound.
$$\mathbb{E}\left[g\right]=\int_{0}^{\infty}   \left(\int_{-\pi/2}^{\pi/2}\phi_{s}(x)u(x) \, {\rm d}x\right)   \left(\int_{-\pi/2}^{\pi/2}\psi_{s}(y)v(y) \, {\rm d}y\right) \, {\rm d}s \\
\leq ||u|| \, ||v|| \int_0^\infty ||\phi_s|| \, ||\psi_s|| \, {\rm d}s \\
= ||u|| \, ||v|| \int_0^\infty \left( \sqrt { \int_{-\pi/2}^{\pi/2} |\phi_s(x)|^2 \, {\rm d}x } \right)^2 {\rm d}s \\
= ||u|| \, ||v|| \, \frac{4}{\pi^2} \int_0^\infty {\rm d}s { \int_{-\pi/2}^{\pi/2} {\rm d} x \sum_{n,m=0}^\infty e^{ - (2n+1)^2/2 \, s - (2m+1)^2/2 \, s} \cos((2n+1)x)\cos((2m+1)x) } \\ 
= ||u|| \, ||v|| \, \frac{4}{\pi^2} \int_0^\infty {\rm d}s \sum_{n,m=0}^\infty e^{ - (2n+1)^2/2 \, s - (2m+1)^2/2 \, s} \, \frac{\pi}{2} \, \delta_{n,m}  \\ 
= ||u|| \, ||v|| \, \frac{2}{\pi} \underbrace{\sum_{n=0}^\infty \frac{1}{(2n+1)^2}}_{\pi^2/8} \\
= \frac{\pi}{4} \, ||u|| \, ||v|| \, .$$
Here, as in Alis answer
$$\phi_s(x)=\psi_s(x)=\frac{2}{\pi} \sum_{n=0}^\infty e^{-(2n+1)^2/2 \, s} \, \cos((2n+1)x) \, .$$
