Introduction

As we have seen in the notes on density functional theory, once the orbitals $\psi_i(\vec x)$ have been determined, the final steps in determining the total energy $E$ involve calculating various integrals. Because we will determine the $\psi_i(\vec x)$ numerically, we must calculate these integrals numerically as well.

Generically, numerical integration techniques take the form of a weighted sum of sample values,

\begin{displaymath}
\int f(x) \, dx \approx \sum_i w_i f(x_i),
\end{displaymath} (1)

where the $w_i$ are the weights, the $x_i$ are the sample points and the $f(x_i)$ are the sample values. Note that the integral may be multidimensional, in which case the sample points $x$ are vectors.

Different techniques for choosing the sample points categorize the various techniques. These include choosing the sample points $x_i$

  1. at regular intervals (trapezoid, Simpson's and higher-order rules);
  2. fixed in number at locations chosen to produce the highest possible accuracy (Gaussian quadrature);
  3. according to the behavior of $f(x_i)$ (adaptive integration);
  4. at random (Monte Carlo integration).
Given the sample points, the mathematics of integration then determines the appropriate weights so that (1) becomes a good approximation.

Each of the above approaches has strengths and weaknesses. The regular-interval approaches (1) are best when the sample values $f(x_i)$ come from a regular process, such as experimental measurements or another numerical calculation. For high accuracy under conditions where the evaluation of $f(x)$ is expensive but we have control over the selection of the $x_i$, Gaussian quadrature (2) comes to the fore. Both (1) and (2) presume that the integrand $f(x)$ varies relatively uniformly throughout the integration domain. In cases where $f(x)$ varies inhomogeneously, but in a predictable way, the combination of (1) or (2) with the elegant approach of a change of variables (Section 5) can be very powerful. Otherwise, and adaptive approaches (3) become necessary. Finally, Monte Carlo (4) methods are the only choice for integrals in very large dimensional spaces, such as thermodynamic averages or quantum mechanical path integrals. When multiple approaches apply, simplicity should always be the deciding factor.

For us, the $\psi_i(\vec x)$ will come from a numerical process producing data on regular intervals. The $\psi_i(\vec x)$ do not vary uniformly, but have strong variations near the nuclei where the Coulomb energy $-Z/r$ is singular. This behavior is quite predictable, and the simplest viable approach is therefore the combination of a regular interval approach (1) with a change of variables, which is the subject of these notes.

Tomas Arias 2004-01-26