1
$\begingroup$

Is there an algorithm or a method that one can use to determine whether an equation of the form $(\text{E})$: $$ax^2+by^2+cz^2+dt^2=0$$ has a solution $(x,y,z,t)$ in whole numbers. In other words, given the tuple $(a,b,c,d)\in\mathbb{Z}^4$, how to determine whether there is a non-trivial tuple $(x,y,z,t)\in\mathbb{Z}^4$ that satisfies $(\text{E})$?

In case when one of $a,b,c$ or $d$ is zero, one can use Legendre's theorem on ternary quadratic forms. This paper shows the full process of how it's done. Is there anything similar for the case of four variables?

$\endgroup$
2

2 Answers 2

2
$\begingroup$

Clearly, it is enough to decide whether their is rational solutions or not (multiply by the square of a common denominator to have integer solutions).

I assume that $a,b,c,d$ are all nonzero (otherwise, you are reduced to known cases).

Multiplying by $a$ and replacing $x$ by $ax$, one may assume WLOG that $a=1$, so we are reduced to the equation $x^2+by^2+cz^2+dz^2=0$. (*)

This step is not necessary, but it allows to write down simpler conditions.

Hasse Minkowski says that (*) has a nonzero rational solution if and only if it has a nonzero solution over $\mathbb{R}$ and $\mathbb{Q}_p$ for all $p$.

  1. Having a solution over the reals is equivalent to say that $b,c,d$ are not all $>0$.

  2. For the $p$-adic case, it depends on the determinant and local Hasse invariants of the rational quadratic form $x^2+by^2+cz^2+dt^2$.

Here, the determinant is the square class of $bcd$, and if $p$ is prime , the local Hasse invariant is $(b,cd)_p(c,d)_p$.

I will below how to define $( , )_p$.

If $r,s$ are two non zero rationals, write $r=p^\alpha u, s=p^\beta v, p\nmid u, p\nmid v$.

Then $(r,s)_p=(-1)^{\alpha\beta\cdot\frac{p-1}{2}}\left(\dfrac{u}{p}\right)^\beta \left(\dfrac{v}{p}\right)^\alpha$, if $p\neq 2$, where $\left(\dfrac{\phantom{a}}{p}\right)$ is the Legendre symbol, and $\displaystyle (r,s)_2=(-1)^{\frac{u-1}{2}\cdot \frac{v-1}{2}+\alpha\frac{v^2-1}{8}+\beta\frac{u^2-1}{8}}$

Note for later use that $(-1,-1)_p=1$ if $p\neq 2$ and $(-1,-1)_2=-1$.

Note also that if $p\neq 2$, and the $p$-adic valuations of $r,s$ are both zero, $(r,s)_p=1.$

Recall also the following fact.

Fact. Let $r=p^\alpha u, p\nmid u$. Then $r$ is a square in $\mathbb{Q}_p$ if and only if :

  • $\alpha$ is even and $u$ is a square modulo $p$ if $p\neq 2$ (which can be decided using Legendre symbol)

  • $\alpha$ is even and $u\equiv 1 \ [8]$ if $p=2$.

If we translate Thm 6 of Chapter IV $\S$ 2 of Serre's "A course in arithmetic", we get that (*) has a nonzero solution over $\mathbb{Q}_p$ if and only if one of the following cases hold:

Case 1. $bcd$ is not a square modulo in $\mathbb{Q}_p^\times$

Case 2. $bcd$ is a square in $\mathbb{Q}_p^\times$ and $(b,cd)_p=(c,d)_p$ if $p\neq 2$

Case 3. $bcd$ is a square in $\mathbb{Q}_2^\times$ and $(b,cd)_2=-(c,d)_2$

All these conditions amounts to computations of finitely many Legendre symbols, because if $p\nmid bcd$ and $p\neq 2$, then either $bcd$ is not a square in $\mathbb{Q}_p^\times $, or $bcd$ is a square in $\mathbb{Q}_p^\times$ but in this case both symbols $(b,cd)_p$ and $(c,d)_p$ are equal to $1$ !!

Hence for odd prime which are not divisors of $bcd$, you are automatically in one of the first two cases.

So you only have to test if you are in one of the three previous cases only for $p\mid 2bcd $. Note that if the $p$-adic valuation of $bcd$ is odd, $bcd$ is automatically not a square, so you can reduce to prime numbers $p$ such that $p\mid 2bcd$ and $v_p(bcd)$ is even !

Hence, you have an algorithm to decide the existence of a nontrivial solution over $\mathbb{Q}$ (note that the Legendre symbol coincide with the Jacobi symbol, so you can compute it without factoring you integers). However, it won't give you an explicit solution.

Example. Consider $3x^2+3\cdot 5y^2+7z^2-2\cdot 7\cdot 23 t^2=0$.

This is equivalent to consider $x^2+3^2 \cdot 5y^2+3\cdot 7z^2-2\cdot 3 \cdot 7\cdot 23 t^2=0$.

Here $b=3^2 \cdot 5, c=3\cdot 7, d=-2\cdot 3\cdot 7 \cdot 23, cd=-2\cdot 3^2\cdot 7^2\cdot 23$ , and $bcd=-2\cdot 3^4\cdot 5\cdot 7^2\cdot 23$.

Since $b,c,d$ are not all positive, we have solutions over the reals.

For the $p$-adic case, we just have to check two cases: $p=3,7$ since they are the only prime divisors of $bcd$ with an even valuation.

For $p=3$, we need to check that $-2\cdot 5\cdot 23$ is a square modulo $3$. But $-2\cdot 5\cdot 23=1 \ [3]$, which is a square.

Now since $( r, s)_p$ only depends on the square classes of $r$ and $s$, we have $(b,cd)_3= (5,-2\cdot 23)_3=(-1)^{\frac{5-1}{2}\frac{-46-1}{2}}=1$ and $(c,d)_3=(3\cdot 7,-2\cdot 3\cdot 7\cdot 23)_3 =(-1)^{\frac{3-1}{2}}\left(\dfrac{7}{3}\right) \left(\dfrac{-2\cdot 7\cdot 23}{3}\right)=-1\cdot 1\cdot -1=1.$

Hence we are in Case 2.

For $p=7$, we need to check that $-2\cdot 5\cdot 23$ is a square modulo $7$. But $-2\cdot 5\cdot 23=1 \ [7]$, which is a square.

Since $7\nmid 5,2$ and $3$, $(b,cd)_7=1$. Now $(c,d)_7=(3\cdot 7,-2\cdot 3\cdot 7\cdot 23)_7=(-1)^{\frac{7-1}{2}}\left(\dfrac{3}{7}\right) \left(\dfrac{-2\cdot 3\cdot 23}{7}\right)=-1\cdot -1\cdot 1=1.$

Hence we are in Case 2.

All in all, the original equation must have a non trivial solution.

This is indeed the case since $3\cdot 2^2+3\cdot 5\cdot 3^2+7\cdot 5^2-2\cdot 7\cdot 23\cdot 1^2=0$.

$\endgroup$
14
  • $\begingroup$ This is an excellent work, much thanks! I originally started to bother about equation (*) since this post: math.stackexchange.com/questions/4039962/…. I tried to do the case of $\mathbb{Z}^4$ but it seemed soo much harder than $\mathbb{Z}^3$. If you want to try it, I will look forward for your solution :) Eitherway, you gave me some useful and relevant reference books that I might look at. $\endgroup$
    – donaastor
    Mar 3, 2021 at 19:37
  • $\begingroup$ There is one thing that is still not clear to me. Coefficients a,b,c and d don't have to be square-free nor coprime. But, Legendre's method assumes that. Does it mean that using methods from the book you mentioned (Serre's "A course in arithmetic") I can state conditions for the case of 3 variables without making assumptions that something is square-free and coprime? $\endgroup$
    – donaastor
    Mar 3, 2021 at 20:12
  • $\begingroup$ You don't need to assume anything. Nevertheless, you can divide by a common gcd without changing the solutions, and you can absorb squares into the variables if you wish. (it won't change the fact that you have a non trivial solution or not) $\endgroup$
    – GreginGre
    Mar 4, 2021 at 9:22
  • $\begingroup$ Concerning your other problem, do is translate into an equation of the form $\sum_{i,j}a_{ij}x_ix_j=0$? $\endgroup$
    – GreginGre
    Mar 4, 2021 at 9:37
  • $\begingroup$ About assuming this and that, I am sorry, but it seems I didn't explain well what I meant. I wanted to check whether I should be able to craft a method to check the existance of solution to $ax^2+by^2+cz^2=0$ that doesn't assume squarefreeness like Legendre's method does. In your book it sais that the condition is equivalent to $(-1,-d)=\varepsilon$, but I can't understand what it means without reading a lot from the book. So I basically ask you is it worth it to read that book to get a condition that I want? I guess it is :) $\endgroup$
    – donaastor
    Mar 4, 2021 at 10:48
0
$\begingroup$

I actually realized some time after my comment above that, because we're trying to hit zero, at least one member of $(a,b,c,d) < 0$. If we assume WLOG that $a \geq b \geq c \geq d$, then at least $d$ is negative. If we set $x = t$ and $a+d = m$, then we can simplify to

$$mx^2 + by^2 + cx^2 = 0$$

But now one of those coefficients still has to be negative if we want to hit $0$. Either $|a| < |d|$ and $m$ is negative, or $b$ and/or $c$ are negative. Again, WLOG we can assume $c$ is negative. Then setting $y = z$ and $b+c-n$, we get:

$$mx^2 + ny^2 = 0$$

And either $m$ or $n$ has to be negative, so we really have

$$mx^2 = ny^2$$

I have to imagine there are solutions for this that don't have $m = n$ and $x = y$. But I'm not sure if there's a generalized form.

Edit: Oh, right. Either $m = n, x = y$, or both $m$ and $n$ must be squares for there to be integer solutions, because (for instance) $2x^2 = 5y^2$ can't have an integer solution, since both $x$ and $y$ have prime factorizations where all the exponents are $2$.

$\endgroup$
3
  • 1
    $\begingroup$ I don't understand how this solve the problem. You found than you have solutions when $x=t$ and $y=z$, unless when $m/n$ is a square(and not, $m$ and $n$ are square, by the way), in which case you have the trivial solution. What about the other cases ? $x\neq t$ or $y\neq z$ ? $\endgroup$
    – GreginGre
    Mar 3, 2021 at 10:09
  • $\begingroup$ Yes, after thinking about it more I realize this "solution" isn't great and just gives a small subset of solutions. For instance, we know the vast majority of integers can be expressed as $x^2 + y^2$, so it's likely that almost all integers can be expressed as $ax^2 \pm by^2$. And it's likely that almost all (if not all) can be expressed in that form multiple different ways. If we find two different ways to express them, setting those equal to one another gives a solution. But the other solution posted is a lot more thorough. $\endgroup$ Mar 6, 2021 at 22:48
  • $\begingroup$ Oh. That solutions was yours. :). Alas, I kind of stopped understanding it after paragraph 5... my brain hasn't gotten itself wrapped around p-adic numbers yet. I do wonder if there are solution methods that are more elementary. $\endgroup$ Mar 6, 2021 at 22:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .