Continued fractions approximation using golden ratio

119 Views Asked by At

Hello today my friend helped me with my problem, but he did not give me any additional informations why it works like that. Let's suppose that I need to get ln(n) using continued fractions. He told me to convert the n in to the field between $$<0.61803398875, 1.61803398875>$$by either multiplying it by e or dividing it by e and then add number of times that i have multiplied the number and subtract number of times i have divided -- he told me that way i can use just 5 iterations but i do not know why :( . Can someone explain this to me? Basically this is the transformation :

$$ newNumber = 8.47,count = 0 --> ln(newNumber) $$ will transform it to my range like this

$$ while(newNumber ∉ range) $$ do $$ newNumber = newNumber / e ; count = count + 1$$ when i will be finished new number will be $$newNumber = 1.14628984901 $$ now i can compute my ln using continued fractions formula in just 5 iterations which will give me $$ ln(newNumber) = 0.13653050866 $$ and to get desired output I will now add count to it $$ln(newNumber) = 0.13653050866 + count$$, which leaves us with $$ln(newNumber) = 2.13653050866$$ which is correct. My question is. Why i could do just 5 iterations to get so accurate result for $$ln(newNumber) --> which is in range$$. But I could not achieve it with 5 iterations for example number 8.47 right of the bat?

1

There are 1 best solutions below

3
On BEST ANSWER

The first basic idea is that it is easier to make a good approximation over a narrow interval. Many approximations are exact at one point and match closely near that point.

The second idea is using the laws of logarithms. If $N=e^ab, \ln N=\ln(e^ab)=a+\ln b$. You can restrict the range of $b$ that you need to take the log of by dividing $b$ by the proper power of $e$. The suggested range does not quite work because $\frac \phi{\phi-1}=1+\phi\approx 2.618 \lt e$. You can restrict it to $(e^{-1/2},e^{1/2})\approx (0.6065,1.645)$ which is not so different from what your friend suggested. This assumes you can find the correct integral $a$ to divide your number by $e^a$ to get the quotient in range.

Once you have divided out $e^a$ you can use whatever approximation technique you want over the restricted range. You can do continued fractions, Taylor series, Padé approximations, or whatever. You need to use enough terms to get the accuracy you need. I don't see how you can know that five terms are enough unless you specify the accuracy requirement.