Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b722282

Browse files
author
Oleksandr Kulkov
authored
Update continued-fractions.md
starting on geometric interpretation
1 parent d161533 commit b722282

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/algebra/continued-fractions.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,41 @@ $$\frac{p_k}{q_k} = \frac{a_k p_{k-1} + p_{k-2}}{a_k q_{k-1} + q_{k-2}}$$
105105
106106
Thus, $r_k$ is a weighted [mediant](https://en.wikipedia.org/wiki/Mediant_(mathematics)) of $r_{k-1}$ and $r_{k-2}$.
107107
108+
## Geometric interpretation
109+
110+
If convergents $r_0, r_1, \dots$ are treated as 2-dimensional vectors $\vec r_k=(p_k;q_k)$, the mediant formula above turns into
111+
112+
$$\vec r_k = a_k \vec r_{k-1} + \vec r_{k-2}.$$
113+
114+
To better understand geometric meaning of $\vec r_k$ we need to look closer into computation of $a_k$. Previously we investigated _convergents_ $r_k = [a_0, a_1, \dots, a_k]$. Let's now look on _residuals_ $s_k = [a_{k}, a_{k+1}, \dots]$. From their definition it holds that
115+
116+
$$\left.s_k = a_{k} + \frac{1}{s_{k+1}}\right._{\textstyle .}$$
117+
118+
Starting with $s_0=r$, it is possible to derive similar recurrent formulas for $s_k=\frac{b_k}{c_k}$:
119+
120+
$$\left.\frac{b_k}{c_k}=a_k + \frac{c_{k+1}}{b_{k+1}}\right._{\textstyle .}$$
121+
122+
Thus, $b_{k+1}=c_k$ and $c_{k+1} = b_k - c_k a_k = c_{k-1} - c_k a_k$. This expression looks very close to the continuant and from the starting points $s_0=\frac{r}{1}$ and $s_1 = \frac{1}{r-a_0}$ one may derive the explicit formula for $c_k$:
123+
124+
$$c_k = P_{k-1}(r-a_0, -a_1, \dots, -a_{k-1}).$$
125+
126+
Taking into consideration the continuant properties (which follow from its determinant representation)
127+
128+
$$\begin{align}
129+
P_k(a_0, \dots, a_k) &= (-1)^{k+1} P_k(-a_0, \dots, -a_k),\\
130+
P_k(a_0, \dots, a_k) &= a_0 P_{k-1}(a_1, \dots, a_k) + P_{k-2}(a_2, \dots, a_k),
131+
\end{align}$$
132+
133+
we may rearrange the expression for $c_k$ in a much simpler manner:
134+
135+
$$c_k = (-1)^{k-1} (r q_{k-1} - p_{k-1}).$$
136+
137+
This gives us the final formula to calculate residual $s_k$ from convergents:
138+
139+
$$s_k = \left|\frac{rq_{k-2} - p_{k-2}}{rq_{k-1} - p_{k-1}}\right|_{\textstyle .}$$
140+
141+
On the other hand, $a_k$ may be defined as $a_k = \lfloor s_k \rfloor$, thus we have more explicit expression for $a_k$ as well.
142+
108143
## Convergence
109144
110145
Now that we have some explicit formulas for convergent numbers, let's estimate their distance to the final number $r$. First of all, we can estimate the difference between adjacent convergents:

0 commit comments

Comments
 (0)