Find the value of the infinite continued fraction
\(\cfrac{1}{2 + \cfrac{1}{2 + \cfrac{1}{2 + \dotsb}}}\)
This short computer code gives the value of:
c=1E100; listforeach(b,reverse(1, 2, 1, 2, 1, 2), c=b + 1/c)
Sqrt(3) =1.7320508075688772935274463415059......
P.S. One of the moderators will solve it algebraically.
\(x=1+\dfrac{1}{1+\frac{1}{2+\frac{1}{1+\frac{1}{2+...}}}}\\ x-1=\dfrac{1}{1+\frac{1}{2+\frac{1}{1+\frac{1}{2+...}}}}\\ x-1=\dfrac{1}{1+\frac{1}{2+(x-1)}}\\ x-1=\dfrac{1}{\frac{2+x-1+1}{2+x-1}}\\ x-1=\dfrac{1}{\frac{2+x}{1+x}}\\ x-1=\dfrac{1+x}{x+2}\\ (x-1)(x+2)=x+1\\ x^2+x-2=x+1\\ x^2=3\\ x=\pm\sqrt3\)
The answer must be positive so the only valid andwer is \(x=\sqrt3\)