Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

#1 2012-10-19 19: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-19 19:55:54

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#3 2012-10-19 21: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-19 21:48:12

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#5 2012-10-19 22: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-19 22:29:23

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#7 2012-10-19 22:52:56

Ronald
Guest

Re: Continued fraction

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

#8 2012-10-19 22:57:25

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Board footer

Powered by FluxBB