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.



Maximum of a series of integrals of Hermite functions
Write your quantity as:
$$f(A)=\hbox{Tr}\left[ P\_A|0\rangle\langle0|P\_A(\mathbb{1}-|0\rangle\langle0|) \right],$$
where $P\_A$ is the projection on A, and $|0\rangle\langle0|$ is the projection on $\varphi\_0$.
Note that then you need only to investigate properties of the $\varphi\_0$, not every Hermite function (as they form an orthonormal basis).


With the properties of Tr and projection operators you get
$$f(A)= \hbox{Tr}[|0\rangle\langle0|P\_A|0\rangle\langle0|]-\hbox{Tr}[(|0\rangle\langle0|P\_A|0\rangle\langle0|)^2]$$
$$=\lambda-\lambda^2.$$


So:


* indeed, $\max f(A) = \frac{1}{4}$,
* $f(A)=\frac{1}{4}$ iff $\int\_{A} \varphi\_0^2(x)dx=\frac{1}{2}$.


Depending what you need the formula for, but if it is about the filtering of the higher-order modes, [here (sec. 6.)](http://www.springerlink.com/content/n57345p035262823/) is a numerical remark. 


