A property for generic pairs of functions and metrics Let $M$ be a compact smooth manifold with a smooth boundary. Given a smooth Riemannian metric $g$ on $M$, we denote by $\{\phi_k\}_{k=1}^{\infty}$ an $L^2(M)$--orthonormal basis consisting of Dirichlet eigenfunctions of $-\Delta_g$ on $M$.
Now let us denote by $X$ the collection of all pairs $(f,g)$ with $f$ a smooth function on $M$ and $g$ a smooth Riemannian metric on $M$. Is it true that for a generic element in $X$ the following properties are simultaneously satisfies:

*

*The spectrum of $(M,g)$ is simple.

*Given any $k\in \mathbb N$, there holds: $\int_M f(x) \phi_k(x)\,dV_g \neq 0$.

 A: I believe that a combination of the following two facts essentially confirms the desired result. I phrased the second point in $C^2(M)$—working directly in $C^\infty(M)$ is a bit awkward because it is not a Banach space—but I think it should hold more widely.

*

*The generic simplicity of the Laplacian eigenvalues is a result of Uhlenbeck [Theorem 8, 1].

*For the second condition, we fix the metric $g$ andg make the following observation. For all $k \in \mathbf{N}$, the set $U_k = \{ u \in C^{2}(M) \mid \langle u , \phi_k \rangle \neq 0 \}$ is open and dense. After all, on the one hand if $\langle u , \phi_k \rangle \neq 0$ then one can choose $v \in C^2(M)$ so small that $\lvert v \rvert_{L^2} < \lvert \langle u , \phi_k \rangle \rvert$. This ensures $\langle u - v, \phi_k \rangle \neq 0$, confirming that $U_k$ is open. On the other hand, if instead $\langle u , \phi_k \rangle = 0$ then obviously $\langle u + t \phi_k,\phi_k \rangle \neq 0$ for all $t \neq 0$, no matter how small. This confirms that $U_k$ is dense. Therefore the countable intersection $\cap_k U_k \subset C^2(M)$ is a generic set.

[1] Karen Uhlenbeck. Generic Properties of Eigenfunctions. American Journal of Mathematics, 1976, Vol. 98, No. 4, pp. 1059-1078.
