I am trying to solve the following Diophantine equation $13x^2-y^2=z^2$. Is there a standard method for generating x and y so that $13x^2-y^2$ is always a square? Mathematica gives me the following triples $(x, y, z)$ as the first six primitive solutions: $(1, 2, 3), (1, 3, 2), (5, 1, 18), (5, 6, 17), (5, 17, 6), (5, 18, 1)$: though there appears to be an infinite number of solutions.
-
Constantly one and the same. There is a formula. http://math.stackexchange.com/questions/738446/solutions-to-ax2-by2-cz2/738527#738527 Consider it the equivalent of a quadratic form to get a replacement. $y\longrightarrow{y+z}$ Then the equation becomes. $y^2+2yz+2z^2=13x^2$ One root of the whole and is equal to 5. Substituted into the formula of the solution obtained. – individ Jul 11 '14 at 04:44
1 Answers
There is indeed a standard method, which is the same as the standard method used to parametrize all Pythagorean triples (and indeed, integer solutions of any quadratic form in three variables).
Forgetting the solution $(0,0,0)$, your equation is equivalent to $r^2+s^2=13$, where $r=\frac yx$ and $s=\frac zx$ are rational numbers. Fix your favorite rational solution, say $(r_0,s_0)=(2,3)$. Then the rational points on the circle $r^2+s^2=13$ other than $(2,3)$ are in one-to-one correspondence with lines through $(2,3)$ of rational slope. (Proving this isn't hard, and is the same as the Pythagorean case, but is an educational exercise.)
So the general rational solution $(r,s)$ to $r^2+s^2=13$ can be found by intersecting the line $s-3=m(r-2)$ (where $m$ is a generic rational number) with the circle: \begin{align*} r^2+(m(r-2)+3)^2&=13 \\ (m^2+1)r^2+(6 m-4m^2) r+(4 m^2-12 m-4)&=0 \\ (r-2) \big( (m^2+1) r-(2 m^2-6 m-2) \big)&=0. \end{align*} (We knew $r=2$ would be a solution ahead of time, so factoring the polynomial isn't that hard.) Ignoring the solutions $(2,\pm3)$, we see the general solution is $$ r = \frac{2 m^2-6 m-2}{m^2+1}, \quad s=m(r-2)+3=\frac{-3 m^2-4 m+3}{m^2+1}. $$ This essentially solves the original problem, other than the fact that these fractions may not be in lowest terms (but the gcd of the top and bottom is always a divisor of $26$, in this case).
- 92,241
-
1small typo $r=\frac yx$ @GregMartin and thanks for the procedure. – Frank M Jackson Jul 10 '14 at 22:15