Lentz's algorithm explained

In mathematics, Lentz's algorithm is an algorithm to evaluate continued fractions and compute tables of spherical Bessel functions.[1] [2]

The version usually employed now is due to Thompson and Barnett.

History

The idea was introduced in 1973 by William J. Lentz and was simplified by him in 1982.[3] Lentz suggested that calculating ratios of spherical Bessel functions of complex arguments can be difficult. He developed a new continued fraction technique for calculating the ratios of spherical Bessel functions of consecutive order. This method was an improvement compared to other methods because it started from the beginning of the continued fraction rather than the tail, had a built-in check for convergence, and was numerically stable. The original algorithm uses algebra to bypass a zero in either the numerator or denominator.[4] Simpler Improvements to overcome unwanted zero terms include an altered recurrence relation[5] suggested by Jaaskelainen and Ruuskanen in 1981 or a simple shift of the denominator by a very small number as suggested by Thompson and Barnett in 1986.[6]

Initial work

This theory was initially motivated by Lentz's need for accurate calculation of ratios of spherical Bessel function necessary for Mie scattering. He created a new continued fraction algorithm that starts from the beginning of the continued fraction and not at the tail-end. This eliminates guessing how many terms of the continued fraction are needed for convergence. In addition, continued fraction representations for both ratios of Bessel functions and spherical Bessel functions of consecutive order themselves can be computed with Lentz's algorithm.[4] The algorithm suggested that it is possible to terminate the evaluation of continued fractions when

|fj-fj-1|

is relatively small.[7]

Algorithm

Lentz's algorithm is based on the Wallis-Euler relations. If

{f}0={b}0

{f}1={b}0+

{a
1
}

{f}2={b}0+

{a
1
}

{f}3={b}0+

{a
1
}

etc., or using the big-K notation, if

{f}n={b}0+\underset{j=1}\overset{n}\operatorname{K}

{a
j
}

is the

n

th convergent to

f

then

{f}n=

{A
n
}

where

{A}n

and

{B}n

are given by the Wallis-Euler recurrence relations

{A}-=1

{B}-=0

{A}0={b}0

{B}0=1

{A}n={b}n{A}n+{a}n{A}n

{B}n={b}n{B}n+{a}n{B}n

Lentz's method defines

{C}n=

{A
n
}

{D}n=

{B
n
}

so that the

n

th convergent is

{f}n={C}n{D}n{f}n

and uses the recurrence relations

{C}0=

{A
0
} = _

{D}0=

{B
-
} = 0

{f}0={b}0

{C}n={b}n+

{a
n
}

{D}n=

1
{b

n+{a}n{D}n

}

When the product

{C}n{D}n

approaches unity with increasing

n

, it is hoped that

{f}n

has converged to

f

.[8]

Applications

Lentz's algorithm was used widely in the late twentieth century. It was suggested that it doesn't have any rigorous analysis of error propagation. However, a few empirical tests suggest that it's at least as good as the other methods.[9] As an example, it was applied to evaluate exponential integral functions. This application was then called modified Lentz algorithm.[10] It's also stated that the Lentz algorithm is not applicable for every calculation, and convergence can be quite rapid for some continued fractions and vice versa for others.[11]

Notes and References

  1. Lentz. W. J.. September 1973. A Method of Computing Spherical Bessel Functions of Complex Argument with Tables. Atmospheric Sciences Laboratory, US Army Electronics Command. White Sands Missile Range, New Mexico. Research and Development Technical Report ECOM-5509 .
  2. Book: Numerical Recipes in C++. 177–179. 0 521 75033 4.
  3. Book: J., Lentz, W.. A Simplification of Lentz's Algorithm.. August 1982. Defense Technical Information Center. 227549426.
  4. Lentz. William J.. 1976-03-01. Generating Bessel functions in Mie scattering calculations using continued fractions. Applied Optics. 15. 3. 668–671. 10.1364/ao.15.000668. 20165036 . 1976ApOpt..15..668L . 0003-6935.
  5. Jaaskelainen. T.. Ruuskanen. J.. 1981-10-01. Note on Lentz's algorithm. Applied Optics. 20. 19. 3289–3290. 10.1364/ao.20.003289. 20333144 . 1981ApOpt..20.3289J . 0003-6935.
  6. Thompson. I.J.. Barnett. A.R.. 1986. Coulomb and Bessel functions of complex arguments and order. Journal of Computational Physics. 64. 2. 490–509. 10.1016/0021-9991(86)90046-x. 1986JCoPh..64..490T . 0021-9991.
  7. Book: Masmoudi. Atef. Bouhlel. Med Salim. Puech. William. 2012 6th International Conference on Sciences of Electronics, Technologies of Information and Telecommunications (SETIT) . Image encryption using chaotic standard map and engle continued fractions map . March 2012. http://dx.doi.org/10.1109/setit.2012.6481959. 474–480 . IEEE. 10.1109/setit.2012.6481959. 978-1-4673-1658-3 . 15380706 .
  8. Book: Press . W.H. . Numerical Recipes: The Art of Scientific Computing . Teukolsky . S.A. . Vetterling . W.T. . Flannery . B. P. . Cambridge University Press . 2007 . 3rd . 207–208.
  9. Book: Press . W.H. . Numerical Recipes in Fortran, The Art of Scientific Computing. Teukolsky . S.A. . Vetterling . W.T. . Flannery . B. P. . Cambridge University Press . 1992 . 2nd . 165.
  10. Press. William H.. Teukolsky. Saul A.. 1988. Evaluating Continued Fractions and Computing Exponential Integrals. Computers in Physics. 2. 5. 88. 10.1063/1.4822777. 1988ComPh...2...88P . 0894-1866. free.
  11. Wand. Matt P.. Ormerod. John T.. 2012-09-18. Continued fraction enhancement of Bayesian computing. Stat. 1. 1. 31–41. 10.1002/sta4.4. 22533111 . 119636237 . 2049-1573.