# Rational points on $2x^2+2y^2=1$ and integral solutions to $2X^2+2Y^2=Z^2$

(a) Find a solution to the diophantine equation $$2X^2+2Y^2=Z^2$$; hence find a solution for rational numbers of the form $$2x^2+2y^2=1$$.

We have $$2X^2+2Y^2 \equiv Z^2\pmod{2} \implies (X,Y,Z) =c(1,1,2), ~c \in\mathbb{Z}$$ is a solution. And $$(1/2, 1/2, 1)$$ is a possible solution to the rational equation.

(b) Find all rational solutions of the equation $$2x^2+2y^2=1$$; hence find all integer solutions to $$2X^2+2Y^2=Z^2$$

I know we can solve $$y = m(x-1/2)+\frac{1}{2}$$ and $$2x^2+2y^2=1$$ to get

$$\displaystyle x= \frac{m^2-2m-1}{2(m^2+1)}, y= \frac{1-2m-m^2}{2(m^2+1)}$$

(1) I don't know if $$m$$ is rational. So I'm not sure if I've found any rational solutions.

(2) If I force $$\displaystyle m=\frac{p}{q}$$ be rational I get

$$\displaystyle x = \frac{(p^2-2pq-q^2)}{ 2(p^2 + q^2)}$$, $$\displaystyle y = \frac{-(p^2 + 2 p q - q^2)}{ 2(p^2 + q^2)}$$.

Then solution to the integer equation $$2X^2+2Y^2=Z^2$$ is:

$$\left(x, y, z \right) = \left(p^2-2pq-q^2, -(p^2 + 2 p q - q^2), 2(p^2 + q^2) \right)$$.

Does this sound right? Can I just assume that $$m$$ is rational? Why can one rational solution generate all rational solutions (if it does)? Could I have gotten the general solution for the integer version at the beginning with just modular arithmetic?

Think about what you are doing here. $$2x^2+2y^2=1$$ is a circle, and you have found a rational point $$P$$ on it. Two observations link the algebra and the geometry:

A straight line between two rational points in the plane has a rational slope ($$m$$ must be rational).

If you have a straight line through $$P$$ with rational slope $$m$$ it will cut the circle at another rational point (or be a tangent). This is a consequence of Vieta's formulae - the quadratic for the circle has rational coefficients, so the sum of roots of the equation for $$x$$ (or $$y$$) is rational. One root is rational so both are.

So for arbitrary $$m$$ you parametrise all the lines through $$P$$. Constraining to rational $$m$$ gives you all the lines which cut the circle at a second rational point (apart from one corresponding to $$m=\infty$$; what happens with the tangent at $$P$$?).

You are allowed to constrain $$m$$ to get the rational points. I hope this helps you to see why it works.

• Thank you. I now understand the point of this exercise a lot better I think. I wonder whether I could do something like this: set each coordinate of my parametrisation in terms of $m$ -- that's $[(m^2-2m-1)/[2(m^2+1)],-(m^2-2m-1)/[2(m^2+1)])$ -- to zero. It gives $m=1 \pm \sqrt{2}$ this takes $(1 \pm \sqrt{2}, 1 \pm \sqrt{2}) \mapsto (0,0)$ which is not on the circle; thus $1 \pm \sqrt{2}$ is irrational; for if it were rational it would be taken to a rational point on the curve? – Notsredt Jul 15 '19 at 9:07

You have found one rational solution $$(x,y)=(\frac12,\frac12)$$ to $$2|x+iy|^2=1$$ This you can now use to transform any other solution as in $$2=|1-i|^2\implies |(1-i)(x+iy)|^2=1,$$ that is, $$(x+y, y-x)$$ is a rational point on the unit circle. Now these are all parametrized by Pythagorean triples $$a+ib=(p+iq)^2$$, $$c=|p+iq|^2$$. All together, $$x=\frac{p^2-q^2-2pq}{2(p^2+q^2)},~~~y=\frac{p^2-q^2+2pq}{2(p^2+q^2)}.$$ All reflections and rotations can be obtained via permutation and sign-flips in the pair $$(p,q)\in\Bbb Z^2$$.