# Rational solutions of $x^2 + y^2 = z (z^2 - 1)$

I'm interested in a handy way, if it exists, to generate all rational solutions of $x^2 + y^2 = z (z^2 - 1)$.

Clearly there are rational solutions for $z = a/b$ (where $a, b$ are coprime integers with $0 < b < a$) iff $a, b, a - b, a + b$ are each expressible as a sum of two squares (of integers of course), or equivalently that none has a prime divisor of the form $4 Z + 3$ to odd multiplicity.

A perl search script for $0 < b < a < 1000$ showed the proportion of "eligible" coprime pairs $a, b$ to be about 0.01, reducing as the upper bound increases. (It would be interesting to know where this proportion is heading asymptotically: 1/128 perhaps, or something obscure involving $\pi$ ? )

For any eligible z, which gives one rational pair $x, y$, all such pairs can obviously be found by composing the LHS with $p^2 + q^2 = 1$.

I wondered if the latter trick could be exploited to ensure some $x$ and/or $y$ of a special form from which all eligible values of $z$ could be algebraically expressed, in effect a parametric solution. But my efforts to obtain a general two-parameter solution have failed, and I'd be (pleasantly) surprised if there is one, although there are of course special one-parameter solutions.

So, in summary, are any references to this equation? (Google is little help when searching for formulae!) Or perhaps the recently developed methods to apply Mordell-Weil groups to algebraic surfaces may be applicable to it?

• I doubt this is possible, for then for each fixed $x=x_0$ you would be able to describe the rational points of the elliptic curve $y^2=z(z^2-1)-x_0^2$. – Peter Mueller Jul 31 '13 at 17:16
• @PeterMueller Not at all. There is a complete parametrization of rational solutions to $w^3+x^2+y^3=z^3$ (see math.harvard.edu/~elkies/4cubes.html ) but it doesn't help you prove FLT for $n=3$. – David E Speyer Jul 31 '13 at 17:38
• @David: Yes, you are right. My argument shows nothing. – Peter Mueller Jul 31 '13 at 17:41
• Along the lines of David's comment: If we homogenize, don't we obtain the cubic surface $x^2w+y^2w=z(z^2-w^2)$, which should have a rational parameterization, giving a parametric solution? The only difficulty is finding it. – Will Sawin Jul 31 '13 at 19:15
• Samir Siksek has a paper about generating all rational points on cubic surfaces starting from a finite set of generators - arxiv.org/abs/1012.1838. Perhaps this would help to find the parametric solution in this case? – Tim Dokchitser Jul 31 '13 at 22:05

I doubt there is a simple complete parametrization. Here are a number of comments:

There is a two-dimensional family of solutions Start with two solutions that do not have $x^2+y^2=0$. For concreteness sake, I'll choose $$\left( \frac{3}{8} \right)^2+ \left( \frac{6}{8} \right)^2 = \left( \frac{5}{4} \right)^3 - \frac{5}{4}$$ and $$\left( \frac{16}{27} \right)^2 + \left(\frac{2}{27} \right)^2=\left( \frac{-4}{9} \right)^3 - \left( \frac{-4}{9} \right).$$

Each such solution generates a curve of solutions: Set $$p(t) = \left( \frac{3}{8} \frac{1-t^2}{1+t^2} + \frac{6}{8} \frac{2t}{1+t^2}, - \frac{3}{8} \frac{2t}{1+t^2} + \frac{6}{8} \frac{1-t^2}{1+t^2}, \frac{5}{4} \right)$$ and $$q(u) = \left( \frac{16}{27} \frac{1-u^2}{1+u^2} + \frac{2}{27} \frac{2u}{1+u^2}, - \frac{16}{27} \frac{2u}{1+u^2} + \frac{2}{27} \frac{1-u^2}{1+u^2}, \frac{-4}{9} \right).$$ Geometric, this is just rotating the $(x,y)$ coordinates by $2 \tan^{-1}(t)$.

For any $t$ and $u$, the line through $p(t)$ and $q(u)$ meets the cubic at three points. Two of them are $p(t)$ and $q(u)$, call the third one $\phi(t,u)$. This is given by some complicated rational function of $t$ and $u$, which I leave it to you to compute.

This is called a "degree $4$ unirational parametrization", because recovering $t$ and $u$ from $\phi(t,u)$ requires solving a degree $4$ equation. There are also degree $2$ unirational parametrizations. (Sketch: Take a smooth rational point on $p$ the cubic. Let $T_p$ be the tangent plane to $p$ and let $C_p$ be the intersection of $T_p$ with the cubic. Then $C_p$ is a nodal plane cubic, and hence has a rational parametrization $\alpha(t)$. Also, the projective completion $(x^2+y^2)w = z(z^2-w^2)$ contains a line at $(w:x:y:z) = (0:\ast:\ast: 0)$, let $\beta(u)$ parametrize this line. The line through $\alpha(t)$ and $\beta(u)$ intersects the cubic at one additional point.)

