I have a domain $D:\quad$ $-1<x<1$ and $-f(x)<y<f(x)$.\\
There is function $u(x,y)$ which is obey the equation $\Delta u(x,y)=0$,  $\forall (x,y)\in D$ with the Dirichlet boundary condition $u(x,y)=0$, $\forall(x,y)\in \partial D$ and $\int_D u^2(x,y) dx dy=1$ 
Let us define $I_G=\int_{-1}^{1} dx u(x,0) G(x)$.
The problem is as follows. How to find the function f so that integral $I_G$ is maximal?

Is it possible to solve such kind of problem?

I have an idea, which can help to solve this problem. We can go to a non-orthogonal coordinate system so that $D$ become a square. But after that the function $f(x)$ and $f'(x)$  appears in the operator (Laplacian in the new coordinate frame).