# Variant of Pythagorean Triples

In Weissman [1], there is a nice description of how to generate a mapping between reduced fractions and pythagorean triples. In outline the method is as follows:

Take the unit circle $x^2+y^2=1$ and a straight line through $(0,1)$ with a rational gradient $m$, i.e. $y = mx + 1$.

The line and the circle intersect at $(0,1)$ and $(u,v)$. The coordinates of the second point can be found to be
$$u = \frac{- 2 m}{{{m}^{2}}+1} \qquad \text{ and } \qquad v = \frac{{ - {m}^{2}} + 1}{{{m}^{2}}+1}$$

As $m$ is rational, we can write it as $a/b$ with gcd$(a,b)=1$ and we can re-write $u$ and $v$. $$u = -\frac{2 a b}{{{b}^{2}}+{{a}^{2}}} \qquad \text{ and } \qquad v = \frac{{{b}^{2}}-{{a}^{2}}}{{{b}^{2}}+{{a}^{2}}}$$

Using the fact that $u^2+v^2 = 1$ leads to $$(2ab)^2 + (b^2-a^2)^2 = (b^2 + a^2)^2$$ which gives a pythagorean triple $2ab$, $b^2-a^2$ and $a^2+b^2$. It is possible to show that only 1 is a common divisor for the triple.

Subsequently, there is an exercise to show that there are an infinite number of a variant of pythagorean triples $(x,y,z)$, with the form $x^2 + 2 y^2 = 3 z^2$.

The hint given is to use the point $(1,1)$ instead of the point $(0,1)$ for the line in a similar argument to that given above, i.e. to use the line $y = m(x-1) + 1$.

When I do this, still using the unit circle, I get quite complex expressions for the intersection coordinates. For example, one intersection point has $$u = \frac{{{m}^{2}} - m - \sqrt{2m}}{{{m}^{2}}+1} \qquad \text{ and } \qquad v = \frac{{-{m}^{2}}-2m+1}{{{m}^{2}}+1}$$ Substituting in an expression for a reduced fraction makes things even more complicated and I cannot link the expressions for $u$ and $v$ to a triple of the form described.

[1]: Weissman, Illustrated Theory of Numbers (AMS)

After a nudge from Lord Shark (use the ellipse $x^2 + 2 y^2 = 3$ instead of the unit circle), expressions for $(x,y,z)$ satisfying $x^2 + 2 y^2 = 3 z^2$ can be found. I now make these to be: $$x = 2{{a}^{2}} -4ab -{{b}^{2}} \quad y = {{b}^{2}}-2ab-2{{a}^{2}} \quad z = {{b}^{2}}+2{{a}^{2}}$$
• Maybe I should have concluded that exercise by writing: "the point $(1,1)$ on an ellipse" to avoid throwing off the reader. Lord Shark's got it anyways. Indeed, the idea generalizes to all conics... once you've got one point with rational coordinates, you've got infinitely many, by playing the same game. – Marty Jan 11 '18 at 22:40
The point $(1,1)$ is not on the unit circle. It is on the ellipse $E$ with equation $$x^2+2y^2=3$$ which is the relevant curve in this context. The second intersection of the line through $(1,1)$ of slope $m$ with $E$ can be written $(f(m)/h(m),g(m)/h(m))$ where $f$, $g$ and $h$ are simple polynomials with integer coefficients. Then $f(m)^2+2g(m)^2=3h(m)^2$ etc.
• Thanks Lord Shark ... This is great 'cos it also generalises, I.e.we can find triples such that, say, $2x^2 + 5 y^2 = 7 z^2$ etc. I've add the expressions this leads to for the form given in the question. – Paul Aljabar Jan 11 '18 at 20:13