Formulas for integration and differentiation

Many classes of formulas can be represented most concisely in terms of the differences of the values of the function at a set of equally spaced grid points. Of the possible notations, the central difference notation is the most convenient and is the one used throughout.

Let fj = f(xj) where x is used to denote either r or$\rho$. By definition, the central difference operator is given by

\begin{displaymath}\delta f(x) = f(x+h/2) + f(x-h/2).\end{displaymath} (54)


Then

\begin{displaymath}\delta f_{j+1/2} = f_{j+1} - f_j\end{displaymath} (55)


and

$\displaystyle \delta^2 f_j$ = $\displaystyle \delta f_{j+1/2} - \delta f_{j-1/2}$  
  = fj+1 - 2 fj + fj-1. (56)

Many atomic properties require the evaluation of an integral, say,

\begin{displaymath}I = \int_0^\infty f(x)dx \approx \int_0^{x_M} f(x)dx\end{displaymath} (57)


where xM is a suitably chosen large value of x, such that $\int_{x_M}^\infty f(x)dx$ is negligible. When f(x) is tabulated at equally spaced points $x_j = jh, j =0,1,\ldots, M$, where M is even, the integration may be represented by the composite rule

\begin{displaymath}\int_0^{x_M}f(x)dx = \sum_{ \mbox{$j$\space odd}} \int_{x_{j-1}}^{x_{j+1}} f(x)dx\end{displaymath} (58)


where each individual integral is over two adjacent intervals. It can be shown that

\begin{displaymath}\int_{x_{j-1}}^{x_{j+1}} f(x)dx = 2h\left(f_j + \frac{1}{6} \delta^2f_j -\frac{1}{180} \delta^4 f_j\right) + {\cal O}(h^7).\end{displaymath} (59)


This formula uses values of the integrand outside the range of integration and cannot be used for the first and last integral. In these cases the $\delta^4$ term may be omitted leading to the well-known Simpson's rule

\begin{displaymath}\int_{x_{j-1}}^{x_{j+1}} f(x)dx =\frac{h}{3}\left[f_{j-1} +4 f_j + f_{j+1}\right] + {\cal O}(h^5).\end{displaymath} (60)


For certain integrals the accuracy of Simpson's rule is satisfactory.
 



2001-01-09