Infinite continued fraction expansion

396 Views Asked by At

How can we find the first six partial quotients of the infinite continued fraction expansion of $\sqrt[3]2$? I know how to do this by expanding when we have a square root function... but I"m not sure what to do with a cubic root.

2

There are 2 best solutions below

0
On

Use a calculator to find the first few terms of the continued fraction expansion of $2^{1/3}$. It is an easy computation, but becomes unreliable after a while. (This is in contrast with the continued fraction expansion of $\sqrt{n}$, where the computations can be done with exact integer arithmetic.)

The calculation is pleasantly simple, particularly if the calculator has a "$1/x$" button.

My calculator says that $2^{1/3}$ is $1.259931$ (it is sneaky, and keeps at least one digit hidden).

Write down $1$.

Subtract $1$, press the $1/x$ button. I get $3.8473221$.

Write down $3$.

Subtract $3$, press the $1/x$ button. I get $1.1801887$.

Write down $1$.

Subtract $1$, press the $1/x$ button. I get $5.5497365$.

Write down $5$.

Subtract $5$, press the $1/x$ button. I get $1.8190533$.

Write down $1$.

Subtract $1$, press the $1/x$ button.

It turns out we write down a $1$, and next a $4$, but this is already more than we need. The continued fraction expansion begins with $$\left<1;3,1,5,1,1,4\dots\right>.$$

Now we can calculate the convergents, one at a time. Not a whole lot of fun, but easy arithmetic.

0
On

In response to André Nicolas's post, here's one way to use exact rational arithmetic. Let $x_0 = 2^{1/3}$.

First note that for rationals $a, b, c$, we can check the sign of $a x_0^2 + b x_0 + c$. The nontrivial case is where $a \ne 0$ and $b^2 - 4 a c > 0$. Let $r_1 < r_2$ be the roots of $a x^2 + b x + c$, which in this case are real and distinct. Then $a x_0^2 + b x_0 + c$ has the same sign as $a$ iff either $x_0 < r_1$ or $x_0 > r_2$, i.e. $2 < r_1^3$ or $2 > r_2^3$. Express these in terms of square roots, isolate the square roots: you get inequalities of the form $\sqrt{b^2-4ac} < R$ or $\sqrt{b^2-4ac} > R$, where $R$ is rational. If $R > 0$, square both sides and you have a rational expression to check.

Now let the continued fraction be $x_0 = [a_0; a_1, a_2, \ldots]$ and the $k$'th remainder be $x_k = [a_k; a_{k+1}, a_{k+2}, \ldots]$. We have $a_k = \lfloor x_k \rfloor$ (which, by the previous paragraph, can be computed using rational arithmetic), and $x_{k} = a_k + 1/x_{k+1}$ so $x_{k+1} = 1/(x_k - a_k)$. Now if $x_k = c_k x_0^2 + d_k x_0 + e_k$, $$x_{k+1} = \dfrac{1}{c_k x_0^2 + d_k x_0 + e_k - a_k} = c_{k+1} x_0^2 + d_{k+1} x_0 + e_{k+1}$$ where $c_{k+1},d_{k+1},e_{k+1}$ are rational expressions in $c_k,d_k,e_k-a_k$.

In this case

$$\eqalign{a_0 &= 1 \cr x_1 &= 2^{2/3} + 2^{1/3} + 1\cr a_1 &= 3\cr x_2 &= \dfrac{3}{10} 2^{2/3} + \dfrac{2}{5} 2^{1/3} + \dfrac{1}{5}\cr a_2 &= 1\cr x_3 &= \dfrac{4}{3} 2^{2/3} + \dfrac{5}{3} 2^{1/3} + \dfrac{4}{3} \cr a_3 &= 5\cr}$$ etc