ArticleslgStudy

computer science

Lentz's algorithm

Lentz's algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Lentz's algorithm rather than just read about it. In short: In mathematics, Lentz's algorithm is an algorithm to evaluate continued fractions, and was originally devised to compute tables of spherical Bessel functions. The version often employed now is the simplification due to Thompson and Barnett.

Key takeaways

  • Lentz's algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Lentz's algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Lentz's algorithm from memory before moving on to harder problems.

Reference excerpt

In mathematics, Lentz's algorithm is an algorithm to evaluate continued fractions, and was originally devised to compute tables of spherical Bessel functions. The version often employed now is the simplification due to Thompson and Barnett.

History The idea was introduced in 1973 by William J. Lentz and was simplified by him in 1982. Lentz suggested that calculating ratios of spherical Bessel functions of complex arguments over a wide range of values 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 starts from the beginning of the continued fraction rather than the tail, had a built-in check for convergence, and is numerically stable. The original algorithm uses algebra to bypass a zero or near-zero independently in either the numerator or denominator. Simpler Improvements to overcome unwanted zero terms include an altered recurrence relation 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., or Lentz's simplification.

Initial work This theory was initially motivated by Lentz's need for accurate calculation of ratios of spherical Bessel functions of consecutive order and complex argument 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. The algorithm suggested that it is possible to terminate the evaluation of continued fractions when | f j − f j − 1 | {\displaystyle |f_{j}-f_{j-1}|} is relatively small.

Algorithm Lentz's algorithm is based on the Wallis-Euler relations. John Wallis independently rediscovered the recursion relations about 500 years after the Indian mathematician Bhas-Cara II. For continued fractions, the definitive standard notation is found under "Elementary Analytical Methods", page 19 and throughout the text for each function.

f 0 = b 0 {\displaystyle f_{0}=b_{0}}

f 1 = b 0 + a 1 b 1 {\displaystyle f_{1}=b_{0}+{\frac {a_{1}}{b_{1}}}}

f 2 = b 0 + a 1 b 1 + a 2 b 2 {\displaystyle f_{2}=b_{0}+{\frac {a_{1}}{b_{1}+{\frac {a_{2}}{b_{2}}}}}}

f 3 = b 0 + a 1 b 1 + a 2 b 2 + a 3 b 3 {\displaystyle f_{3}=b_{0}+{\frac {a_{1}}{b_{1}+{\frac {a_{2}}{b_{2}+{\frac {a_{3}}{b_{3}}}}}}}}

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

f n = b 0 + K n j = 1 a j b j {\displaystyle f_{n}=b_{0}+{\underset {j=1}{\overset {n}{\operatorname {K} }}}{\frac {a_{j}}{b_{j}}}}

is the n {\displaystyle n} th convergent to f {\displaystyle f} then

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Lentz's algorithm

Start with the simplest possible case. Write down what Lentz's algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Lentz's algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Lentz's algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Lentz's algorithm

In research
Lentz's algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Lentz's algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Lentz's algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Special hypergeometric functions, so understanding it makes those chapters shorter.
In everyday life
Look for Lentz's algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Lentz's algorithm” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Lentz's algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Lentz's algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Lentz's algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Lentz's algorithm in simple terms?

In mathematics, Lentz's algorithm is an algorithm to evaluate continued fractions, and was originally devised to compute tables of spherical Bessel functions. The version often employed now is the simplification due to Thompson and Barnett.

Why does Lentz's algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Lentz's algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Lentz's algorithm.

Tags

  • Special hypergeometric functions

Keep exploring