Continued Fractions
Overview
Continued Fractions are a way of representing real numbers as a sequence of positive integers. Let's say we have a real number . We can form a sequence of positive integers from in this way:
For example, let's say . We can say that
The trick here is that if , we can continue this exact process with and keep the continued fraction going.
Example
Let's take another example, that of :
The list of continued fractions is represented as a list of the coefficients , in this case
Convergents
The th convergent of a continued fraction is the approximation of the fraction we gain by truncating the continued fraction and using only the first terms of the sequence, for example the 2nd convergence of is while the 3rd would be .
One of the obvious applications of these convergents is as rational approximations to irrational numbers.
Properties of Convergences
As a sequence, they have a limit
This limit is , the real number you are attempting to approximate
They are alternately greater than and less than
Sage
In Sage, we can define a continue fraction very easily:
We can then print off the list of coefficients:
And the convergents are even calculated for us:
Last updated