There is no rational parametrization of all solutions Specifically, there does not exist rational functions $(f(t,u), g(t,u), h(t,u))$ so that $f^2+g^2 = h^3-h$ and, letting $t$ and $u$ range over $\mathbb{Q}^2$, we sweep out all solutions. To see this, note that all solutions have either $-1 \leq z \leq 0$, or $1 \leq z$. (I deliberately chose my example solutions to contain one of each type.) A rational parametrization couldn't jump over this gap, so it will only hit solutions of one of these two types. (This argument is taken from Section 1.4 of Karen Smith's notes on rational varieties.)

Moreover, I highly doubt this is the only restriction; I would guess that each unirational parametrization will hit only a small fraction of the total list of points. I don't have an argument or reference for this, though.

The density of solutions goes to zero As you say, the goal is to find $a$ and $b$ coprime such that $a$, $b$, $a+b$ and $a-b$ are all sums of squares. For any prime $p \equiv 3 \mod 4$, the probability that a random $(a,b)$ will not be divisible by $p$ exactly only once is something like $1-4/p+1/p^2$. So, intuitively, the probability that this condition is obeyed for all $p \equiv 3 \mod 4$, should behave like $\prod_{p \equiv 3 \bmod 4} (1-4/p+1/p^2)$, which diverges to $0$. It should be easy to make this precise.

The big paper on counting points on hypersurfaces seems to be "The density of rational points on curves and surfaces" by Heath-Brown. His framework is to count integer solutions to $$(x^2+y^2)w = z^3 - z w^2$$ with $|w|$, $|x|$, $|y|$, $|z| \leq B$ and $GCD(w,x,y,z)=1$, discarding any that lie on lines contained in the surface. In this case, I think that just means he is discarding $(w,x,y,z) = (0,\ast, \ast,0)$, which you don't care about anyway. His best bound is $O(B^{52/27+\epsilon})$ (Theorem 6); he conjectures that the true bound is $O(B^{1+\epsilon})$.

There are 57 papers in Mathscinet citing this one, so it is obviously an active field; I didn't check to see whether the bounds have been improved. I also didn't think about the question of just counting the number of distinct values for $z/w$.

• I think we can use Hilbert irreducibility to prove a version of the claim that each parameterization hits only a small fraction of the total list of points. Specifically, given two different unirational parameterizations of the same degree, one of them can reach only a density $0$ set of the points paramaterized by the other, because being reached is the same as a certain irreducible polynomial having a rational root. So we can show that no finite set of rational parameterizations covers all points, as long as we can show that there are infinitely many different rational parameterizations. – Will Sawin Aug 1 '13 at 22:15
• But we can easily check that infinitely many of your type of parameterization are distinct, by computing the ramification locus. – Will Sawin Aug 1 '13 at 22:16
• Many thanks for your reply, David, which I've marked as the definive one, and thanks to everyone else who replied. I should have remembered that "real gap" observation, as this is a text book example! – John R Ramsden Aug 3 '13 at 13:21

Consider the corresponding projective surface $$S : x^2w + y^2w = z(z^2 - w^2).$$ No one has mentioned so far that this is surface singular, and singular cubic surfaces are rather special. It has two conjugate singular points over $\mathbb{Q}(i)$ given by $z=w=x^2 + y^2 = 0$.

The usual way to parametrise a singular cubic surface is to consider the intersections with the surface of the family of lines which pass through a fixed rational singular point. This trick does not work here as there are no singular points defined over $\mathbb{Q}$, but it does show that your surface is rational over $\mathbb{Q}(i)$. I think the explains the appearance of issues relating to primes $\equiv 1 \mod 4$, sums of two squares, etc...

With regards to the number of solutions, for $B > 0$ let $$N(U,B) = \#\{ (x,y,z,w) \in U(\mathbb{Z}): \gcd(x,y,z,w) = 1, \max\{|x|,|y|,|z|,|w|\} \leq B\},$$ where $U$ is the open subset of $S$ given by removing the lines. Manin's conjecture predicts here that $$N(U,B) \sim c B (\log B)^{\rho - 1},$$ where $c>0$ and $\rho$ is the rank of the Picard group of the minimal desingularisation of $S$. I have not calculated this in your case, but it will be some integer less than $7$.

Manin's conjecture is now known for many rational singular cubic surfaces. However since it seems like your surface is not rational and your singularities are quite mild, I doubt it is known in your case and it will probably be quite difficult to prove.

Not so much an answer as a cautionary tale: check out the very cool paper by L. N. Vaserstein:

