In this paper, we point out the importance of boundary conditions in the evaluation of expectation values of quantum mechanical operators involved in upper bound (i.e., variational principle) or lower bound (e.g., methods using 〈〉trueH^bold2) calculations. The existence of singular points (or discontinuities) either in the trial function or in the operator itself needs to be carefully handled when calculating integrals, otherwise leads to non‐physical (e.g., imaginary) expectation values or to false values. In this case, the use of generalized functions (e.g., Heaviside or Dirac functions) is necessary to cure the singularity problems. As examples to put a stress on this mathematical subtleties, we discuss the wrong and true solutions obtained for the calculation of the mean values of the trueH^ and trueT^trueV^ (and trueV^trueT^) operators using two standard simple models: the one‐dimensional harmonic oscillator and the three‐dimensional hydrogen atom, along with Slater‐type and Gaussian trial functions.