Saturday 13 May 2017

Euler's method for linear diophantine equations

This should be extremely easy, but I'm having trouble with something. I'm following C.D. Olds "Continued Fractions" book, pages 43/44.




Consider the equation $8x+5y=81$. We're searching for integer solutions. We want to find those solutions using Euler's method, that is: let's consider the variable with the smallest coefficient, $y$, and solve for it: $y = \frac{81-8x}{5}$. Let's consider the biggest multiples of 5 contained in 81 and 8: $81=5 \cdot 16+1$ and $8=5\cdot 1 +3$. Therefore, $y = 16 - x + \frac{1-3x}{5}= 16 - x + t$, with $t = \frac{1-3x}{5}$. So, $3x+5t=1$. We have obtained a new equation, where the coefficients are now smaller than those of the original equation. As $x$ and $y$ have to be integers, $t$ has to be an integer.



I'm fine with all that. Now, we should replicate this procedure again. Here's what the author does:



$x=\frac{1-5t}{3}=\frac{1-(2 \cdot 3-1)t}{3}=-2t+\frac{t+1}{3}=-2t+u$. Since $x$ and $t$ are integers, $u$ has to be an integer. We have $x=2-5u$ and $y=8u+13$. By inserting here every possible integer value of $u$, we find the infinite solutions to our equation.



Why do we perform the substitution $5=2 \cdot 3 - 1$ rather than $5=3 \cdot 1 +2$? Shouldn't the second one the one we should be doing, in analogy with the first equation?



Moreover, if we perform the substitution $5= 3\cdot 1 + 2$, we get $x=\frac{1-5t}{3}=\frac{1-(3 \cdot 1+2)t}{3}=-t+\frac{1-2t}{3}=-t+u$, with $u = \frac{1-2t}{3}$. By the same reasoning as before, $u$ has to be an integer. Therefore, $x=\frac{1-5t}{3}=\frac{1-5(\frac{1-3u}{2})}{3}=\frac{-1+5u}{2}$. Which can't be correct: for every integer value of $u$ I should get an integer solution, by setting $u=0$ that's not the case. What's wrong?




EDIT: nothing's wrong. I simply had to take all the integer values of $u$ such that $x$ and $y$ are integers. $u=0$ does not satisfy this requirement. All odd values of $u$ do.

No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...