A list of puns related to "Generalized Continued Fraction"
Can continued fractions even be computed fast on today's computing platforms, given that they involved a lot of divisions, and divisions take a lot of CPU cycles. Whereas +, -, * can be done with just a few CPU cycles, / takes, depending on the platform, up to several hundred CPU cycles. Doesn't that mean in terms of "wall clock time", continued fraction evaluations are pretty slow.
Every infinite simple (ie. with positive integer entries) continued fraction represents an irrational number, but I can't wrap my head around what changes when we allow entries to be negative.
You can generate an infinite fraction from pretty much any quadratic, regardless of whether it has rational roots or not. For example, the root of the quadratic (x-2)^2 =0 represents a fixed point in the recursive function f(x) = 4/(4-4/(f(x))), and so you might be able to "cheat" and say that
4/(4-4/(4-4/(4-4/(4-...)))) converges to 2.
Can anyone help me make sense of this?
I found this book of notes that certainly helped, and page 30 has some information about problems with negative numbers, but I had a hard time wrapping my head around the reasoning for them.
My first concrete question might be: can a quadratic of the form x^2 - bx - c, where b and c are positive integers, have rational roots? It shouldn't, since the continued fraction generated from it would have positive integer entries.
My attempt at this so far has been to to use the quadratic formula to get the diophantine equation b^2 + 4c = d^2 . If someone could point me in the right direction, I'd appreciate it!
My second question might be: what is it about having a negative sign that screws everything up?
Hello I'm not quite sure what to do here...
Q) Euler discovered the following explicit continued fraction expansion of the number e: [2;1,2,1,1,4,1,1,6,1, 1,8,1,1,10, ...] Find the first eight best rational approximations of e.
I want to write a recursive function that takes an int list as a continued fraction and then spits out a float. Example:
[5; 8, 7, 3, 9] = 5,122902
I'm a little bit lost, so if someone can guide me, it would be lovely! :)
So in this image, M(x) is the long continued fraction.
M(0)=2
M(1)=phi
I want to know what M(2) is. I've looked in every math paper on the internet or books that I can and I cant find an answer that seems even close to what I'm asking. in wolfram alpha I used the code ContinuedFractionK[x^n, 1,{n,0,inf}] yet it overloads the website and I am nowhere close to the answer. By brute forcing it, my answers keep alternating between 1.4 and 1.6. I would like a decimal approximation and an exact answer, if that is even possible.
tl;dr What is M(2)?
I was reading this web page: https://mathworld.wolfram.com/ContinuedFractionConstants.html, and was wondering how these exact values are obtained. I get that you can approximate them by calculating the "partial" fractions, but how do you find an exact value?
I would like to know if there is a number that is equal to a "0" infinite continued fraction, and by that I mean is there a number c such that:
c = 0+1/(0+1/(0+1/...))
I know that if we truncate this fraction at any point beyond the first zero, it will become undefined because it will divide by zero, for example 0+1/0. However, if we keep it as an infinite continued fraction, then doesn't it technically never divide by zero? If it doesn't break any rules, does it converge to a number?
AKA "The monster continued fraction."
The problem I am referring to comes from this MSE post: https://math.stackexchange.com/q/3467869/592365
I will try and explain it without the use of Tex. For a more pretty presentation, see the link.
Let's construct a monstrous infinite continued fraction as follows: begin with 1+1/(1+1/(...)). Then, replace every 1 that is not a numerator with 1/(1+1/(1...)). You end up with an 'infinite continued fraction of infinite continued fractions.'
Then repeat, again replacing every 1 that is not a numerator with 1/(1+1/(...)). Do this infinitely many times and you have an 'infinite continued fraction of infinite continued fractions of infinite continued fractions of...' It's like an infinite continued fraction with an extra dimension. It equals sqrt(2).
There are several ways to show this. The most rigorous, and indeed the only one I know which is verifiably true, is presented in the link. I will not explain it. The more intuitive approach is to recognize that if we denote the limit of the sequence to be S, then it appears that S = 1/S + 1/S. The unique solution to this is S=sqrt(2). This turns out to be the right answer; the reason it is not a rigorous solution is that we cannot assume the limit converges, and even if it did, we can't assume it does not converge to 0.
*The link was previously posted to this subreddit without comment to the MSE post and was removed as spam. I hope my attempt to summarize of the discovery made in the post without just dropping the link makes this worth sharing.
I've fallen into a rabbit hole of continued fraction expansions of square roots, and I noticed a pattern in their periods, and I hope someone can explain.
It's well known that the continued fraction for a quadratic irrational is periodic, and the period for square roots in particular follows a certain form, consisting of a palindromic sequence, terminated by 2*floor(sqrt(n)).
For instance:
sqrt(7)=[2;1,1,1,4,1,1,1,4,...], palindrome is 1,1,1, terminated with 2*2=4
sqrt(14)=[3;1,2,1,6,1,2,1,6,...], palindrome is 1,2,1, terminated with 2*3=6
sqrt(29)=[5;2,1,1,2,10,2,1,1,2,10,...], palindrome is 2,1,1,2, terminated with 2*5=10
I'm curious as to what relation the palindromic sequences have to the numbers themselves, without generating pages and pages of algebra. Surely someone has worked on this in the past?
Is there just a simple, calculatable answer that doesn't require me to scan hundreds of pages from math papers on a subject that I do not understand the most? I keep on seeing a bunch of weird math nonsense and it feels like I didn't get a concise answer.
I want to get the value of square root of two using a formula i found on this website:
https://www.mathpath.org/Algor/squareroot/algor.square.root.contfrac.htm
My output is 1.5 instead of 1.414213562373095.
Where is the problem?
Code:
class SqrtOfTwo{
public static float SqrtTwo()
{
float x = 1/2;
float y;
for(int i=0; i<100; i++);
{
y = 1/(2+x); // ---> 1/(2+(1/2))
x = y; // ---> y= 1/(2+(1/2))
}
return x+1;
}
public static void main(String[] args){
System.out.printf("%.15f", SqrtTwo());
}
}
Like for example: a.bcd... where a,b,c,d... are digits could be represented as a+1/(b+1/(c+1/(d+...)))
I think a lot of us have seen continued fraction expansions of irrational numbers, such as the golden ratio's (~1.618) expansion into 1+1/(1+1/(1+1/(1+1/(1...., or, as I will notate it 1+[1+,1+,1+,1+,1+,...], and e's expansion into 2+1/(1+1/(2+1/(1+1/(1+1/(4..., or 2+[1+,2+,1+,1+,4+,1+,1+,6+,1+,1+,8+...], etc. I know the official way of notating it is slightly different but for my purposes in this post, I'm putting the initial (non-fractional) term outside of the brackets and indicating whether I'm adding or subtracting.
I was playing around with expanding decimal sequences like this on desmos when it occurred to me there might be more than one way to do this, and I came up with several:
Here are some of my observations:
In mathematics, a continued fraction is an expression obtained through an iterative process of representing a number as the sum of its integer part and the reciprocal of another number, then writing this other number as the sum of its integer part and another reciprocal, and so on.
A continued fraction is an expression of the form
1
x + ----------
1
y + -------
1
z + ----
...
and so forth, where x, y, z, and such are real numbers, rational numbers, or complex numbers. Using Gauss notation, this may be abbreviated as
[x; y, z, ...]
To convert a continued fraction to an ordinary fraction, we just simplify from the right side, which may be an improper fraction, one where the numerator is larger than the denominator.
Continued fractions can be decomposed as well, which breaks it down from an improper fraction to its Gauss notation. For example:
16 1
-- = 0 + ---
45 45
--
16
We can then begin to decompose this:
1
0 + ----------------
1
2 + ------------
1
1 + --------
1
4 + -
3
So the Gauss notation would be [0;2,1,4,3].
Your challenge today is to implement a program that can do two things in the realm of continued fractions:
45
--
16
[2;1,7]
7
-
3
45
-- = [2;1,4,3]
16
22
[2;1,7] = --
7
7
- = [2;2,1,1]
3
Display the continued fraction. Mega bonus if you use MathML or LaTeX.
https://en.wikipedia.org/wiki/Continued_fraction
http://www.cemc.uwaterloo.ca/events/mathcircles/2016-17/Fall/Junior78_Oct11_Soln.pdf
When we are given a complex polynomial, say F(s), to check whether the given polynomial is Hurwitz(https://en.m.wikipedia.org/wiki/Hurwitz_polynomial) or not(Hurwitz polynomial is basically a polynomial whose roots are on the left half of the complex plane or on the imaginary axis), we separate the given polynomial into odd and even powered polynomials For example, if,
F(s)= s^5 + 5s^4 +2s^3 + 3s^2 +8s+7
M(s)= s^5 + +2s^3 +8s
N(s)= 5s^4 +3s^2 +7
Then we check whether F(s) is Hurwitz or not by continued expansion of M(s)/N(s) and look at the sign of the coefficients of the quotients we obtain during the process, If all of them are positive, we conclude that F(s) is Hurwitz.
My question is; Why does this work? I've got some understanding as to why the continued fraction expansion of a fraction like 159/18 works, but how does this work for a single polynomial? What happens when we separate it into two polynomials; odd and even?
P.S: I understand, that this question predominantly belongs to electrical engineering subreddit, but I'm curious about the math part of this process and hence I thought posting here would be relevant. Thanks in advance.
Hi guys,
Does anyone know why the explicit formula for an n-th partial fraction of infinite continued fraction of tan(x) is the following? Please help TT
https://preview.redd.it/9nwrqxobv8141.jpg?width=960&format=pjpg&auto=webp&s=fab92e8d2b771e2653619a8d954563d3be3b681d
The continued fraction expansion of e blows my mind a bit. Written in simple continued fraction form, e = [2; 1,2,1,1,4,1,1,6,1,...]. This can also be written (improperly but enjoyably) as [1;0,1,1,2,1,1,4,1,1,...], hitting all the non-negative even numbers.
Always having been fascinated by this connection between the even numbers and Euler's number, I was wondering if there existed any literature that discusses why this pattern emerges, and if it has any connection to the other interesting properties of e?
It also implies that every third convergent approximation will have a much larger "jump" in accuracy, since the last term will be an increasingly large even number, instead of 1, as the other convergents would end with. Is there some property of e that allows it to have these regular, arbitrarily large jumps in rational approximation accuracy?
I don't know if answers to these questions exist in an intuitive sense, and e is such a mysterious number that already has properties we can't necessarily justify, but i figure I can't be the first person to wonder this.
Hello. First of all i need to say that i am not an english speaker and that i have trouble with mathematical / programming vocabulary.
I am a math student with a very low level of programming / algorithmic. Can someone help me make an algorithm that would calculate the n-th continued fraction of e, assuming that we know its continued fraction is [2;1,2,1,1,4,1,1,6,1,...]. I mean, the algorithm would calculate [2], then [2;1] then [2;1,2,] then [2;1,2,1] and so on up to the n-th term.
I dont know if i'm being clear. Thanks for your help
1+1/(2+1/(3+1/(4+...)))
I know you can take partial sums by chopping of at the plus sign, but is there anyway to "Solve" for it? (like the gold ratio's infinite continued fraction) So far I have not been able to come up with one.
The approximate answer after 9 iterations β1.433127427
I'm using simple continued fractions.
[1;x,x,x,...] = (sqrt(x^2 + 4) - x + 2) / 2
I was messing around to see what the values of various continued fractions were that had the form in the title. Like 1+1/(5+1/(5+1/(5+....))))
I noticed a pattern as I went through the first 10 or so... A half hour or so later playing around with excel and wolframalpha.... came up with the above formula. And I did do some googling and couldn't find anything similar.
My question is.... How could you go directly between the simple formula and the continued fraction form, and vice versa? What weird steps need to be taken?
This recurring thread will be a place to ask questions and discuss famous/well-known/surprising results, clever and elegant proofs, or interesting open problems related to the topic of the week. Experts in the topic are especially encouraged to contribute and participate in these threads.
Today's topic is Contunued Fractions. Next week's topic will be Game Theory. Next-next week's topic will be Category Theory.
(Question courtesy of /u/jacoblance)
Prove or disprove carefully that this fraction has a value equal to sqrt(3). (Note: It seems to converge to sqrt(3), at least, but how do you know it does?)
x=2 + 1/(4+(1/4+(1/4+(...))))
how would I go about finding the exact value for this continued fraction?
thank you
When we are given a complex polynomial, say F(s), to check whether the given polynomial is Hurwitz(https://en.m.wikipedia.org/wiki/Hurwitz_polynomial) or not(Hurwitz polynomial is basically a polynomial whose roots are on the left half of the complex plane or on the imaginary axis), we separate the given polynomial into odd and even powered polynomials For example, if,
F(s)= s^5 + 5s^4 +2s^3 + 3s^2 +8s+7
M(s)= s^5 + +2s^3 +8s
N(s)= 5s^4 +3s^2 +7
Then we check whether F(s) is Hurwitz or not by continued expansion of M(s)/N(s) and look at the sign of the coefficients of the quotients we obtain during the process, If all of them are positive, we conclude that F(s) is Hurwitz.
My question is; Why does this work? I've got some understanding as to why the continued fraction expansion of a fraction like 159/18 works, but how does this work for a single polynomial? What happens when we separate it into two polynomials; odd and even?
P.S: I understand, that this question predominantly belongs to electrical engineering subreddit, but I'm curious about the math part of this process and hence I thought posting here would be relevant. Thanks in advance.
For example, a finite continued fraction which is the first few terms of e: [2; 1, 2, 1, 1, 4, 1, 1, 8]. Is there a way to calculate this value that isn't constructing the fraction and working your way back up from the 8?
When we are given a complex polynomial, say F(s), to check whether the given polynomial is Hurwitz or not, we separate the given polynomial into odd and even powered polynomials For example, if,
F(s)= s^5 + 5s^4 +2s^3 + 3s^2 +8s+7
M(s)= s^5 + +2s^3 +8s
N(s)= 5s^4 +3s^2 +7
Then we check whether F(s) is Hurwitz or not by continued expansion of M(s)/N(s) and look at the sign of the coefficients of the quotients we obtain during the process, If all of them are positive, we conclude that F(s) is Hurwitz.
My question is; Why does this work? I've got some understanding as to why the continued fraction expansion of a fraction like 159/18 works, but how does this work for a single polynomial? What happens when we separate it into two polynomials; odd and even?
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.