Suppose that \(0< a< b\). Which of the following continued fractions is bigger? Why? \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{a}}} \quad \textrm{or} \quad \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{b}}}\]

We know that \(0< a< b\). So we also know that \(\frac{1}{a}>\frac{1}{b}\) and therefore that \(3+\frac{1}{a}>3+\frac{1}{b}\).

It then follows that \(\cfrac{1}{3+\cfrac{1}{a}}< \cfrac{1}{3+\cfrac{1}{b}}.\)

We can now say that \(2+\cfrac{1}{3+\cfrac{1}{a}}< 2+\cfrac{1}{3+\cfrac{1}{b}}\).

Finally, we can use this to say that \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{a}}}>\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{b}}}.\]

### Alternative approach

We could try to write the continued fractions as algebraic fractions with the same denominator. \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{a}}}=\frac{3a+1}{7a+2}\]

and similarly, \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{b}}}=\frac{3b+1}{7b+2}.\]

Writing these as fractions with a common denominator of \((7a+2)(7b+2)\) gives us the numerators \((3a+1)(7b+2)\) and \((3b+1)(7a+2)\) to compare.

Expanding the brackets we get \((3a+1)(7b+2)=21ab+6a+7b+2\) and \((3b+1)(7a+2)=21ab+6b+7a+2\). The only parts of these two expressions that differ are the middle terms \(6a+7b\) and \(6b+7a\). We know that \(a< b\) so we can reason that \(6a+7b>6b+7a\).

Therefore we can conclude that \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{a}}}>\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{b}}}.\]

It is worth noting how much neater the first approach is. Whilst comparing fractions with common denominators sounds reasonable, it is not always necessary.

Suppose the fractions are continued in the same way, then which is bigger in the following pair and why? \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cfrac{1}{a}}}} \quad \textrm{or} \quad \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cfrac{1}{b}}}}\]

This problem is a further extension of the first. In the process of repeating the first approach above we can show that \[2+\cfrac{1}{3+\cfrac{1}{4+\cfrac{1}{a}}}> 2+\cfrac{1}{3+\cfrac{1}{4+\cfrac{1}{b}}}\]

And therefore that \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cfrac{1}{a}}}}< \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cfrac{1}{b}}}}.\]

Now compare: \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\dotsb+\cfrac{1}{99+\cfrac{1}{100+\cfrac{1}{a}}}}}}\] and the same thing with \(b\) in place of \(a\).

Now the continued fractions have been expanded all the way down to \(100+\frac{1}{a}\) and \(100+\frac{1}{b}\).

If we show the bottom line of the continued fraction as \(x+\frac{1}{a}\) or \(x+\frac{1}{b}\) then from above we can see that when \(x\) is odd, the continued fraction with \(a\) in it is bigger. However, when \(x\) is even, the continued fraction with \(b\) in it is bigger.

\(100\) is even, therefore \[\cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\dotsb+\cfrac{1}{99+\cfrac{1}{100+\cfrac{1}{a}}}}}}< \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\dotsb+\cfrac{1}{99+\cfrac{1}{100+\cfrac{1}{b}}}}}}.\]