4

Is there a parametric integer solution for $x,y,z,t$ when the sum of three square is equal to a square, i.e, $$x^2+y^2+z^2=t^2$$?

user119081
  • 107
  • 6
  • As for spherical coordinates, one may simply choose \begin{align} x &= t \cos \theta \sin \varphi \ y &= t \cos \theta \cos \varphi \ z &= t \sin \theta \end{align} –  Feb 02 '14 at 00:27
  • 1
    I think the OP wants a solution for integers, not reals. Something akin to the parametrization of Pythagorean triples $$a = k(m^2 - n^2), \quad b = 2kmn, \quad c = k(m^2 + n^2).$$ – heropup Feb 02 '14 at 00:36
  • Duplicate : http://math.stackexchange.com/questions/646255/diophatine-equation-x2y2z2-t2 – Balarka Sen Feb 02 '14 at 11:15

3 Answers3

5

EDIT: I knew i had written up Jones and Pall 1939 before, but it was on a question with different intent: Every integer vector in $\mathbb R^n$ with integer length is part of an orthogonal basis of $\mathbb R^n$

J-P 1939: as long as $t$ is odd, find all solutions to $$ a^2 + b^2 + c^2 + d^2 = t, $$ including permuting the letters and choosing various $\pm$ signs, while not requiring $a,b,c,d$ to be coprime. Then all solutions to your equation are given by $$ \left( a^2 + b^2 - c^2 - d^2 \right)^2 + (-2ad+2bc)^2 +(2ac+2bd)^2 = t^2. $$

Edit, November 26, 2016. This is often called Lebesgue's Formula, after V. A. Lebesgue the number theorist. It seems to go back to Euler as well. The first acceptable proof that all solution arise this way was due to L. E. Dickson, about 1920.

This is Theorem 3 on page 176 of Regular and Semi-Regular Positive Ternary Quadratic Forms, Acta Mathematica, volume 70, (1939), pages 165-191. It is a theorem about quaternions with all coefficients integers.

Now, if $t$ is even, then $t^2$ is divisible by $4,$ which means you need to double all three numbers; if the sum of three squares is divisible by $4,$ then all the squares are even. So, given some even number $n = 2^k t$ with $t$ odd, solve as above, then multiply through all solutions found by the same $2^k.$

I finished the version with stereographic projection from the North Pole of the sphere, and I can see now why this is not typically taught: by the Gauss-Legendre Three Squares Theorem, either $t$ or $2t$ is the sum of three squares, possibly both.

The first case gives, when $\color{magenta}{t = p^2 + q^2 + r^2},$ $$ (2rp)^2 + (2rq)^2 + \left( p^2 + q^2 - r^2 \right)^2 = t^2. $$ Note that the recipe above cannot be used for $t=7,$ despite $2^2+3^2+6^2=7^2.$

If, instead,when $\color{magenta}{2t = p^2 + q^2 + r^2},$ then $p^2 + q^2 - r^2$ is even and $$ (rp)^2 + (rq)^2 + \left( \frac{p^2 + q^2 - r^2}{2} \right)^2 = t^2. $$ This way, $2 \cdot 7 = 14 = 3^2 + 2^2 + 1^2,$ we do get $3^2 + 2^2 + (12/2)^2 = 49.$

Let's see, this is very different from Pythagorean triples. there are no restrictions on $t$ at all. Also, if you multiply $t$ by $4$ in either of the recipes above, all that happens is that you are forced to double all three of $p,q,r,$ so nothing important changes. that is, if the sum of three squares is divisible by 4, the squares are all even.

For those keeping score at home, it is quite easy to show that all rational points on the unit sphere $x^2 + y^2 + z^2 = 1$ other than the North Pole $(0,0,1)$ are given by $$ \left( \; \frac{-2rp}{p^2 + q^2 + r^2} \; , \; \frac{-2rq}{p^2 + q^2 + r^2} \; , \; \frac{p^2 + q^2 - r^2}{p^2 + q^2 + r^2} \; \right) $$ for an integer triple $p,q,r.$

Will Jagy
  • 146,052
  • 1
    @LeeYiyuan, alright. This result is due to Jones and Pall, 1939. – Will Jagy Feb 02 '14 at 01:43
  • I cannot access the article linked, but it seems like R=Quaternion(m,n,-p,q)*Quaternion(n,m,q,p) gives the Lebesque Identity with norm squared R=t – don bright Jun 02 '19 at 23:41
  • 1
    @donbright http://zakuski.math.utsa.edu/~kap/Jones_Pall_1939.pdf – Will Jagy Jun 02 '19 at 23:43
  • wow, thank you ... that is a bit above my head!! – don bright Jun 02 '19 at 23:59
  • @Randall for $t = 15,$ $2t=30$ and $30 = 5^2 + 2^2 + 1^2,$ so $p=5, q=2, r=1$ and $5^2 + 2^2 - 1^2 = 28$ so $5^2 + 2^2 + 14^2 = 15^2 $ – Will Jagy Oct 18 '23 at 03:08
  • Will, thanks for the correction, appreciated – Randall Oct 19 '23 at 19:53
  • Will, I did an investigation of low values where p,q,r have a common gcd = 1, but it is not obvious how to find p,q,r so that the fractions have a common denominator = 15 to get the 2 values of [1/3, 2/15, 14/15] and [2/3, 2/15, 11/15] which exist for the spherical point on S2 having denominator 15. The following p^2+q^2+r^2 sums will work: 30 75 150 195 390 510 750 870 etc.which appear to be 1 mod 4 prime or 2 * 1 mod 4 prime x 15. – Randall Oct 19 '23 at 20:20
4

There is a parameterization for every equal sums of squares equation $$ X_1^2 + \dotsb + X_m^2 = Y_1^2 + \dotsb + Y_n^2 $$ with $n,m$ positive integers and all $X_i,Y_i$ integers; your equation is the special case $(m,n)=(3,1)$. The papers by Barnett and Bradley are my first recommendations.

3

Notice that for all integers $n$:$$n^2 + (n + 1)^2 + (n(n + 1))^2 = (n^2 + n + 1)^2$$ Of course, the above parametric solution does not necessarily represent all integer solutions.

Yiyuan Lee
  • 14,595