Given the function $$f(A) := \sum_{n=1}^{\infty}\left( \int_A \varphi_0\varphi_n \right)^2,$$ where $A$ is any measurable subset of $\mathbb{R}$, and $\varphi_n$ is the $n$th Hermite function, I want to know for which sets $f$ attains its maximum.
I've already proven that $$f(A)\le \frac{1}{4}$$ for all $A$, and that $f(\mathbb{R}^+) = 1/4$. But it is crucial for my problem to find other sets that would also maximise $f$ or prove that none exists, and for doing that I am at a loss. Even finding local maxima would be interesting to me.
The proof I already obtained is somewhat long and very indirect, so I won't include it here; also, I'm very interested to see how a mathematician would approach this problem.