# Existence of solutions to diophantine quadratic form

Is there a general result about the existence of $($non-trivial$)$ solutions of the diophantine equation:

$$Ax^2 + By^2 = Cz^2$$

for $A,B,C$ known positive integers, pair-wise relatively prime?

What if we know $C$ is $1$ or $3?$

• this is the same as asking for rational points on an ellipse. you can get a rational parameterization of the ellipse by fixing a point on the ellipse and finding the other point of intersection of a line through the given point. so for rational slopes through one of the obvious (trivial) points, you get infinitely many solutions. – yoyo Mar 7 '11 at 22:38
• But then I'd need to find a point on the elipse, and I'm looking for whether there are rational points on the ellipse. Once I've found one such point, I know that I can find infinitely many, yes :) – Thomas Andrews Mar 7 '11 at 22:42
• For example, if (A,B,C)=(5,2,1), there is no solution. – Thomas Andrews Mar 7 '11 at 22:48
• math.stackexchange.com/questions/1513733/… – individ Mar 24 '17 at 8:29
• Technically, actually there is 2 problem. One clarification of the existence of solutions, another search formula to parameterise them. – individ Mar 24 '17 at 8:35

Yes; actually, this is one of the only classes of Diophantine equations for which such a result exists! First we will make some simplifying observations. Observe that it is pretty easy to tell what happens when $z = 0$, so suppose $z \neq 0$. Next observe that finding integer solutions is equivalent to finding rational solutions, and since we can scale all three variables by the same constant we can assume $z = 1$, so we are solving $Ax^2 + By^2 = C$ for rationals $x, y$.

It's a classical result that if there is one solution, there is a straightforward way to describe all of the other solutions: if $(x_0, y_0)$ is a solution, then any line of the form $(x_0 + at, y_0 + bt)$ where $a, b$ are fixed rationals intersects the curve $Ax^2 + By^2 = C$ in exactly one other point, and this intersection must be rational; conversely, every other rational solution arises in this way.

So it suffices to find a single solution. To do this the key is the Hasse-Minkowski theorem, which tells you that solutions exist over $\mathbb{Q}$ if and only if they exist over $\mathbb{R}$ and over the p-adic numbers $\mathbb{Q}_p$ for all primes $p$.

It is very easy to check if a solution exists over $\mathbb{R}$, so it suffices to check if solutions exist over $\mathbb{Q}_p$ for all $p$. If $p \nmid 2ABC$, then the Chevalley-Warning theorem shows that the equation has a solution in $\mathbb{Z}/p\mathbb{Z}$, and by Hensel's lemma these solutions can be upgraded to solutions in $\mathbb{Z}_p \subset \mathbb{Q}_p$.

So we are reduced to checking the finitely many primes dividing $2ABC$. But for any particular such prime, this is more or less an application of quadratic reciprocity together with Hensel's lemma again.

This is classical material; I think you can find a more thorough exposition in the beginning of Cassels' Lectures on Elliptic Curves.

• Thanks. My mathematics is rusty, but I had a feeling this was possible. – Thomas Andrews Mar 7 '11 at 22:53
• Let me take the opportunity to mention something which I think is amazing: there is no such result for polynomials of degree $3$ or higher. We can't even prove such a result for the specific case of polynomials of degree $3$. There is a nice discussion of what is known (although it may be outdated by now) in Poonen's Computing Rational Points on Curves: citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.10.2007 – Qiaochu Yuan Mar 7 '11 at 23:25
• It seems like the final hard part is the case p=2. You cannot use Hensel's lemma mod 2, can you? – Thomas Andrews Mar 8 '11 at 19:16
• @Thomas: there is a more general version of Hensel's lemma which works here (and this is the version stated e.g. in the Wikipedia article). You need to verify if there are solutions mod 8, I think. – Qiaochu Yuan Mar 8 '11 at 19:20

As Qiaochu mentioned, this is a classical problem that is a prototypical example of an equation that is amenable to the local-global approach. Legendre obtained a complete solution by descent circa 1785. Later, as $p$-adic methods emerged, it was realized that Legendre's solution could be elegantly reformulated via such local-global techniques. You can find a nice readable four-page introduction on pp. 238-242 of Harvey Cohn: Advanced Number Theory.

I would happily add Serre's book.

• It would probably be a good idea to specify which book; I guess you mean A Course in Arithmetic. – Qiaochu Yuan Mar 7 '11 at 23:18
• yes. It is that book. – Kerry Mar 8 '11 at 15:01