# How does the approximate energy relate with the trial function in variational method?

While studying the variational principle in Quantum Mechanics, I came across the following problem: I want to relate the difference between the exact ground-state wave function $$\psi_0$$ and an approximation $$\phi$$ with the difference between the exact energy $$E_0$$ and the approximate energy $$E$$. For instance, if I know that $$\phi$$ and $$\psi_0$$ differ by at most, say, $$O(\epsilon)$$ over all space, can I say that $$E-E_0 \approx O(\epsilon)$$ (or $$O(\epsilon^2)$$, $$O(\epsilon^3)$$, $$\ldots$$)?

It is intuitive to think that the closer $$\phi$$ and $$\psi_0$$ are, the better the energy approximation gets, but I am not able to compare them quantitatively.

Without loss of generality, suppose that both $$\phi$$ and $$\psi_0$$ are normalized. By writing $$\phi$$ as a linear combination of $$\psi_n$$, we get $$\phi=\sum_{n=0}^{\infty} c_n\psi_n$$ such that $$\sum_{n=0}^{\infty} |c_n|^2=1$$.

Therefore $$\hat H |\phi\rangle=\sum_{n=0}^{\infty} c_n\hat H|\psi_n\rangle = \sum_{n=0}^{\infty} c_nE_n|\psi_n\rangle$$

Hence $$E= \langle{\phi|\hat H| \phi}\rangle=\sum_{n=0}^{\infty} |c_n|^2E_n$$.

From here, it is easy to prove that $$E \geq E_0$$, but how can I compare them?

I will continue with your formula for the energy of a normalized state $$|\phi\rangle$$ (i.e. $$|\phi\rangle=\sum_{n=0}^\infty c_n|\psi_n\rangle$$ with $$\sum_{n=0}^\infty |c_n|^2=1$$): \begin{align} E &= \langle\phi|\hat{H}|\phi\rangle \\ &= \sum_{n=0}^{\infty}|c_n|^2E_n \\ &= |c_0|^2E_0 + \sum_{n=1}^{\infty} |c_n|^2E_n \\ &= \left(1 - \sum_{n=1}^{\infty}|c_n|^2\right)E_0 + \sum_{n=1}^{\infty}|c_n|^2E_n \\ &= E_0 + \sum_{n=1}^{\infty}|c_n|^2 (E_n-E_0) \end{align} and hence $$E-E_0 = \sum_{n=1}^{\infty}|c_n|^2 (E_n-E_0)$$
Now the prerequisite was that $$|\phi\rangle$$ differs from $$|\psi_0\rangle$$ only by $$O(\epsilon)$$. Therefore for all $$n\ne 0$$ we have $$c_n\approx O(\epsilon)$$ and hence $$|c_n|^2\approx O(\epsilon^2)$$. So we finally have $$E-E_0\approx O(\epsilon^2)$$