Incomplete Gamma Function with Continued Fractions

Continued fractions provide a very effective toolset for approximating functions. Usually the continued fraction expansion of a function approximates the function better than its Taylor or Fourier series. This Demonstration compares the quality of three approximations to the incomplete gamma function . One is the Taylor series and the other two are continued fraction expansions. The first continued fraction expansion can be obtained as a canonical even contraction of a continued fraction using Euler's method to transform a series to an S-fraction. The other is a continued fraction expansion the author has developed as a canonical even contraction from the first one.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


This Demonstration shows an example of the Taylor series providing a better approximation to a function in a certain range and a continued fraction approximation providing a better approximation in another range. It is generally a shortcoming of polynomials that for larger absolute values of they cannot approximate functions well that converge towards constants or do not have zeroes, as polynomials tend to ±∞ for large absolute . Rational function approximations—for example, continued fractions or Padé approximations—or certain special functions are much better. On the other hand, as can be seen here, the series approximates the incomplete Gamma function better for smaller values of as both continued fraction expansions must go through the origin, but . The optimal "change-over point" varies with the parameter and the number of terms used in the expansions.
Additional Information:
The continued fraction algorithms uses the backward recurrence method to compute the continued fraction expansion. This method has been shown to be extremely stable for most continued fraction expansions, which is extremely important on numerical platforms that incur truncation or round-off error due to the limitations of machine precision. It can be shown that the backward recurrence method ("from tail to head") is vastly more stable (even self-correcting) than the forward recurrence method ("from head to tail") for two important classes of continued fractions: the Stieltjes continued fractions (which includes the C-fractions) and those that fulfill the parabolic convergence region theorem. Several function classes with known Stieltjes continued fraction expansions include: exponential integrals, incomplete gamma functions, logarithms of gamma functions, the error function, ratios of successive Bessel functions of the first kind, Euler's hypergeometric function, as well as various elementary transcendental functions. The forward recurrence method (which solves a second-order linear difference equation), however, can be computationally more efficient due to the carry-over of results from one step to the next, which is a property the backward recurrence method does not possess.
The backward recurrence method of the continued fraction expansion is also more stable than its conversion to a Padé approximation (even when several forms of the Horner form of the numerator and denominator polynomials are used), which is very important on strictly numerical platforms.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+