Pell's equation (simple solutions)

Revision as of 06:09, 18 April 2023 by Vvsss (talk | contribs) (Equation of the form x^2 - xy - y^2 = -1)

Pell's equation is any Diophantine equation of the form $x^2 – Dy^2 = 1,$ where $D$ is a given positive nonsquare integer, and integer solutions are sought for $x$ and $y.$

Denote the sequence of solutions $\{x_i, y_i \}.$ It is clear that $\{x_0, y_0 \} = \{1,0 \}.$

During the solution we need:

a) to construct a recurrent sequence $\{x_{i+1}, y_{i+1} \} = f({x_i, y_i})$ or two sequences $\{x_{i+1} \} = f({x_i}), \{y_{ i+1} \} = g({y_i});$

b) to prove that the equation has no other integer solutions.

Equation of the form $x^2 – 2y^2 = 1$

Prove that all positive integer solutions of the equation $x^2 – 2y^2 = 1$ can be found using recursively transformation $x_{i+1} = 3 x_i + 4 y_i , y_{i+1} = 2 x_i + 3 y_i$ of the pare $\{x_0, y_0\} = \{1,0\}.$

Proof

$\boldsymbol{a.}$ Let integers $(x_i, y_i)$ are the solution of the equation $\hspace{10mm}   x_i^2 - 2 y_i^2 = 1,$ \begin{equation} \left\{ \begin{aligned}    x_{i+1} &= 3 x_i + 4 y_i ,\\   y_{i+1} &= 2 x_i + 3 y_i . \end{aligned} \right.\end{equation} Then \[x_{i+1}^2 - 2 y_{i+1}^2 = (3 x_i + 4 y_i)^2 - 2 (2 x_i + 3 y_i)^2 =  x_i^2 - 2 y_i^2 = 1.\]

Therefore integers $(x_{i+1}, y_{i+1})$ are the solution of the given equation. If $i > 0$ then \[x_{i+1} > y_{i+1}  \ge 2(x_i + y_i) > x_i > y_i > 0.\] \[\{(x_i, y_i) \} = \{(1,0), (3,2), (17,12), (99,70),...\}.\]

$\boldsymbol{b.}$ Suppose that the pare of the positive integers $(x_I, y_I)$ is the solution different from founded in $\boldsymbol{a.}$

$x_I^2 - 2 y_I^2 = 1.$ Let \begin{equation} \left\{ \begin{aligned}    x_{i+1} &= 3 x_i - 4 y_i ,\\   y_{i+1} &= - 2 x_i + 3 y_i . \end{aligned} \right.\end{equation} then $x_{i+1}^2 - 2 y_{i+1}^2 = (3 x_i - 4 y_i)^2 - 2 (-2 x_i + 3 y_i)^2 =  x_i^2 - 2 y_i^2 = 1,$ therefore integers $(x_{i+1}, y_{i+1})$ are the solution of the given equation.

$x_i^2 = 2 y_i^2 +1 >  2 y_i^2 \implies  x_i > y_i >0.$ Similarly $x_{i +1}> y_{i+1}.$

There is no integer solution if $y_j = 1. y_j = 0$ is impossible. So $y_i > 1.$ \[9 y_i^2 \ge 8 y_i^2 + 4  = 4 x_i^2 \implies 3y_i \ge 2x_i  \implies y_{i+1} \ge 0.\]

\[0 \le y_{i+1} = y_i - 2 (x_i – y_i) < y_i.\]

There is no member $y_j  = 0$ in the sequence $\{y_i \},$ hence it is infinitely decreasing sequence of natural numbers. There is no such sequence. Contradiction.

vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x(x + 1) = 2y^2$

Prove that all positive integer solutions of the equation $x(x + 1) = 2y^2$ can be found using recursively transformation $x_{i+1} = 3 x_i + 4 y_i + 1, y_{i+1} = 2 x_i + 3 y_i + 1$ of the pare $\{x_0, y_0\} = \{0,0\}.$ In another form $\sqrt{x_{i+1}} = \sqrt{2x_i} + \sqrt{x_i + 1}.$

Proof

\[x(x + 1) = 2y^2 \implies 4x^2 + 4x + 1 = 8y^2 + 1 \implies (2x+1)^2 – 2(2y)^2 = 1.\] It is the form of Pell's equation, therefore \begin{equation} \left\{ \begin{aligned}  2x_{i+1} + 1 &= 3(2x_i + 1) + 4(2 y_i) ,\\ 2y_{i+1} &= 2(2 x_i + 1) + 3(2 y_i) . \end{aligned} \right. \implies \left\{ \begin{aligned}  x_{i+1} &= 3 x_i + 4 y_i + 1 ,\\ y_{i+1} &= 2 x_i + 3 y_i + 1 . \end{aligned} \right. \end{equation}


\[\begin{array}{c|c|c|c|c|c|c|c|c}  & & & & & & & & \\ [-2ex] \boldsymbol{i} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ [0.5ex] \hline   & & & & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 0 & 1 & 8 & 49 & 288 & 1681 & 9800 & 57121 \\ [1ex]      \boldsymbol{y_i} & 0 & 1 & 6 & 35 & 204 & 1189 & 1681 & 40391 \\ [1ex]     \end{array}\] \[x_{i+1} = 3 x_i + 4 y_i + 1 = 2x_i + 2 \sqrt {2 x_i (x_i + 1)} + (x_i + 1) = (\sqrt {2x_i} + \sqrt{x_i + 1})^2\] \[\implies \sqrt{x_{i+1}}= \sqrt{2x_i} + \sqrt{x_i + 1}.\]

vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x^2 – 2y^2 = - 1$

Prove that all positive integer solutions of the equation $x^2 – 2y^2 = -1$ can be found using recursively transformation $x_{i+1} = 3 x_i + 4 y_i , y_{i+1} = 2 x_i + 3 y_i$ of the pare $\{x_0, y_0\} = \{1,1\}.$

Proof

Similarly as for equation $x^2 – 2y^2 = 1.$

\[\begin{array}{c|c|c|c|c|c|c|c}  & & & & & & & \\ [-2ex] \boldsymbol{i} & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\ [0.5ex] \hline   & & & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 1 & 7 & 41 & 239 & 1393 & 8119 & 47321 \\ [1ex]      \boldsymbol{y_i} & 1 & 5 & 29 & 169 & 985 & 5741 & 33461 \\ [1ex]     \end{array}\]

vladimir.shelomovskii@gmail.com, vvsss

Pythagorean triangles with almost equal legs

Find all triangles with integer sides one leg of which is $1$ more than the other.

Find all natural solutions of the equation $x^2 + (x+1)^2 = y^2.$

Solution

\[x^2 +(x + 1)^2 = 2x^2 + 2x + 1 = y^2 \implies 4x^2 + 4x + 1 = 2y^2 - 1 \implies (2x+1)^2 – 2y^2 = -1.\] All positive integer solutions of the equation $(2x+1)^2 – 2y^2 = -1$ can be found using recursively transformation \[2x_{i+1}+1 = 3 (2x_i + 1) + 4 y_i , y_{i+1} = 2 (2x_i +1) + 3 y_i \implies\] \[x_{i+1} = 3 x_i + 2 y_i + 1, y_{i+1} = 4 x_i + 3 y_i + 2\] of the pare $\{x_0, y_0\} = \{0,1\}.$ \[\begin{array}{c|c|c|c|c|c|c}  & & & & & & \\ [-2ex] \boldsymbol{i} & 0 & 1 & 2 & 3 & 4 & 5 \\ [0.5ex] \hline   & & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 0 & 3 & 20 & 119 & 696 & 4059 \\ [1ex]      \boldsymbol{y_i} & 1 & 5 & 29 & 169 & 985 & 5741 \\ [1ex]     \end{array}\]

vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x^2 - 3y^2 = - 1$

Prove that the equation $x^2 – 3y^2 = -1$ have not any solution.

Proof

\[x = 3k \implies x^2 \pmod{3}= 0.\] \[x = 3k \pm 1 \implies x^2 \pmod{3}= 1.\] \[(- 3y^2 + 1) \pmod {3} = 1 \implies (x^2 - 3y^2 + 1) \pmod {3} = \{1, 2 \} \ne 0 \implies\] \[x^2 - 3y^2 + 1 \ne 0.\] vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x^2 – 2y^2 = 7$

Prove that all positive integer solutions of the equation $x^2 – 2y^2 = 7$ can be found using recursively transformation $x_{i+1} = 3 x_i + 4 y_i , y_{i+1} = 2 x_i + 3 y_i$ of the pares $\{x_1, y_1\} = \{3,1\}$ and $\{\hat{x}_1, \hat{y}_1 \} = \{5,3\}$.

Proof

$\boldsymbol{a.}$ Let integers $(x_i, y_i)$ are the solution of the equation $\hspace{10mm}   x_i^2 - 2 y_i^2 = 7,$ \begin{equation} \left\{ \begin{aligned}    x_{i+1} &= 3 x_i + 4 y_i ,\\   y_{i+1} &= 2 x_i + 3 y_i . \end{aligned} \right.\end{equation} Then \[x_{i+1}^2 - 2 y_{i+1}^2 = (3 x_i + 4 y_i)^2 - 2 (2 x_i + 3 y_i)^2 =  x_i^2 - 2 y_i^2 = 7.\]

Therefore integers $(x_{i+1}, y_{i+1})$ are the solution of the given equation. \[x_{i+1} > y_{i+1}  \ge 2(x_i + y_i) > x_i > y_i > 0.\] \[\begin{array}{c|c|c|c|c|c}  & & & & & \\ [-2ex] \boldsymbol{i} & 1 & 2 & 3 & 4 & 5 \\ [0.5ex] \hline   & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 3 & 13 & 75 & 437 & 2547 \\ [1ex]      \boldsymbol{y_i} & 1 & 9 & 53 & 309 & 1801 \\ [1ex]     \end{array}\] $\boldsymbol{b.}$ The pare of the positive integers $(\hat {x}_i, \hat{y}_i)$ is the solution different from founded in $\boldsymbol{a.}$

$\hat {x}_i^2 - 2 \hat {y}_i^2 = 7.$ Let \begin{equation} \left\{ \begin{aligned}    \hat{x}_{i+1} &= 3  \hat{x}_i - 4  \hat{y}_i ,\\    \hat{y}_{i+1} &= - 2  \hat{x}_i + 3  \hat{y}_i . \end{aligned} \right.\end{equation} then \[\hat{x}_{i+1}^2 - 2  \hat{y}_{i+1}^2 = (3  \hat{x}_i - 4  \hat{y}_i)^2 - 2 (-2  \hat{x}_i + 3  \hat{y}_i)^2 =   \hat{x}_i^2 - 2  \hat{y}_i^2 = 7,\] therefore integers $( \hat{x}_{i+1},  \hat{y}_{i+1})$ are the solution of the given equation.

$\hat{x}_i^2 = 2 \hat{y}_i^2 +1 >  2 \hat{y}_i^2 \implies \hat{x}_i > \hat{y}_i > 0.$ Similarly $\hat{x}_{i +1} > \hat{y}_{i+1}.$

If $\hat{y}_i > 5$ then \[9 \hat{y}_i^2 \ge 8 \hat{y}_i^2 + 28  = 4 \hat{x}_i^2 \implies 3 \hat{y}_i \ge 2 \hat{x}_i  \implies \hat{y}_{i+1} \ge 0.\]

\[0 \le \hat{y}_{i+1} = \hat{y}_i - 2 (\hat{x}_i – \hat{y}_i) <\hat{y}_i.\]

There is no member $\hat{y}_j  = 0$ in the sequence $\{\hat{y}_i \},$ hence it is infinitely decreasing sequence of natural numbers. There is no such sequence. Contradiction.

We need to check $\hat{y}_j = \{2,4,5\}$ (no solution), but $\hat{y}_j = 3$ gives the integer solution, so there is the second sequence of the integer solutions \[\begin{array}{c|c|c|c|c|c}  & & & & & \\ [-2ex] \boldsymbol{i} & 1 & 2 & 3 & 4 & 5 \\ [0.5ex] \hline   & & & & & \\ [-1.5ex]  \boldsymbol{\hat{x}_i} & 5 & 27 & 157 & 915 & 5333 \\ [1ex]      \boldsymbol{\hat{y}_i} & 3 & 19 & 111 & 647 & 3771 \\ [1ex]     \end{array}\] vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x^2 - xy - y^2 = 1$

Prove that all positive integer solutions of the equation $x^2 - xy - y^2 = 1$ are $\{x_i, y_i \} = \{F_{2i +1}, F_{2i}\}.$ They can be found using recursively transformation $y_{i+1} = x_i + y_i , x_{i+1} = 2x_i + y_i = y_{i+1} + x_i$ of the pares $\{x_0, y_0\} = \{1,0\}.$

Proof \[x^2 - xy - y^2 = 1 \implies 4x^2 - 4xy + y^2 - 5y^2 = 1 \implies (2x+y)^2 – 5y^2 = 1.\] Let the pare of the positive integers $(x_i, y_i)$ be the solution of given equation $x_i^2 - x_i y_i - y_i^2 = 1$ and $x_{i+1} = 2x_i + y_i , y_{i+1} = x_i + y_i.$ Then \[x_{i+1}^2 – x_{i+1} y_{i + 1} – y_{i+1}^2 = x_i^2 - x_i y_i – y_i^2 = 1.\] \[\begin{array}{c|c|c|c|c|c|c|c|c}  & & & & & & & & \\ [-2ex] \boldsymbol{i} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ [0.5ex] \hline   & & & & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 1 & 2 & 5 & 13 & 34 & 89 & 233 & 610 \\ [1ex]      \boldsymbol{y_i} & 0 & 1 & 3 & 8 & 21 & 55 & 144 & 377 \\ [1ex]     \end{array}\]

vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x^2 - xy - y^2 = -1$

Prove that all positive integer solutions of the equation $x^2 - xy - y^2 = -1$ are $\{x_i, y_i \} = \{F_{2i}, F_{2i-1}\}.$ They can be found using recursively transformation $y_{i+1} = x_i + y_i , x_{i+1} = 2x_i + y_i = y_{i+1} + x_i$ of the pares $\{x_0, y_0\} = \{1,1\} = \{F_1, F_2 \}.$ \[\begin{array}{c|c|c|c|c|c|c|c|c}  & & & & & & & & \\ [-2ex] \boldsymbol{i} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ [0.5ex] \hline   & & & & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 1 & 3 & 8 & 21 & 55 & 144 & 377 & 987 \\ [1ex]      \boldsymbol{y_i} & 1 & 2 & 5 & 13 & 34 & 89 & 233 & 610 \\ [1ex]     \end{array}\]

vladimir.shelomovskii@gmail.com, vvsss

Equation of the form $x^2 - 5y^2 = 4$

Prove that all positive integer solutions of the equation $x^2 - 5y^2 = 4$ are $\{x_i, y_i \} = \{F_{2i+1} + F_{2i - 1}, F_{2i}\}.$ They can be found using recursively transformation $y_{i+1} = x_i + y_i , x_{i+1} = 2x_i + y_i = y_{i+1} + x_i$ of the pares $\{x_0, y_0\} = \{3, 1\} = \{F_3 +F_1, F_2\}.$ \[\begin{array}{c|c|c|c|c|c|c|c|c}  & & & & & & & & \\ [-2ex] \boldsymbol{i} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ [0.5ex] \hline   & & & & & & & & \\ [-1.5ex]  \boldsymbol{x_i} & 3 & 7 & 18 & 47 & 123 & 322 & 377 & 843 \\ [1ex]      \boldsymbol{y_i} & 1 & 3 & 8 & 21 & 55 & 89 & 144 & 377 \\ [1ex]     \end{array}\]

vladimir.shelomovskii@gmail.com, vvsss