Could a trial wavefunction providing exact eigenenergy differ from the exact eigenfunction by a zero measure function? Given the eigenequation of a Hamiltonian
 $$ H |n \rangle = E_n |n \rangle \tag{1} $$
We write it in the position representation
  $$ \langle x | H | n \rangle = E_n \langle x | n \rangle \tag{2} $$
Eq. (2) implies the eigenequation is valid at every given point.
On the other hand, we may use variational procedure for a trival wavefunction $\tilde{n}(x)$
$$ \frac{ \langle \tilde{n} | H |\tilde{n} \rangle }{ \langle \tilde{n}| \tilde{n} \rangle}  = \frac{ \int \tilde{n}(x)^*  H \tilde{n}(x) dx }{ \int \tilde{n}(x)^* \tilde{n}(x) dx}= \tilde{E}_n  \tag{3}$$
It seems to me that if $\tilde{n}(x)$ differs $n(x)$ by zero measure function, i.e. $\left||\tilde{n}(x) - n(x) \right|| =0 $(maybe in terms of the Sobolev norm for the measure), still we have $\tilde{E}_{n} = E_n$.
My questions are: is that (trial wavefunction differs zero measure with exact wavefunction, still gives exact eigenenergy) possible? If yes, is there any concrete example for this phenomenon?
 A: Typically, the Hilbert spaces one considers in quantum mechanics are $L^2$ spaces. The elements of these spaces are equivalence classes of functions which differ only on a null set of points, i.e. whose distance in terms of the $L^2$ norm is zero, $\|n-\tilde n\|_{L^2}=0$. That is, you are right, but it's the $L^2$ norm that matters, not the Sobolev norm.
However, since both $n$ & $\tilde n$ belong to the same equivalence class, they are not considered different states and this would not count as a second state with the same energy in terms of degeneracy.
A: Both $L^p$-spaces and Sobolev spaces are actually defined via equivalence classes (this is at least one of many equivalent ways). By definition, two functions that do not differ in norm are representants of the same function as already explained.
Now, note that the Sobolev norm is just the sum of the $L^p$ norms for weak derivatives (to whichever order you want to consider them). Since the $L^p$ norms don't change if you add a measure zero function, this cannot have any influence on the Sobolev norm either. Hence, even if you want to consider the Sobolev norm, adding a measure zero function just doesn't change anything - it just changes the representative.
