Fundamental solution to specific Pell equation

163 Views Asked by At

I want to find the fundamental solution of:

$$ x^2 - dy^2 = 1 $$ where $d$ is of the form $d = m^2 + 2$. I know how to solve these kind of problems using the continued fraction of $\sqrt{d}$, but only for a specific $d$. How would I go about finding the continued fraction of $\sqrt{m^2 + 2}$?

2

There are 2 best solutions below

0
On

\begin{eqnarray*} \sqrt{m^2+2}=m+\frac{2}{m+\sqrt{m^2+2}} \end{eqnarray*} iterating this formula gives (this step still needs to be formally justified) \begin{eqnarray*} \sqrt{m^2+2}=m+\frac{2}{2m+\frac{2}{2m+\frac{2}{2m+\frac{2}{2m+\ddots}}}} \\ \sqrt{m^2+2}=m+\frac{1}{m+\frac{1}{2m+\frac{1}{ m+\frac{1}{2m+\frac{1}{m+\ddots}}}}} \\ \end{eqnarray*}

0
On

I agree with Donald Splutterwit's result and think that a formal approach is worthwhile. Below, method 1 gives a derivation and method 2 merely gives a verification.

$\underline{\text{method 1}}$
For $r\in\mathbb{R},$ let $\lfloor r \rfloor \equiv$ the largest integer less than or equal to $r.$
The formal computation of a continued fraction is given by:
$\alpha = [a_0, a_1, \cdots]$ where $\alpha = \alpha_0, \;a_i = \lfloor \alpha_i \rfloor,\;$ and $\;\alpha_i = a_i + \frac{1}{\alpha_{i+1}}\;\Rightarrow\; {\alpha_{i+1}} = \frac{1}{\alpha_i - a_i}.$
The algorithm stops when and only when $\;\alpha_i = a_i.$

$\sqrt{m^2 + 2} = \alpha = \alpha_0, \;a_0 = m.$

$\alpha_1 = \frac{1}{\sqrt{m^2 + 2} - m} \;\times\; \frac{\sqrt{m^2 + 2} + m}{\sqrt{m^2 + 2} + m} \;=\; \frac{\sqrt{m^2 + 2} + m}{2} \;\Rightarrow\; a_1 = m.$

$\alpha_2 = \dfrac{1}{\frac{\sqrt{m^2 + 2} + m}{2} - m} \;=\; \dfrac{2}{\sqrt{m^2 + 2} - m} \;\times\; \dfrac{\sqrt{m^2 + 2} + m}{\sqrt{m^2 + 2} + m}$

$\;=\; \dfrac{2(\sqrt{m^2 + 2} + m)}{2} \;=\; \sqrt{m^2 + 2} + m \;\Rightarrow\; a_2 = 2m.$

$\alpha_3 \;=\; \dfrac{1}{(\sqrt{m^2 + 2} + m) - 2m} \;=\; \dfrac{1}{\sqrt{m^2 + 2} - m} = \alpha_1 \;\Rightarrow$

$a_3 = a_1, \;a_4 = a_2\;$ and $\;\alpha_5 = \alpha_3 \;\Rightarrow \;a_5 = a_3, \;a_6 = a_4\;$ and $\alpha_7 = \alpha_5 \;\Rightarrow\; \;\cdots.$

$\underline{\text{method 2}}$

Let $\;\beta = [\overline{m, 2m}] \;\Rightarrow\; \beta = m + \dfrac{1}{2m + \frac{1}{\beta}} \;=\; m + \dfrac{\beta}{2m\beta + 1} \;\Rightarrow\;$

$(\beta - m)(2m\beta + 1) = \beta \;\Rightarrow\; 2m{\beta}^2 + \beta - 2m^2\beta - m = \beta \;\Rightarrow$

$\beta\;$ is the positive root of $\;x^2(2m) + x(-2m^2) + (-m) = 0 \;\Rightarrow$

$\beta \;=\; \frac{1}{4m}(2m^2 + \sqrt{4m^4 + 8m^2}) \;=\; \frac{1}{2}(m + \sqrt{m^2 + 2}) \;\Rightarrow$

$\dfrac{1}{\beta} \;=\; \dfrac{2}{m + \sqrt{m^2 + 2}} \;\times\; \dfrac{\sqrt{m^2 + 2} - m}{\sqrt{m^2 + 2} - m} \;=\; \sqrt{m^2 + 2} - m \;\Rightarrow $

$\sqrt{m^2 + 2} = m + \dfrac{1}{\beta} \;=\; [m, \overline{m, 2m}].$