@article {MR2630059, AUTHOR = {Vaserstein, Leonid}, TITLE = {Polynomial parametrization for the solutions of {D}iophantine equations and arithmetic groups}, JOURNAL = {Ann. of Math. (2)}, FJOURNAL = {Annals of Mathematics. Second Series}, VOLUME = {171}, YEAR = {2010}, NUMBER = {2}, PAGES = {979--1009}, ISSN = {0003-486X}, CODEN = {ANMAAH}, MRCLASS = {11D72 (20G20)}, MRNUMBER = {2630059 (2011e:11061)}, MRREVIEWER = {Timothy D. Browning}, DOI = {10.4007/annals.2010.171.979}, URL = {http://dx.doi.org/10.4007/annals.2010.171.979}, }

I had another look at this last night. Despite obviously having no two-parameter general solution in the usual sense, on account of the gaps in the ranges of valid real z, it does have a general rational solution involving four unconstrained parameters. The following is a sketch:

Firstly, three cases arise: (1) $z = -1, 0, 1$ (2) $-1 < z < 0$ (3) $1 < z$

Case 1 forces $x = y = 0$, so nothing further need be said about that.

We can flip between Cases 2, 3 by dividing throughout by $z^4$ and replacing $x, y, z$ by $\frac{x}{z^2}, \frac{y}{z^2}, \frac{-1}{z}$ resp. So it suffices to consider one of these, say Case 3.

As alluded to in my initial question, letting $z = \frac{p}{q}$ for coprime integers $p, q$ and homogenizing, we conclude that $|z|$ and $|z^2 - 1|$ are each expressible as a sum of two squares. So in Case 3, $x = d^2 + e^2$ and $(d^2 + e^2)^2 = 1 + f^2 + g^2$. (Note that the form of this ensures that $1 < d^2 + e^2$ for real $f, g$.)

In view of the well-known general rational solution of $x^2 + y^2 + z^2 = t^2$, namely $x : y : z : t = 2 u : 2 v : u^2 + v^2 - 1 : u^2 + v^2 + 1$, we can then conclude that $d^2 + e^2 = \frac{u^2 + v^2 + 1}{2 u}$

Let $u, v = \frac{U}{W}, \frac{V}{W}$ for integers $U, V, W$ with $gcd(U, V, W) = 1$, and suppose a prime $q \equiv 4 Z + 3$ divides $2 U W$, say $q$ divides $U$. If $q$ also divides $U^2 + V^2 + W^2$, and hence $V^2 + W^2$, then $q$ divides $U, V, W$ contrary to $gcd(U, V, W) = 1$. The same applies if $q$ divides $W$. Thus every such prime dividing $2 U W$ does not divide the numerator and therefore must divide the denominator $2 U W$ to an even power, and therefore must divide $2 \frac{U}{W}$ to an even power. So in summary we must have $u = a^2 + b^2$, and we can write:

$2 ((a d + b e)^2 + (a e - b d)^2) = (a^2 + b^2)^2 + v^2 + 1$

So denoting $y, x, c = v, a d + b e + a e - b d, a d + b e - a e + b d$, we obtain finally $x^2 - y^2 = (a^2 + b^2)^2 + 1 - c^2$, so that for some rational $h$ we must have :

$x, y = \frac{h^2 + (a^2 + b^2)^2 + 1 - c^2}{2 h}, \frac{h^2 - (a^2 + b^2)^2 - 1 + c^2}{2 h}$

From the preceding two linear equations involving $x, c$ (which have determinant $- 2 (a^2 + b^2)$, which is non-zero) we can then express $d, e$ as rational functions of $a, b, c, h$ etc.

edit (2013-08-11) :

Couple of points, the first expanding on one aspect of the above, and then some more info on the original equation/surface.

Firstly, from the rational solution of $x^2 + y^2 + z^2 = t^2$ near the start, we could equally well conclude that $d^2 + e^2 = \frac{u^2 + v^2 + 1}{u^2 + v^2 - 1}$, and it might be thought this would lead to a different solution or none. But in view of the following identities, this is in fact equivalent to the equation I gave:

$\begin{array} 2 2 u & = & 2 q r\\ 2 v & = & (p^2 + q^2 - 1) r\\ u^2 + v^2 - 1 & = & 2 p r\\ u^2 + v^2 + 1 & = & (p^2 + q^2 + 1) r \end{array}$

where:

$r, u, v - 1 = \frac{2}{(p - 1)^2 + q^2}, \frac{2 q}{(p - 1)^2 + q^2}, \frac{2 (p - 1)}{(p - 1)^2 + q^2}$ resp

In other words, a suitable multiple of one parametrization leads to the same parametrization with different values and with the "sum of squares less one" term swapped with one of the "even" terms.

Secondly, the original equation is a special case of a so-called Châtelet surface [ http://en.wikipedia.org/wiki/Ch%C3%A2telet_surface ], and I noticed in interesting looking paper on these appeared on the ArXiv only this week http://arxiv.org/abs/1308.0909 ("Rationality problem of generalized Châtelet surfaces", by Aiichi Yamasaki).