The first attempt at solving the Helium atom

We can test this by computing the local energy for our helium wave function $$ \psi_{T}(\boldsymbol{r}_1,\boldsymbol{r}_2) = \exp{\left(-\alpha(r_1+r_2)\right)} \exp{\left(\frac{r_{12}}{2(1+\beta r_{12})}\right)}, $$ with \( \alpha \) and \( \beta \) as variational parameters.

The local energy is for this case $$ E_{L2} = E_{L1}+\frac{1}{2(1+\beta r_{12})^2}\left\{\frac{\alpha(r_1+r_2)}{r_{12}}(1-\frac{\boldsymbol{r}_1\boldsymbol{r}_2}{r_1r_2})-\frac{1}{2(1+\beta r_{12})^2}-\frac{2}{r_{12}}+\frac{2\beta}{1+\beta r_{12}}\right\} $$ It is very useful to test your code against these expressions. It means also that you don't need to compute a derivative numerically as discussed in the code example below.