Here is a table to summarize the calculated variational energy values as the basis set is expanded. Wave functon comparison. Ground state wave functions are compared in the following graphs. To the eye, there is no difference between approximate and exact solutions. The second graph shows the relative error of the trial function.
E is a constant.
Any departure from constant value reveals an error in the trial function. The solution file is available for downloading. It can easily be extended to a larger basis. There are other ways to assess the errors in a trial variational function. Since the variation principle provides an upper bound to the true energy, it is natural to seek a lower bound to bracket the exact energy.