Both basis functions can be expressed in a binomial expansion the the powers of y can be integrated term by term. Elements of the hamiltonian matrix are computed from . This time, the second derivative of basis functions has to be computed and again integrals performed. For our example, the derivatives are polynomials in y so that the matrix element evaluation is straightforward. Numerical values of S and H are shown in the complete solution file .
Higher roots are bounds for excited states.
Note that the vector a i is labelled for its eigenvalue and its elements also carry a label for the basis function. The collection of a i,j comprise a square matrix the columns of which are the the eigenvectors belonging to W i . For the example, see the calculated S and H matrices in the solution file . Error analysis Errors in the variational approximation can be assessed in several ways. When the exact solution is known, a direct comparison of energy eigenvalues is possible.