Change the 3 input parameters repeatedly to find the lowest energy of the hydrogen atom !

The expectation value for a unnormalized wave function ψ is given by E = <ψ/H/ψ>/<ψ/ψ>

In a linear ansatz with 2 basis functions: ψ = c_{1}φ_{1} + c_{2}φ_{2} we get:

E = (c_{1}^{2}<φ_{1}/H/φ_{1}> + 2c_{1}c_{2}<φ_{1}/H/φ_{2}> + c_{2}^{2}<φ_{2}/H/φ_{2}>) / (c_{1}^{2}<φ_{1}/φ_{1}> + 2c_{1}c_{2}<φ_{1}/φ_{2}> + c_{2}^{2}<φ_{2}/φ_{2}>)

Using the usual abbreviations the equation simplifies to:

E = (c_{1}^{2}H_{11} + 2c_{1}c_{2}H_{12} + c_{2}^{2}H_{22}) / (c_{1}^{2}S_{11} + 2c_{1}c_{2}S_{12} + c_{2}^{2}S_{22})

Division of the nominator and of the denominator by c_{2}^{2} and abbreviating c_{1}/c_{2} by γ, we obtain:

E = (γ^{2}H_{11} + 2γH_{12} + H_{22}) / (γ^{2}S_{11} + 2γS_{12} + S_{22})

This is the equation used in the program. The basis functions applied are unnormalized Gaussians e^{-αr2} and e^{-βr2}, respectively. The integrals are:

H_{αβ} = S_{αβ} ((3αβ)/(α + β) - 2((α + β)/π)^{1/2})

S_{αβ} =
(π/(&alpha + β))^{3/2}

Have a look to the source code of this web-page. There you find the program code in (JavaScript).

H. Huber, University of Basel, Dec. 99