3.2 Infinite continued fractions · 무한 연분수
$i \ge 1$인 모든 $i$에 대하여 $a_i, b_i \gt 1$이고 $a_n, b_m \gt 1$이면서 $[a_0; a_1, \cdots, a_n] = [b_0; b_1, \cdots, b_m]$이면, $n = m$이고 $i \le n$인 모든 $i$에 대하여 $a_i = b_i$이다.
If $[a_0; a_1, \cdots, a_n] = [b_0; b_1, \cdots, b_m]$ for $a_i, b_i \gt 1$ for all $i \ge 1$ and $a_n, b_m \gt 1$, then $n = m$ and $a_i = b_i$ for all $i \le n$.
임의의 유리수를 유한 단순연분수로 쓰는 방법은 정확히 두 가지이다.
There are exactly two ways of writing any rational number as a finite simple continued fraction.
예를 들어 $[7] = [6; 1]$, $[1; 2, 2, 2] = [1; 2, 2, 1, 1]$, $[1;1,1,1,2] = [1;1,1,1,1,1]$이다.
역주. 원문 셋째 등식은 "$[1;1;1;1;2] = [1;1,1,1,1]$"로 인쇄되어 있다. 왼쪽 기호의 세미콜론은 쉼표의 오타이고, 오른쪽에는 $1$이 하나 빠져 있다(인쇄된 대로 읽으면 $[1;1,1,1,2] = \frac{13}{8}$이고 $[1;1,1,1,1] = \frac{8}{5}$이어서 서로 다르다). 마지막 항이 $1$보다 큰 유한 단순연분수는 $[a_0;\cdots,a_n] = [a_0;\cdots,a_n-1,1]$로 한 항 늘려 쓸 수 있으므로 $[1;1,1,1,2] = [1;1,1,1,1,1]$이다(둘 다 $\frac{13}{8}$). 위에서 바로잡아 옮겼다.
$x \in \mathbb{R}$이 무리수라고 하자. 그러면 다음을 만족하는 $a_i \in \mathbb{Z}_{>0}$ $(i \ge 1)$가 존재한다.
$\lim_{n \to \infty}[a_0; a_1, \cdots a_n]$을 $[a_0; a_1, \cdots, a_n, \cdots]$로 나타내기로 하자.
For example, $[7] = [6; 1]$, $[1; 2, 2, 2] = [1; 2, 2, 1, 1]$, and $[1; 1; 1; 1; 2] = [1; 1, 1, 1, 1]$.
Assume that $x \in \mathbb{R}$ irrational number. Then $\exists a_i \in \mathbb{Z}_{>0}(i \ge 1)$ such that
Let $[a_0; a_1, \cdots, a_n, \cdots]$ denote $\lim_{n \to \infty}[a_0; a_1, \cdots a_n]$.
입력 : 실수 $x$
출력 : $x = \lim_{k \to \infty} C_k$가 되도록 하는 $\left[a_0; a_1, \cdots, a_n, \cdots\right]$
- $x_0 = x$로 둔다.
- $a_m$을 $x_m$의 정수 부분, 즉 $[x_m]$이라 하자.
- $\xi_m := x_m - a_m$으로 둔다.
- $\xi_m \neq 0$이면 $\frac{1}{\xi_m}$을 $x_{m+1}$로 두고 2단계로 돌아간다.
- $\xi_m = 0$이면 이 알고리즘을 종료한다.
역주. 원문 4단계는 "If $\xi_m$, then set …"로 적혀 조건이 빠져 있으나(원문에 $\neq 0$ 누락) 문맥상 $\xi_m \neq 0$이다. 위에서 바로잡아 옮겼다.
Input : a real number $x$
Output : $\left[a_0; a_1, \cdots, a_n, \cdots\right]$ such that $x = \lim_{k \to \infty} C_k$
- $x_0 = x$.
- Let $a_m$ be the integral part of $x_m$, it means $[x_m]$.
- $\xi_m := x_m - a_m$.
- If $\xi_m$, then set $\frac{1}{\xi_m}$ as $x_{m+1}$ and go back to step 2.
- If $\xi_m = 0$, then terminate this algorithm.
예를 들어 $\pi = [3; 7, 15, 1, 292, \cdots]$이다.
For example, $\pi = [3; 7, 15, 1, 292, \cdots]$.
연분수 $[a_0; a_1, \cdots, a_n, b_1, \cdots, b_m, b_1, \cdots, b_m, \cdots]$를 순환연분수라 하고, $[a_0; a_1, \cdots, a_n, \overline{b_1, \cdots, b_m}]$로 나타낸다.
The continued fraction $[a_0; a_1, \cdots, a_n, b_1, \cdots, b_m, b_1, \cdots, b_m, \cdots]$ denoted by $[a_0; a_1, \cdots, a_n, \overline{b_1, \cdots, b_m}]$.
$x = [3; 6, \overline{1, 4}]$라 하자. $y = [\overline{1; 4}]$로 정의하면 $x = [3; 6, y]$이고 $y = [1; 4, \overline{1, 4}] = [1; 4, y]$이다. 따라서 다음을 얻는다.
$y \gt 0$이므로 $y = \frac{1+\sqrt2}{2}$이다. 따라서
Let $x = [3; 6, \overline{1, 4}]$. Define $y = [\overline{1; 4}]$. Then $x = [3; 6, y]$ and $y = [1; 4, \overline{1, 4}] = [1; 4, y]$. Therefore we know that
Since $y \gt 0$, $y = \frac{1+\sqrt2}{2}$. Therefore
$[a_0;a_1,\cdots,a_k]$를 단순연분수라 하자. $[a_0;a_1,\cdots,a_k] = \frac{p_k}{q_k}$가 되도록 하는 $p_k, q_k$ ($0 \le k \le n$)의 점화식을 제시하고 증명하라.
역주. 원문 진술은 "Given recursive relations for $p_k$ and $q_k$ $(0 \le k \le n)$ such that $[a_0;a_1,\cdots,a_k] = \frac{p_k}{q_k}$."에서 문장이 끝나 서술어가 빠져 있다. 뜻은 그러한 점화식을 제시하고 그것이 실제로 근사분수를 준다는 것을 보이라는 것이므로 위와 같이 옮겼다.
점화식. 편의상 $p_{-2} = 0, q_{-2} = 1, p_{-1} = 1, q_{-1} = 0$으로 정의하고, $0 \le k \le n$에 대하여
로 정의한다. 이제 이렇게 정의된 $p_k, q_k$가 $C_k := [a_0;a_1,\cdots,a_k] = \frac{p_k}{q_k}$ $(0 \le k \le n)$을 만족함을 $k$에 대한 귀납법으로 증명한다.
$k = 0, 1, 2$. 직접 계산하면 $p_0 = a_0 \cdot 1 + 0 = a_0$, $q_0 = a_0 \cdot 0 + 1 = 1$이므로 $C_0 = [a_0] = a_0 = \frac{p_0}{q_0}$이다. $p_1 = a_1a_0 + 1$, $q_1 = a_1$이므로 $C_1 = [a_0;a_1] = a_0 + \frac{1}{a_1} = \frac{a_1a_0+1}{a_1} = \frac{p_1}{q_1}$이다. $p_2 = a_2p_1 + p_0 = a_2(a_1a_0+1) + a_0$, $q_2 = a_2q_1 + q_0 = a_2a_1 + 1$이므로
이다. 따라서 $k = 0, 1, 2$일 때 성립한다.
귀납 단계. 위 $k = 1, 2$의 계산은 마지막 항이 정수라는 사실을 전혀 쓰지 않았으므로, 마지막 항을 임의의 실수 $t \gt 0$으로 바꾸어도 그대로 성립한다. 실제로 $[a_0;t] = a_0 + \frac1t = \frac{ta_0+1}{t} = \frac{tp_0+p_{-1}}{tq_0+q_{-1}}$이고 $[a_0;a_1,t] = a_0 + \cfrac{1}{a_1+\frac1t} = \frac{t(a_1a_0+1)+a_0}{ta_1+1} = \frac{tp_1+p_0}{tq_1+q_0}$이다. 그래서 귀납 가정도 마지막 항을 실수로 둔 다음의 강한 꼴로 세운다: $2 \le m \lt n$인 $m$에 대하여, 임의의 실수 $t \gt 0$에서 $[a_0;a_1,\cdots,a_{m-1},t] = \frac{tp_{m-1}+p_{m-2}}{tq_{m-1}+q_{m-2}}$ $(\ast_m)$이 성립한다고 가정하자($t = a_m$으로 두면 $C_m = \frac{p_m}{q_m}$이다). 임의의 실수 $t \gt 0$에 대하여 $[a_0;\cdots,a_m,t] = \left[a_0;\cdots,a_{m-1},a_m + \frac{1}{t}\right]$이고 $a_m + \frac1t \gt 0$이므로, $(\ast_m)$을 $a_m + \frac1t$에 적용하면
이 되어 $(\ast_{m+1})$이 성립한다. 특히 $t = a_{m+1}$로 두면 $C_{m+1} = [a_0;\cdots,a_m,a_{m+1}] = \frac{a_{m+1}p_m + p_{m-1}}{a_{m+1}q_m + q_{m-1}} = \frac{p_{m+1}}{q_{m+1}}$이므로 $k = m+1$일 때도 성립한다. 그러므로 모든 $0 \le k \le n$에 대하여 $[a_0;a_1,\cdots,a_k] = \frac{p_k}{q_k}$이다.
Let $[a_0; a_1, \cdots, a_k]$ be a simple continued fraction. Given recursive relations for $p_k$ and $q_k$ $(0 \le k \le n)$ such that
Recursion. For convenience define $p_{-2} = 0, q_{-2} = 1, p_{-1} = 1, q_{-1} = 0$, and for $0 \le k \le n$ set
We prove by induction on $k$ that $p_k, q_k$ defined this way satisfy $C_k := [a_0;a_1,\cdots,a_k] = \frac{p_k}{q_k}$ $(0 \le k \le n)$.
$k = 0, 1, 2$. A direct computation gives $p_0 = a_0 \cdot 1 + 0 = a_0$, $q_0 = a_0 \cdot 0 + 1 = 1$, so $C_0 = [a_0] = a_0 = \frac{p_0}{q_0}$. Also $p_1 = a_1a_0 + 1$, $q_1 = a_1$, so $C_1 = [a_0;a_1] = a_0 + \frac{1}{a_1} = \frac{a_1a_0+1}{a_1} = \frac{p_1}{q_1}$. And $p_2 = a_2p_1 + p_0 = a_2(a_1a_0+1) + a_0$, $q_2 = a_2q_1 + q_0 = a_2a_1 + 1$, so
Hence the statement holds for $k = 0, 1, 2$.
Inductive step. The computations for $k = 1, 2$ above never used that the last entry is an integer, so they stay valid with that entry replaced by an arbitrary real $t \gt 0$: indeed $[a_0;t] = a_0 + \frac1t = \frac{ta_0+1}{t} = \frac{tp_0+p_{-1}}{tq_0+q_{-1}}$ and $[a_0;a_1,t] = a_0 + \cfrac{1}{a_1+\frac1t} = \frac{t(a_1a_0+1)+a_0}{ta_1+1} = \frac{tp_1+p_0}{tq_1+q_0}$. We therefore take the induction hypothesis in the stronger form with a real last entry: for some $2 \le m \lt n$ assume that, for every real $t \gt 0$, $[a_0;a_1,\cdots,a_{m-1},t] = \frac{tp_{m-1}+p_{m-2}}{tq_{m-1}+q_{m-2}}$ $(\ast_m)$ (taking $t = a_m$ gives $C_m = \frac{p_m}{q_m}$). For every real $t \gt 0$ we have $[a_0;\cdots,a_m,t] = \left[a_0;\cdots,a_{m-1},a_m + \frac{1}{t}\right]$ with $a_m + \frac1t \gt 0$, so applying $(\ast_m)$ at $a_m + \frac1t$ gives
which is $(\ast_{m+1})$. In particular, taking $t = a_{m+1}$ gives $C_{m+1} = [a_0;\cdots,a_m,a_{m+1}] = \frac{a_{m+1}p_m + p_{m-1}}{a_{m+1}q_m + q_{m-1}} = \frac{p_{m+1}}{q_{m+1}}$, so the statement also holds for $k = m+1$. Therefore $[a_0;a_1,\cdots,a_k] = \frac{p_k}{q_k}$ for all $0 \le k \le n$.
다음 값을 구하라.
1. $[\overline{2; 3}]$.
2. $[2; \overline{1, 2, 1}]$.
1. $x = [\overline{2;3}] = [2;3,2,3,\cdots]$라 하면 $x = 2 + \cfrac{1}{3 + \cfrac{1}{x}}$이다. $u = 3 + \frac{1}{x} = \frac{3x+1}{x}$라 하면 $x = 2 + \frac{1}{u}$에서 $u = \frac{1}{x-2}$이므로
이다. 근의 공식에 의해
이다. $x = [2;3,2,3,\cdots] \gt 2 \gt 0$이므로 음의 근 $\frac{3-\sqrt{15}}{3} (\approx -0.29)$은 버리고 양의 근을 취하면
이다.
2. $x = [2; \overline{1,2,1}] = [2;1,2,1,1,2,1,\cdots]$이라 하자. $y = [\overline{1;2,1}] = [1;2,1,\overline{1,2,1}] = [1;2,1,y]$로 두면 $x = 2 + \frac{1}{y}$이다. $y = [1;2,1,y]$를 안에서부터 계산하면
이므로 $y(3y+2) = 4y+3$, 즉 $3y^2 - 2y - 3 = 0$이다. 근의 공식에 의해
이고, $y = [1;2,1,\cdots] \gt 1 \gt 0$이므로 양의 근 $y = \frac{1+\sqrt{10}}{3} \ (\approx 1.38743)$을 취한다. 따라서
이다.
Evaluate the following
1. $[\overline{2; 3}]$.
2. $[2; \overline{1, 2, 1}]$.
1. Let $x = [\overline{2;3}] = [2;3,2,3,\cdots]$, so $x = 2 + \cfrac{1}{3 + \cfrac{1}{x}}$. Let $u = 3 + \frac{1}{x} = \frac{3x+1}{x}$; since $x = 2 + \frac{1}{u}$ gives $u = \frac{1}{x-2}$,
By the quadratic formula,
Since $x = [2;3,2,3,\cdots] \gt 2 \gt 0$, we discard the negative root $\frac{3-\sqrt{15}}{3} (\approx -0.29)$ and take the positive one,
2. Let $x = [2; \overline{1,2,1}] = [2;1,2,1,1,2,1,\cdots]$. Setting $y = [\overline{1;2,1}] = [1;2,1,\overline{1,2,1}] = [1;2,1,y]$ gives $x = 2 + \frac{1}{y}$. Unwinding $y = [1;2,1,y]$ from the inside,
so $y(3y+2) = 4y+3$, i.e. $3y^2 - 2y - 3 = 0$. By the quadratic formula,
and since $y = [1;2,1,\cdots] \gt 1 \gt 0$, we take the positive root $y = \frac{1+\sqrt{10}}{3} \ (\approx 1.38743)$. Therefore
$\forall n \in \mathbb{Z}_{>0}$에 대하여 다음을 증명하라.
1. $\sqrt{n^2+1} = [n; \overline{2n}]$.
2. $\sqrt{n^2+2} = [n; \overline{n, 2n}]$.
3. $\sqrt{n^2+2n} = [n; \overline{1, 2n}]$.
세 경우 모두 단순연분수의 계산 알고리즘을 그대로 실행한다. 알고리즘의 기호를 따라 $x_0 = x$, $a_m = [x_m]$, $\xi_m = x_m - a_m$, $x_{m+1} = \frac{1}{\xi_m}$으로 둔다.
준비. $n \in \mathbb{Z}_{\gt 0}$이면
이다 ($n \ge 1$에서 $2 \le 2n$). 따라서 $n^2+1,\ n^2+2,\ n^2+2n$은 연속한 두 제곱수 $n^2$과 $(n+1)^2$ 사이에 놓이므로 완전제곱수가 아니고, 그 제곱근은 모두 무리수이다. 그러므로 어느 단계에서도 $\xi_m = 0$이 되지 않아 알고리즘은 끝나지 않고 무한 단순연분수를 만들어낸다. 또한 위 부등식에서 세 경우 모두
이므로 언제나 $a_0 = n$이다.
1. $x_0 = \sqrt{n^2+1}$, $a_0 = n$이므로 $\xi_0 = \sqrt{n^2+1} - n$이고
이다. $n \lt \sqrt{n^2+1} \lt n+1$에 $n$을 더하면 $2n \lt x_1 \lt 2n+1$이므로 $a_1 = 2n$이다. 그러면
이다. 즉 알고리즘은 $x_1$과 같은 상태로 되돌아오므로, 귀납적으로 모든 $m \ge 1$에 대하여 $x_m = x_1$이고 $a_m = 2n$이다. 따라서
이다.
2. $x_0 = \sqrt{n^2+2}$, $a_0 = n$이므로
이다. $\sqrt{n^2+2} \gt n$에서 $x_1 \gt \frac{n+n}{2} = n$이고, $n^2+2 \lt n^2+4n+4 = (n+2)^2$에서 $\sqrt{n^2+2} \lt n+2$이므로 $x_1 \lt \frac{(n+2)+n}{2} = n+1$이다. 즉 $n \lt x_1 \lt n+1$이므로 $a_1 = n$이고
이다. $n \lt \sqrt{n^2+2} \lt n+1$이므로 $2n \lt x_2 \lt 2n+1$, 즉 $a_2 = 2n$이고
이다. 따라서 $x_{m+2} = x_m$ $(m \ge 1)$이 되어 부분몫은 $n, 2n$을 되풀이한다. 그러므로
이다.
3. $x_0 = \sqrt{n^2+2n}$, $a_0 = n$이므로
이다. $\sqrt{n^2+2n} \gt n$에서 $x_1 \gt \frac{n+n}{2n} = 1$이고, $n \ge 1$이면 $n^2+2n \lt 9n^2$ (즉 $2n \lt 8n^2$, 즉 $1 \lt 4n$)이므로 $\sqrt{n^2+2n} \lt 3n$이고 따라서 $x_1 \lt \frac{3n+n}{2n} = 2$이다. 즉 $1 \lt x_1 \lt 2$이므로 $a_1 = 1$이고
이다. $n \lt \sqrt{n^2+2n} \lt n+1$이므로 $2n \lt x_2 \lt 2n+1$, 즉 $a_2 = 2n$이고
이다. 따라서 부분몫은 $1, 2n$을 되풀이하므로
이다.
세 경우 모두 알고리즘이 만들어내는 부분몫의 열이 곧 그 수의 단순연분수 전개이고, 세 수가 모두 무리수이므로 p.28의 서술에 의해 $x = \lim_{n \to \infty}[a_0;a_1,\cdots,a_n]$이 성립한다. 그러므로 위에서 얻은 순환연분수가 바로 구하는 전개이다. (정리 3.20의 유일성은 유한 단순연분수에 대한 것이므로 여기에는 그대로 쓸 수 없다.)
검산. $n = 1$이면 1에서 $\sqrt2 = [1;\overline2]$ (예제 3.32와 일치), $n = 2$이면 2에서 $\sqrt6 = [2;\overline{2,4}]$, $n = 3$이면 3에서 $\sqrt{15} = [3;\overline{1,6}]$이다.
Prove that $\forall n \in \mathbb{Z}_{>0}$
1. $\sqrt{n^2+1} = [n; \overline{2n}]$.
2. $\sqrt{n^2+2} = [n; \overline{n, 2n}]$.
3. $\sqrt{n^2+2n} = [n; \overline{1, 2n}]$.
In all three cases we simply run the algorithm for computing a simple continued fraction. Following its notation, put $x_0 = x$, $a_m = [x_m]$, $\xi_m = x_m - a_m$, $x_{m+1} = \frac{1}{\xi_m}$.
Preliminaries. For $n \in \mathbb{Z}_{\gt 0}$,
(here $2 \le 2n$ because $n \ge 1$). Hence $n^2+1,\ n^2+2,\ n^2+2n$ all lie strictly between the consecutive squares $n^2$ and $(n+1)^2$, so none of them is a perfect square and all three square roots are irrational. Consequently $\xi_m = 0$ never occurs, so the algorithm never terminates and produces an infinite simple continued fraction. The same inequalities give, in all three cases,
so that $a_0 = n$ every time.
1. With $x_0 = \sqrt{n^2+1}$ and $a_0 = n$ we get $\xi_0 = \sqrt{n^2+1} - n$ and
Adding $n$ to $n \lt \sqrt{n^2+1} \lt n+1$ gives $2n \lt x_1 \lt 2n+1$, so $a_1 = 2n$. Then
The algorithm returns to the state $x_1$, so by induction $x_m = x_1$ and $a_m = 2n$ for every $m \ge 1$. Therefore
2. With $x_0 = \sqrt{n^2+2}$ and $a_0 = n$,
From $\sqrt{n^2+2} \gt n$ we get $x_1 \gt \frac{n+n}{2} = n$, and from $n^2+2 \lt n^2+4n+4 = (n+2)^2$ we get $\sqrt{n^2+2} \lt n+2$, hence $x_1 \lt \frac{(n+2)+n}{2} = n+1$. So $n \lt x_1 \lt n+1$, i.e. $a_1 = n$, and
Since $n \lt \sqrt{n^2+2} \lt n+1$ we have $2n \lt x_2 \lt 2n+1$, i.e. $a_2 = 2n$, and
Thus $x_{m+2} = x_m$ for $m \ge 1$ and the partial quotients repeat $n, 2n$. Therefore
3. With $x_0 = \sqrt{n^2+2n}$ and $a_0 = n$,
From $\sqrt{n^2+2n} \gt n$ we get $x_1 \gt \frac{n+n}{2n} = 1$; and for $n \ge 1$ we have $n^2+2n \lt 9n^2$ (i.e. $2n \lt 8n^2$, i.e. $1 \lt 4n$), so $\sqrt{n^2+2n} \lt 3n$ and $x_1 \lt \frac{3n+n}{2n} = 2$. So $1 \lt x_1 \lt 2$, i.e. $a_1 = 1$, and
Since $n \lt \sqrt{n^2+2n} \lt n+1$ we have $2n \lt x_2 \lt 2n+1$, i.e. $a_2 = 2n$, and
So the partial quotients repeat $1, 2n$, and therefore
In each case the sequence of partial quotients produced by the algorithm is the simple continued fraction expansion of the number, and since all three numbers are irrational, the passage on p.28 gives $x = \lim_{n \to \infty}[a_0;a_1,\cdots,a_n]$. Hence the periodic continued fractions obtained above are exactly the required expansions. (Theorem 3.20 states uniqueness for finite simple continued fractions, so it does not apply directly here.)
Check. For $n = 1$, part 1 gives $\sqrt2 = [1;\overline2]$ (agreeing with Example 3.32); for $n = 2$, part 2 gives $\sqrt6 = [2;\overline{2,4}]$; for $n = 3$, part 3 gives $\sqrt{15} = [3;\overline{1,6}]$.
그러면 다음과 같은 질문이 생긴다. 주어진 수에 대한 최선의 근사란 무엇인가? 최선의 근사를 정의할 필요가 있다.
Then we have a question, what is the best approximation to a given number? We need to define the best approximation.
실수 $x$에 대한 유리수 $\frac{p}{q}$가 최선의 근사라는 것은, $|r\text{의 분모}| \le |q|$인 모든 유리수 $r$에 대하여 $\left|x - \frac{p}{q}\right| \le |x - r|$이 성립함을 뜻한다.
A rational number $\frac{p}{q}$ is the best approximation to a real number $x$ if $\left|x - \frac{p}{q}\right| \le |x - r|$ for every rational number $r$ such that $|\text{denominator } r| \le |q|$.
$x = [a_0; a_1, \cdots]$가 단순연분수라 하자. 그러면 $n \ge 3$일 때 $q_n \ge n$이다 ($x = [a_0;a_1,\cdots,a_m]$이 유한이면 $n \le m$인 $n$에 대하여).
역주. 원문 "Then $q_n \ge n$ when $n \ge 3$ if $x = [a_0;\cdots,a_m]$, then $n \le m$"은 문장이 꼬여 있어, 뜻을 정리하여 옮겼다.
$q_0 = 1$, $q_1 = a_1$임을 안다. $n \ge 2$일 때 다음이 성립한다.
역주. 원문은 "$q_n = a_n q_{-1} + q_{n-2} \ge a_n q_{n-1} + 1 \le q_{n-1} + 1$"로 적었으나 첨자 $q_{-1}$은 $q_{n-1}$의 오타이고 $\ge \cdots \le$ 사슬도 정합하지 않는다. 위에서 바로잡아 옮겼다.
따라서 $q_2 \ge q_1 + 1 = 2$이다. $k = m$일 때 $q_m \ge m$이라고 가정하자. 그러면 $q_{m+1} \ge q_m + 1 \ge m + 1$이다. 따라서 $k = m + 1$일 때도 이 부등식이 성립한다. 그러므로 모든 정수 $n$에 대하여 $q_n \ge n$이다.
Assume that $x = [a_0; a_1, \cdots]$ a simple continued fraction. Then $q_n \ge n$ when $n \ge 3$ if $x = [a_0; a_1, \cdots, a_m]$, then $n \le m$.
We know that $q_0 = 1$, $q_1 = a_1$. For $n \ge 2$, we know that
Therefore $q_2 \ge q_1 + 1 = 2$. Assume that for $k = m$, $q_m \ge m$. Then $q_{m+1} \ge q_m + 1 \ge m + 1$. So the inequality is also true for $k = m + 1$. Therefore $q_n \ge n$ for all integer $n$.
유한 단순연분수 $[a_0; a_1, \cdots, a_n]$은 다음과 같다.
역주. 원문은 마지막 항을 $(-1)^n \frac{1}{q_nq_{n-1}}$로 인쇄했으나, 앞의 두 항이 $+\frac{1}{q_1q_0}$, $-\frac{1}{q_2q_1}$이므로 $i$번째 항의 부호는 $(-1)^{i-1}$이고 마지막 항은 $(-1)^{n-1}\frac{1}{q_nq_{n-1}}$이어야 한다(아래 증명이 얻는 합 $\sum_{i=1}^{n}(-1)^{i-1}\frac{1}{q_iq_{i-1}}$과도 일치한다). 예를 들어 $[1;2,3] = \frac{10}{7}$이고 $q_0=1, q_1=2, q_2=7$이므로 $1 + \frac{1}{q_1q_0} - \frac{1}{q_2q_1} = 1 + \frac12 - \frac1{14} = \frac{10}{7}$인데, 인쇄된 부호 $(-1)^2$로 읽으면 $1 + \frac12 + \frac1{14} = \frac{11}{7}$이 되어 맞지 않는다. 위에서 바로잡아 옮겼다.
모든 정수 $m$에 대하여 $p_m q_{m-1} - q_m p_{m-1} = (-1)^{m-1}$임에 유의하자. 그러면
역주. 원문 다섯째 줄은 "$\frac{p_{n-2}}{q_{n-1}}$"로 적었으나 $q_{n-2}$의 오타이다. 또 마지막 두 줄의 합은 원문이 $\Sigma_{i=1}^m$으로 적었으나 여기서 계산하는 것은 $C_n$이므로 첨자는 $\sum_{i=1}^{n}$이어야 한다. 위에서 둘 다 바로잡아 옮겼다.
A finite simple continued fraction $[a_0; a_1, \cdots, a_n]$ is equal to
Note that $p_m q_{m-1} - q_m p_{m-1} = (-1)^{m-1}$ for all integer $m$. Then
정수 $m$에 대한 근사분수 $\frac{p_m}{q_m}$을 갖는 임의의 실수 $x$에 대하여,
역주. 원문에는 증명이 비어 있어 아래 증명은 직접 작성한 것이다.
역주(진술의 범위). 부등식이 뜻을 가지려면 $q_{m+1}$이 존재해야 하고, 부등호가 엄격하려면 $x$의 전개가 $m+1$번째 항에서 끝나지 않아야 한다. 즉 $x$가 무리수이면 모든 $m \ge 0$에 대하여 성립하고, $x = [a_0;a_1,\cdots,a_n]$이 유리수이면 $m+1 \lt n$인 $m$에 대하여 성립한다. $m = n-1$일 때는 정리 3.9에 의해 등호
가 성립하고, $m = n$일 때는 $q_{n+1}$이 정의되지 않는다. 아래 증명은 이 범위, 곧 $x_{m+1} \gt a_{m+1}$인 경우의 증명이다.
1단계 : 마지막 항이 실수인 경우의 정리 3.8. 부분몫 $a_0, a_1, \cdots$로부터 점화식
로 $p_k, q_k$를 만들자. 그러면 임의의 실수 $t \gt 0$과 임의의 $m \ge 0$에 대하여
이 성립한다. 이는 정리 3.8의 증명이 마지막 항의 정수성을 전혀 사용하지 않기 때문이며, $m$에 대한 귀납법으로 다시 확인해 두자. $m = 0$이면 $p_0 = a_0$, $q_0 = 1$, $p_{-1} = 1$, $q_{-1} = 0$이므로
이다. 이제 $m-1$에 대하여 모든 실수 $t \gt 0$에서 $(\ast)$가 성립한다고 가정하자. $[a_0;\cdots,a_m,t] = \left[a_0;\cdots,a_{m-1},a_m+\frac1t\right]$이고 $a_m + \frac1t \gt 0$이므로, 귀납 가정을 $t' = a_m + \frac1t$에 적용하면
이므로 $(\ast)$가 $m$에서도 성립한다.
2단계 : 오차의 정확한 표현. 알고리즘의 기호를 따라 $x_0 = x$, $a_k = [x_k]$, $\xi_k = x_k - a_k$, $x_{k+1} = \frac{1}{\xi_k}$로 두자. $0 \lt \xi_k \lt 1$이므로 $x_{k+1} \gt 1$이고, 정의에서 $x_k = a_k + \frac{1}{x_{k+1}}$이다. 이를 $k = 0, 1, \cdots, m$에 차례로 대입하면 완전몫 $x_{m+1} = [a_{m+1}; a_{m+2}, \cdots]$에 대하여
이다. 여기에 $(\ast)$를 $t = x_{m+1} \gt 1$로 적용하면
이고, 정리 3.9의 $p_mq_{m-1} - q_mp_{m-1} = (-1)^{m-1}$을 쓰면
을 얻는다.
3단계 : 분모의 평가. $x_{m+1} = a_{m+1} + \frac{1}{x_{m+2}}$이고 $x_{m+2} \gt 1$이므로 $x_{m+1} \gt a_{m+1}$이다. 또 $q_m \gt 0$, $q_{m-1} \ge 0$이므로
이다. 따라서 2단계의 식에 절댓값을 취하면
이다.
덧붙여, $x = [a_0;a_1,\cdots,a_n]$이 유리수이고 $m = n-1$이면 $x_n = a_n$이어서 3단계의 부등호가 등호가 되고, 위 역주에서 본 등식 $\left|x - \frac{p_{n-1}}{q_{n-1}}\right| = \frac{1}{q_nq_{n-1}}$과 일치한다.
For any real number $x$ with convergents $\frac{p_m}{q_m}$ for integer $m$,
Note. The notes leave this proof blank; the proof below is ours.
Note (scope of the statement). For the inequality to make sense $q_{m+1}$ must exist, and for the inequality to be strict the expansion of $x$ must not stop at the $(m+1)$st entry. That is: if $x$ is irrational the statement holds for every $m \ge 0$, and if $x = [a_0; a_1, \cdots, a_n]$ is rational it holds for every $m$ with $m+1 \lt n$. For $m = n-1$ Theorem 3.9 gives the equality
and for $m = n$ the number $q_{n+1}$ is not defined. The proof below is the proof in that range, i.e. when $x_{m+1} \gt a_{m+1}$.
Step 1 : Theorem 3.8 with a real last entry. From the partial quotients $a_0, a_1, \cdots$ build $p_k, q_k$ by the recursion
Then for every real $t \gt 0$ and every $m \ge 0$,
This holds because the proof of Theorem 3.8 never uses that the last entry is an integer; let us reconfirm it by induction on $m$. For $m = 0$ we have $p_0 = a_0$, $q_0 = 1$, $p_{-1} = 1$, $q_{-1} = 0$, so
Now assume $(\ast)$ holds for $m-1$ and every real $t \gt 0$. Since $[a_0;\cdots,a_m,t] = \left[a_0;\cdots,a_{m-1},a_m+\frac1t\right]$ and $a_m + \frac1t \gt 0$, applying the induction hypothesis with $t' = a_m + \frac1t$ gives
so $(\ast)$ also holds for $m$.
Step 2 : an exact formula for the error. Following the notation of the algorithm, put $x_0 = x$, $a_k = [x_k]$, $\xi_k = x_k - a_k$, $x_{k+1} = \frac{1}{\xi_k}$. Since $0 \lt \xi_k \lt 1$ we have $x_{k+1} \gt 1$, and by definition $x_k = a_k + \frac{1}{x_{k+1}}$. Substituting this for $k = 0, 1, \cdots, m$ in turn gives, with the complete quotient $x_{m+1} = [a_{m+1}; a_{m+2}, \cdots]$,
Applying $(\ast)$ with $t = x_{m+1} \gt 1$,
and using $p_mq_{m-1} - q_mp_{m-1} = (-1)^{m-1}$ from Theorem 3.9,
Step 3 : estimating the denominator. Since $x_{m+1} = a_{m+1} + \frac{1}{x_{m+2}}$ with $x_{m+2} \gt 1$, we have $x_{m+1} \gt a_{m+1}$. Also $q_m \gt 0$ and $q_{m-1} \ge 0$, so
Taking absolute values in the formula of Step 2 therefore gives
Finally, if $x = [a_0; a_1, \cdots, a_n]$ is rational and $m = n-1$, then $x_n = a_n$, the inequality of Step 3 becomes an equality, and we recover the identity $\left|x - \frac{p_{n-1}}{q_{n-1}}\right| = \frac{1}{q_nq_{n-1}}$ noted above.
$x$를 실수라 하고 단순연분수를 $x = [a_0; a_1, \cdots, a_n]$이라 하자($n$은 $\infty$일 수 있다). $m \lt n$이고 $1 \le b \le q_m$ ($b \in \mathbb{Z}$)이면, 모든 유리수 $\frac{a}{b}$ $(a \in \mathbb{Z})$는 다음을 만족한다.
다시 말해 $\frac{p_m}{q_m}$은 $x$의 최선의 근사이다.
Let $x$ be a real number and simple continued fraction $x = [a_0; a_1, \cdots, a_n]$ ($n$ can be $\infty$). For $m \lt n$ and $1 \le b \le q_m(b \in \mathbb{Z})$, every rational number $\frac{a}{b}$ $(a \in \mathbb{Z})$ satisfies
in other words $\frac{p_m}{q_m}$ is the best approximation of $x$.
$\sqrt2$의 단순연분수를 계산하기 위해, 먼저 $1 \lt \sqrt2 \lt 2$임에 주목하자. 따라서 $a_0 = 1$이다. 그러면
따라서 모든 정수 $n$에 대하여 $a_n = 2$이다. 따라서 $\sqrt2 = [1; \overline{2}]$이다. 다음 표는 모든 $n \ge 0$에 대한 $p_n, q_n$의 값이다. 따라서 $\frac{41}{29}$는 $\sqrt2$의 최선의 근사이다.
| $n$ | $0$ | $1$ | $2$ | $3$ | $4$ | $\cdots$ |
|---|---|---|---|---|---|---|
| $p_n$ | $1$ | $1\cdot2+1 = 3$ | $3\cdot2+1 = 7$ | $17$ | $41$ | $\cdots$ |
| $q_n$ | $1$ | $2$ | $5$ | $12$ | $29$ | $\cdots$ |
To calculate the simple continued fraction of $\sqrt2$, first note that $1 \lt \sqrt2 \lt 2$. So $a_0 = 1$. Then
Therefore $a_n = 2$ for all integer $n$. Therefore $\sqrt2 = [1; \overline{2}]$. The following table is value of $p_n, q_n$ for all $n \ge 0$. Therefore $\frac{41}{29}$ is an best approximation of $\sqrt2$.
| $n$ | $0$ | $1$ | $2$ | $3$ | $4$ | $\cdots$ |
|---|---|---|---|---|---|---|
| $p_n$ | $1$ | $1\cdot2+1 = 3$ | $3\cdot2+1 = 7$ | $17$ | $41$ | $\cdots$ |
| $q_n$ | $1$ | $2$ | $5$ | $12$ | $29$ | $\cdots$ |
$x = [1; 3, 1, 5, 1, 7, 1, \cdots]$라 하자. 다음을 만족하는 최선의 유리근사 $\frac{a}{b}$를 구하라.
1. 분모 $b \le 23$.
2. (*) 분모 $b \le 239$.
주어진 무한 단순연분수의 부분몫은 $a_0 = 1$이고, $j \ge 1$에 대하여 $a_{2j-1} = 2j+1$, $a_{2j} = 1$이다. 즉
이다. 점화식 $p_k = a_kp_{k-1}+p_{k-2}$, $q_k = a_kq_{k-1}+q_{k-2}$ ($p_{-1}=1, q_{-1}=0, p_{-2}=0, q_{-2}=1$)로 근사분수를 계산하면 다음과 같다.
| $k$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $7$ | $\cdots$ |
|---|---|---|---|---|---|---|---|---|---|
| $a_k$ | $1$ | $3$ | $1$ | $5$ | $1$ | $7$ | $1$ | $9$ | $\cdots$ |
| $p_k$ | $1$ | $4$ | $5$ | $29$ | $34$ | $267$ | $301$ | $2976$ | $\cdots$ |
| $q_k$ | $1$ | $3$ | $4$ | $23$ | $27$ | $212$ | $239$ | $2363$ | $\cdots$ |
예를 들어 $p_3 = 5\cdot5 + 4 = 29$, $q_3 = 5\cdot4+3 = 23$이고, $p_6 = 1\cdot267 + 34 = 301$, $q_6 = 1\cdot212+27 = 239$이다.
정리 3.31의 사용법. $x = [a_0;a_1,\cdots,a_n]$에서 여기서는 $n = \infty$이므로 모든 $m$이 $m \lt n$을 만족한다. 정리 3.31에 의하여, $1 \le b \le q_m$인 모든 정수 $b$와 모든 정수 $a$에 대하여
이다. 즉 분모가 $q_m$ 이하인 어떤 유리수도 근사분수 $\frac{p_m}{q_m}$보다 $x$에 더 가까울 수 없다. 그러므로 주어진 분모의 상한이 어떤 $q_m$과 정확히 같으면 그 $\frac{p_m}{q_m}$이 곧 구하는 최선의 근사이다.
1. 위 표에서 $q_3 = 23$이다. 정리 3.31을 $m = 3$에 적용하면, $1 \le b \le 23$인 모든 유리수 $\frac ab$에 대하여 $\left|x - \frac{29}{23}\right| \le \left|x - \frac ab\right|$이다. 따라서 구하는 최선의 근사는
이다. (참고로 $q_4 = 27 \gt 23$이므로 분모가 $23$ 이하인 근사분수 가운데 $\frac{29}{23}$이 마지막이다. 또 정리 3.30에 의하여 $\left|x - \frac{29}{23}\right| \lt \frac{1}{q_3q_4} = \frac{1}{621}$이다.)
2. 위 표에서 $q_6 = 239$이다. 정리 3.31을 $m = 6$에 적용하면, $1 \le b \le 239$인 모든 유리수 $\frac ab$에 대하여 $\left|x - \frac{301}{239}\right| \le \left|x - \frac ab\right|$이다. 따라서 구하는 최선의 근사는
이다. (역시 $q_7 = 2363 \gt 239$이므로 분모가 $239$ 이하인 근사분수 가운데 $\frac{301}{239}$이 마지막이고, 정리 3.30에 의하여 $\left|x - \frac{301}{239}\right| \lt \frac{1}{q_6q_7} = \frac{1}{564757}$이다.)
검산. $x = 1.2594158\cdots$이고 $\frac{29}{23} = 1.2608695\cdots$, $\frac{301}{239} = 1.2594142\cdots$이므로 오차는 각각 약 $1.45 \times 10^{-3}$, $1.62 \times 10^{-6}$이다.
Let $x = [1; 3, 1, 5, 1, 7, 1, \cdots]$. Find the best rational approximation $\frac{a}{b}$ with
1. denominator $b \le 23$.
2. (*) denominator $b \le 239$.
The partial quotients of the given infinite simple continued fraction are $a_0 = 1$ and, for $j \ge 1$, $a_{2j-1} = 2j+1$, $a_{2j} = 1$; that is,
Computing the convergents by the recursion $p_k = a_kp_{k-1}+p_{k-2}$, $q_k = a_kq_{k-1}+q_{k-2}$ (with $p_{-1}=1, q_{-1}=0, p_{-2}=0, q_{-2}=1$) gives:
| $k$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $7$ | $\cdots$ |
|---|---|---|---|---|---|---|---|---|---|
| $a_k$ | $1$ | $3$ | $1$ | $5$ | $1$ | $7$ | $1$ | $9$ | $\cdots$ |
| $p_k$ | $1$ | $4$ | $5$ | $29$ | $34$ | $267$ | $301$ | $2976$ | $\cdots$ |
| $q_k$ | $1$ | $3$ | $4$ | $23$ | $27$ | $212$ | $239$ | $2363$ | $\cdots$ |
For instance $p_3 = 5\cdot5 + 4 = 29$, $q_3 = 5\cdot4+3 = 23$, and $p_6 = 1\cdot267 + 34 = 301$, $q_6 = 1\cdot212+27 = 239$.
How Theorem 3.31 is used. Writing $x = [a_0;a_1,\cdots,a_n]$, here $n = \infty$, so every $m$ satisfies $m \lt n$. By Theorem 3.31, for every integer $b$ with $1 \le b \le q_m$ and every integer $a$,
that is, no rational number with denominator at most $q_m$ is closer to $x$ than the convergent $\frac{p_m}{q_m}$. Hence whenever the prescribed bound on the denominator is exactly some $q_m$, that convergent $\frac{p_m}{q_m}$ is the required best approximation.
1. The table gives $q_3 = 23$. Applying Theorem 3.31 with $m = 3$: for every rational $\frac ab$ with $1 \le b \le 23$ we have $\left|x - \frac{29}{23}\right| \le \left|x - \frac ab\right|$. So the best approximation is
(Note $q_4 = 27 \gt 23$, so $\frac{29}{23}$ is the last convergent whose denominator is at most $23$; and by Theorem 3.30, $\left|x - \frac{29}{23}\right| \lt \frac{1}{q_3q_4} = \frac{1}{621}$.)
2. The table gives $q_6 = 239$. Applying Theorem 3.31 with $m = 6$: for every rational $\frac ab$ with $1 \le b \le 239$ we have $\left|x - \frac{301}{239}\right| \le \left|x - \frac ab\right|$. So the best approximation is
(Again $q_7 = 2363 \gt 239$, so $\frac{301}{239}$ is the last convergent whose denominator is at most $239$, and by Theorem 3.30, $\left|x - \frac{301}{239}\right| \lt \frac{1}{q_6q_7} = \frac{1}{564757}$.)
Check. $x = 1.2594158\cdots$, while $\frac{29}{23} = 1.2608695\cdots$ and $\frac{301}{239} = 1.2594142\cdots$, so the errors are about $1.45 \times 10^{-3}$ and $1.62 \times 10^{-6}$ respectively.
1. 연분수를 이용하여 다음을 만족하는 유리수 $\frac{q}{p}$를 구하라.
(힌트 : 실수 $x$의 단순연분수의 $n$번째 근사분수를 $\frac{p_n}{q_n}$이라 하자. 그러면 $\left|x - \frac{p_m}{q_m}\right| \lt \frac{1}{q_{m+1} q_m}$이다.)
2. (*) $\sqrt{15}$의 $k$번째 근사분수들 가운데, 소수 넷째 자리까지의 정확도로 $\sqrt{15}$를 근사하는 유리수를 구하라.
역주. 원문 1의 진술은 근사분수를 $\frac{q}{p}$로 인쇄하였으나, 같은 문제의 힌트와 본문(정리 3.30)은 분자를 $p_n$, 분모를 $q_n$으로 쓴다. 아래에서는 본문의 관례에 맞추어 근사분수를 $\frac{p}{q}$(분자 $p$, 분모 $q$)로 적는다.
연분수 전개와 근사분수. $15 = 3^2 + 2\cdot3$이므로 연습문제 3.26의 3에 $n = 3$을 대입하면
이다. 점화식 $p_k = a_kp_{k-1}+p_{k-2}$, $q_k = a_kq_{k-1}+q_{k-2}$로 근사분수를 계산하면 다음과 같다.
| $k$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $\cdots$ |
|---|---|---|---|---|---|---|---|---|
| $a_k$ | $3$ | $1$ | $6$ | $1$ | $6$ | $1$ | $6$ | $\cdots$ |
| $p_k$ | $3$ | $4$ | $27$ | $31$ | $213$ | $244$ | $1677$ | $\cdots$ |
| $q_k$ | $1$ | $1$ | $7$ | $8$ | $55$ | $63$ | $433$ | $\cdots$ |
1. 힌트(정리 3.30)에 의하여 $\left|\sqrt{15} - \frac{p_m}{q_m}\right| \lt \frac{1}{q_mq_{m+1}}$이므로, $q_mq_{m+1} \ge 50^2 = 2500$이기만 하면 $\left|\sqrt{15} - \frac{p_m}{q_m}\right| \lt \frac{1}{2500}$이 성립한다. 표에서
이므로 $m = 4$에서 처음으로 조건이 만족된다. 따라서
이다. 검산. $\sqrt{15} = 3.8729833\cdots$, $\frac{213}{55} = 3.8727272\cdots$이므로 오차는 약 $2.56 \times 10^{-4}$이고, 이는 $\frac{1}{2500} = 4 \times 10^{-4}$보다 작다.
2. 소수 넷째 자리까지의 정확도로 근사한다는 것은 반올림한 소수 넷째 자리까지가 $\sqrt{15}$의 것과 같다는 뜻이므로, 오차가 $\frac{1}{2} \times 10^{-4} = 5 \times 10^{-5} = \frac{1}{20000}$보다 작으면 충분하다. 다시 정리 3.30을 쓰면 $q_mq_{m+1} \ge 20000$이면 되는데, 표에서
이므로 $m = 5$에서 처음으로 조건이 만족된다. 따라서 구하는 근사분수는
이다. 검산. $\sqrt{15} = 3.87298334\cdots$, $\frac{244}{63} = 3.87301587\cdots$이므로 오차는 약 $3.25 \times 10^{-5}$이고, 두 수를 소수 넷째 자리까지 반올림하면 모두 $3.8730$으로 일치한다.
역주. "소수 넷째 자리까지 일치"를 반올림 없이 소수점 아래 처음 네 자리 숫자가 그대로 같다는 뜻으로 읽으면, $\sqrt{15} = 3.8729\cdots$인데 $\frac{244}{63} = 3.8730\cdots$이므로 이 엄격한 뜻은 만족하지 않는다. 그 경우의 답은 다음 근사분수 $\frac{1677}{433} = 3.872979\cdots$ (오차 약 $4.13 \times 10^{-6}$)이다. 여기서는 반올림하여 읽는 통상의 해석을 따라 $\frac{244}{63}$을 답으로 삼는다.
1. By using the continued fraction, find a rational number $\frac{q}{p}$ such that
(Hint : Let $\frac{p_n}{q_n}$ be the nth convergent of the simple continued fraction of a real number $x$. Then $\left|x - \frac{p_m}{q_m}\right| \lt \frac{1}{q_{m+1} q_m}$)
2. (*) Among kth convergents of $\sqrt{15}$, find a rational number that approximates $\sqrt{15}$ accuracy to Four decimal places.
Note. Item 1 of the printed statement writes the fraction as $\frac{q}{p}$, while the hint and the text (Theorem 3.30) write a convergent with numerator $p_n$ and denominator $q_n$. Below we follow the convention of the text and write the approximation as $\frac{p}{q}$ (numerator $p$, denominator $q$).
The expansion and its convergents. Since $15 = 3^2 + 2\cdot3$, Exercise 3.26 part 3 with $n = 3$ gives
The recursion $p_k = a_kp_{k-1}+p_{k-2}$, $q_k = a_kq_{k-1}+q_{k-2}$ gives the convergents:
| $k$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $\cdots$ |
|---|---|---|---|---|---|---|---|---|
| $a_k$ | $3$ | $1$ | $6$ | $1$ | $6$ | $1$ | $6$ | $\cdots$ |
| $p_k$ | $3$ | $4$ | $27$ | $31$ | $213$ | $244$ | $1677$ | $\cdots$ |
| $q_k$ | $1$ | $1$ | $7$ | $8$ | $55$ | $63$ | $433$ | $\cdots$ |
1. By the hint (Theorem 3.30), $\left|\sqrt{15} - \frac{p_m}{q_m}\right| \lt \frac{1}{q_mq_{m+1}}$, so it suffices that $q_mq_{m+1} \ge 50^2 = 2500$ in order to get $\left|\sqrt{15} - \frac{p_m}{q_m}\right| \lt \frac{1}{2500}$. From the table,
so $m = 4$ is the first index that works. Therefore
Check. $\sqrt{15} = 3.8729833\cdots$ and $\frac{213}{55} = 3.8727272\cdots$, so the error is about $2.56 \times 10^{-4}$, less than $\frac{1}{2500} = 4 \times 10^{-4}$.
2. Approximating to four decimal places means that the value rounded to four decimals agrees with that of $\sqrt{15}$, for which an error smaller than $\frac{1}{2} \times 10^{-4} = 5 \times 10^{-5} = \frac{1}{20000}$ is enough. Using Theorem 3.30 again, it suffices that $q_mq_{m+1} \ge 20000$, and from the table
so $m = 5$ is the first index that works. Hence the required convergent is
Check. $\sqrt{15} = 3.87298334\cdots$ and $\frac{244}{63} = 3.87301587\cdots$, so the error is about $3.25 \times 10^{-5}$, and rounding both numbers to four decimals gives $3.8730$ in each case.
Note. If "agreeing to four decimal places" is read strictly as the first four decimal digits coinciding without rounding, then $\sqrt{15} = 3.8729\cdots$ while $\frac{244}{63} = 3.8730\cdots$, so $\frac{244}{63}$ would not qualify; under that reading the answer is the next convergent $\frac{1677}{433} = 3.872979\cdots$ (error about $4.13 \times 10^{-6}$). We take the usual reading with rounding and give $\frac{244}{63}$ as the answer.
다음을 증명하라.
그리고 $\frac{18}{13}$이 $\frac{1+\sqrt{10}}{3}$의 근사분수임을 증명하라.
$y = \frac{1+\sqrt{10}}{3}$으로 두자.
1. 부등식 $\left|y - \frac{18}{13}\right| \lt \frac{1}{2 \cdot 13^2}$. 먼저 통분하면
이다. $13\sqrt{10} = \sqrt{1690}$이고 $41 = \sqrt{1681}$이며 $1681 \lt 1690$이므로 $13\sqrt{10} \gt 41$, 즉 위 값은 양수이고 절댓값을 벗길 수 있다. 또 켤레를 곱하면
이다. $10 \gt 9$에서 $\sqrt{10} \gt 3$이므로 $13\sqrt{10} + 41 \gt 39 + 41 = 80$이고, 따라서
이다. 그러므로
이고, $3 \cdot 338 = 1014 \lt 1040$이므로 $\frac{3}{1040} \lt \frac{1}{338} = \frac{1}{2 \cdot 13^2}$이다. 두 부등식을 이으면
을 얻는다. (수치로는 $\left|y - \frac{18}{13}\right| = 0.0028105\cdots \lt \frac{3}{1040} = 0.0028846\cdots \lt \frac{1}{338} = 0.0029585\cdots$이다.)
2. $\frac{18}{13}$은 $y$의 근사분수이다. 단순연분수의 계산 알고리즘을 실행한다. 알고리즘의 기호대로 $x_0 = y$, $a_m = [x_m]$, $\xi_m = x_m - a_m$, $x_{m+1} = \frac{1}{\xi_m}$으로 둔다.
$9 \lt 10 \lt 16$에서 $3 \lt \sqrt{10} \lt 4$이므로 $\frac{4}{3} \lt y \lt \frac{5}{3}$, 특히 $1 \lt y \lt 2$이고 $a_0 = 1$이다. 그러면 $\xi_0 = y - 1 = \frac{\sqrt{10}-2}{3}$이므로
이다. $3 \lt \sqrt{10} \lt 4$에서 $\frac52 \lt x_1 \lt 3$, 특히 $2 \lt x_1 \lt 3$이므로 $a_1 = 2$이고 $\xi_1 = x_1 - 2 = \frac{\sqrt{10}-2}{2}$이므로
이다. 같은 부등식에서 $\frac53 \lt x_2 \lt 2$, 특히 $1 \lt x_2 \lt 2$이므로 $a_2 = 1$이고 $\xi_2 = x_2 - 1 = \frac{\sqrt{10}-1}{3}$이므로
이다. 즉 알고리즘은 세 단계 만에 처음 상태로 되돌아오므로 $x_{m+3} = x_m$ $(m \ge 0)$이고 부분몫은 $1, 2, 1$을 되풀이한다. 따라서
이다. (이는 연습문제 3.25의 2에서 얻은 $y = [1;2,1,y]$와 정확히 같은 결론이다. 또 $\sqrt{10}$은 무리수이므로 어느 단계에서도 $\xi_m = 0$이 되지 않아 전개는 무한하다.)
이제 점화식 $p_k = a_kp_{k-1}+p_{k-2}$, $q_k = a_kq_{k-1}+q_{k-2}$ ($p_{-1}=1, q_{-1}=0, p_{-2}=0, q_{-2}=1$)로 근사분수를 계산하자.
| $k$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $\cdots$ |
|---|---|---|---|---|---|---|---|---|
| $a_k$ | $1$ | $2$ | $1$ | $1$ | $2$ | $1$ | $1$ | $\cdots$ |
| $p_k$ | $1$ | $3$ | $4$ | $7$ | $18$ | $25$ | $43$ | $\cdots$ |
| $q_k$ | $1$ | $2$ | $3$ | $5$ | $13$ | $18$ | $31$ | $\cdots$ |
예를 들어 $p_4 = a_4p_3 + p_2 = 2 \cdot 7 + 4 = 18$, $q_4 = a_4q_3 + q_2 = 2 \cdot 5 + 3 = 13$이다. 즉
이므로 $\frac{18}{13}$은 $\frac{1+\sqrt{10}}{3}$의 (네 번째) 근사분수이다.
참고. 정리 3.30을 $m = 4$에 적용하면 $\left|y - \frac{18}{13}\right| \lt \frac{1}{q_4q_5} = \frac{1}{13 \cdot 18} = \frac{1}{234}$만 얻어지는데, 이는 $\frac{1}{2 \cdot 13^2} = \frac{1}{338}$보다 약한 부등식이다. 그래서 1에서는 위와 같이 직접 계산으로 더 정밀한 평가를 하였다.
Prove that
and prove that $\frac{18}{13}$ is a convergent to $\frac{1+\sqrt{10}}{3}$.
Write $y = \frac{1+\sqrt{10}}{3}$.
1. The inequality $\left|y - \frac{18}{13}\right| \lt \frac{1}{2 \cdot 13^2}$. Putting the difference over a common denominator,
Since $13\sqrt{10} = \sqrt{1690}$ and $41 = \sqrt{1681}$ with $1681 \lt 1690$, we get $13\sqrt{10} \gt 41$, so the quantity above is positive and the absolute value may be dropped. Multiplying by the conjugate,
From $10 \gt 9$ we get $\sqrt{10} \gt 3$, hence $13\sqrt{10} + 41 \gt 39 + 41 = 80$ and therefore
Consequently
and since $3 \cdot 338 = 1014 \lt 1040$ we have $\frac{3}{1040} \lt \frac{1}{338} = \frac{1}{2 \cdot 13^2}$. Chaining the two inequalities,
(Numerically $\left|y - \frac{18}{13}\right| = 0.0028105\cdots \lt \frac{3}{1040} = 0.0028846\cdots \lt \frac{1}{338} = 0.0029585\cdots$.)
2. $\frac{18}{13}$ is a convergent to $y$. Run the algorithm for computing a simple continued fraction. In its notation put $x_0 = y$, $a_m = [x_m]$, $\xi_m = x_m - a_m$, $x_{m+1} = \frac{1}{\xi_m}$.
From $9 \lt 10 \lt 16$ we get $3 \lt \sqrt{10} \lt 4$, so $\frac{4}{3} \lt y \lt \frac{5}{3}$; in particular $1 \lt y \lt 2$ and $a_0 = 1$. Then $\xi_0 = y - 1 = \frac{\sqrt{10}-2}{3}$, so
The same bounds give $\frac52 \lt x_1 \lt 3$, in particular $2 \lt x_1 \lt 3$, so $a_1 = 2$ and $\xi_1 = x_1 - 2 = \frac{\sqrt{10}-2}{2}$, whence
Again $\frac53 \lt x_2 \lt 2$, in particular $1 \lt x_2 \lt 2$, so $a_2 = 1$ and $\xi_2 = x_2 - 1 = \frac{\sqrt{10}-1}{3}$, whence
So after three steps the algorithm returns to its initial state: $x_{m+3} = x_m$ for all $m \ge 0$, and the partial quotients repeat $1, 2, 1$. Therefore
(This is exactly the conclusion $y = [1;2,1,y]$ found in Exercise 3.25 part 2. Also, $\sqrt{10}$ is irrational, so $\xi_m = 0$ never occurs and the expansion is infinite.)
Now compute the convergents by the recursion $p_k = a_kp_{k-1}+p_{k-2}$, $q_k = a_kq_{k-1}+q_{k-2}$ (with $p_{-1}=1, q_{-1}=0, p_{-2}=0, q_{-2}=1$).
| $k$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $\cdots$ |
|---|---|---|---|---|---|---|---|---|
| $a_k$ | $1$ | $2$ | $1$ | $1$ | $2$ | $1$ | $1$ | $\cdots$ |
| $p_k$ | $1$ | $3$ | $4$ | $7$ | $18$ | $25$ | $43$ | $\cdots$ |
| $q_k$ | $1$ | $2$ | $3$ | $5$ | $13$ | $18$ | $31$ | $\cdots$ |
For instance $p_4 = a_4p_3 + p_2 = 2 \cdot 7 + 4 = 18$ and $q_4 = a_4q_3 + q_2 = 2 \cdot 5 + 3 = 13$. Thus
so $\frac{18}{13}$ is the (fourth) convergent to $\frac{1+\sqrt{10}}{3}$.
Remark. Theorem 3.30 with $m = 4$ only yields $\left|y - \frac{18}{13}\right| \lt \frac{1}{q_4q_5} = \frac{1}{13 \cdot 18} = \frac{1}{234}$, which is weaker than $\frac{1}{2 \cdot 13^2} = \frac{1}{338}$. That is why part 1 was proved by the direct estimate above.