Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2012-10-18 20:39:44

Ronald
Guest

Continued fraction

How do i find a number's convergent,could you help me find sqrt(3)'s convergents

#2 2012-10-18 20:55:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Continued fraction

Hi Ronald;

Do you know how to get the continued fraction representation of that first?

The convergents are:


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2012-10-18 22:24:31

Ronald
Guest

Re: Continued fraction

Yes,I know how to get the representation,I just want to know what is the method of finding convergents

#4 2012-10-18 22:48:12

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Continued fraction

You use two recurrences.

Call the representation above a1,a2,a3,a4,a5...

You start with the numerators of the a's and use this recurrence.

with the initial conditions of

The first few numerators are

The denominators are done in the same way.

with the initial conditions of

The first few denominators are;

For example the fifth convergent is 19 / 11.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2012-10-18 23:17:50

Ronald
Guest

Re: Continued fraction

Are the h1,h2,k1,k2 defined for every representation,or are they depending on the representation?

#6 2012-10-18 23:29:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Continued fraction

They  are the numerators and the denominators of the first two of the cf representation.

Look at the cf:

See the 1,1 at the beginning? That can be expressed as 1 / 1 and 1 / 1.

So

h[1] = 1 and h[2] = 1. ( the numerators )

k[1] = 1 and k[2] = 1. ( the denominators )

Now isn't that the neatest thing you ever saw! Computational mathematics!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2012-10-18 23:52:56

Ronald
Guest

Re: Continued fraction

So for sqrt(.9),h1=1,h2=1,k1=1,k2=1?

#8 2012-10-18 23:57:25

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Continued fraction

Is that .9?

Here is a shortcut method to get the initial conditions that prime those recurrences.

In some books you will see them start at a0 and h[0] rather than a1 and h[1]. Just shift all indices down by one in that case. I used the higher indices because programming languages start at 1 not 0 for an array.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB