Existence of solutions to diophantine quadratic form

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.


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.