Let us record here the complete algorithm, with all the details. Recall that the integrals in the variable should not be used in the cases and , in which cases we should use the integrals in terms of the variable . For all other values of we should use the integrals in terms of the variable for ease of numerical integration.
where is a very rough estimate of the corresponding value of . For example, for using and up to results on up to approximately , and using and up to results on up to approximately .
where the integrals in and in are related by
The form of the integral to be used depends on the value of :
The integration is to be by cubic splines, in which the integration increment for a function with derivative , from a point to a point , is given by
where , , and so on. The functions involved and their derivatives are
This completes the algorithm. One should also recall that for even the relevant integrals, with odd , can be written in terms of the error function. In particular, for one can use
This can be used to solve the problem in this case, probably in a more efficient way. For larger even values of one has to derive the corresponding relations for each case in order to do this.