Let's assume we have a continuous and finite scalar function $f(x,y)$ over the $xy$ plane ($\mathbb{R}^{2}$) and this function is to be integrated over a bounded area (surface) $A\subset\mathbb{R}^{2}$, which represents a subdomain on the same $xy$ plane, as $\int_{A} f(x,y) dA$. And let the area be nonzero, or perhaps even a constant area $A=A_{0}$. Then, it is clear that the shape of this area, as defined by the contour enclosing it (call it $g(x,y)=0)$, will influence the result of the integral.
The question now is what is the contour shape for this area that would extremize this integral? How to express the variational problem correctly (well posed) to be in terms of the contour shape?
This question is the core behind a variation problem I am trying to formulate. My attempted formulation (reported here: Formulation of contour variational problem) is having difficulty producing a reasonable answer in the form of independent Euler-Lagrange equations. Probably it is ill posed somewhere, but I cannot find why/how. Any insight or advice on how to formulate it would be helpful.
(Note, this bears some similarity to Queen Dido's classical variational problem, but here we are are not restricting the contour perimeter -- rather we require nonzero (or fixed) area, and we have a function $f$ as the integrand in the area integral).