CITED REFERENCES AND FURTHER READING: Abramowitz, M., and Stegun, . 1964, Handbook of Mathematical Functions, Applied Mathematics Series, Volume 55 | 222 Chapter 6. Special Functions CITED REFERENCES AND FURTHER READING Abramowitz M. and Stegun . 1964 Handbook of Mathematical Functions Applied Mathematics Series Volume 55 Washington National Bureau of Standards reprinted 1968 by Dover Publications New York Chapters 6 7 and 26. Pearson K. ed. 1951 Tables of the Incomplete Gamma Function Cambridge Cambridge University Press . Exponential Integrals The standard definition of the exponential integral is Bn x J dt x 0 n 0 1 . . . The function defined by the principal value of the integral 1 e t fx eJ Ei x -J x 0 is also called an exponential integral. Note that Ei -x is related to -E1 x by analytic continuation. The function En x is a special case of the incomplete gamma function En x xn-1r 1 - n x We can therefore use a similar strategy for evaluating it. The continued fraction just equation rewritten converges for all x 0 1n_1 n 1 2 x 1 x 1 x We use it in its more rapidly converging even form En x e 1 x n 1 n 2 n 1 x n 2 x n 4 The continued fraction only really converges fast enough to be useful for x 1. For 0 x 1 we can use the series representation . -x m En x - --TTfi- ln x n X 7------- T I n 1 m n 1 m m n 1 Sample page from NUMERICAL RECIPES IN C THE ART OF SCIENTIFIC COMPUTING ISBN 0-521-43108-5 The quantity n here is the digamma function given for integer arguments by n 1 1 1 Y n Y X m m 1 Exponential Integrals 223 where 7 . is Euler s constant. We evaluate the expression in order of ascending powers of x En x - 1 x x2 x n 2 1 - n - 2 n 1 3 n 1 2 1 n 2 x n 1 n 1 lnx V n x n x n 1 - 2 n 1 The first square bracket is omitted when n 1. This method of evaluation has the advantage that for large n the series converges before reaching the term containing V n . Accordingly one needs an algorithm for evaluating V n only for small n n 20-40. We use equation although a table look-up would improve efficiency slightly. Amos 1