# Infinite continued fraction implies that the number is irrational

I've read recently that any number with infinite continued fraction is irrational. See this continued fraction below

https://www.wolframalpha.com/input/?i=continued+fraction+of+the+cosine If I substitute x for $\frac{\pi}{2}$ I will get zero on the left side, but the continued fraction is infinite because its convergent ones never cancel out. Could anyone explain me this?

• Please write down what you think you get when you "substitue $1$ for $\pi/2$". Then we may be able to help you. Nov 8, 2017 at 17:45
• @Somos You're an optimist.
– user436658
Nov 8, 2017 at 18:42
• What does "its convergent ones never cancel out" mean ? Nov 9, 2017 at 10:30
• What you must have read is that a number with an infinite simple continued fraction expansion is irrational. A continued fraction is "simple" if all the partial numerators are ones.
– bof
Nov 9, 2017 at 11:01
• Any rational number can be expanded as a simple continued fraction in two slightly different ways, and those continued fractions are finite. Any irrational number has a unique expansion as a simple continued fraction, and it's infinite. (The continued fraction is periodic if and only if the irrational number is quadratic.)
– bof
Nov 9, 2017 at 11:05