3

After failing at stereographic projection, I opted to write things in terms of vectors. Definitely got hazy, but I was able to solve it. Currently, I haven't been able to come up with a parameterization that covers all solutions listed in Will Jagy's answer.

A good reference got me started: Equal Sums of Squares by C. J. Bradley Source: The Mathematical Gazette, Vol. 82, No. 493 (Mar., 1998), pp. 80-85 https://www.jstor.org/stable/3620159

Bradley Approach:
To solve $$x_1^2+2x_2^2+3x_3^2=7y_1^2 \tag{1}$$

First I went for: $$x_1^2+2x_2^2+3x_3^2=y_1^2+2y_2^2+3y_3^2 \tag{2}$$

this will correspond to $$ap+2bq+3cr=0$$ which becomes $$pf+2qg+3rh=0$$ with $(f,g,h)=1$, while $a=mf$, $b=mg$, $c=mh$ and $p, q, r$ being the cofactors of $$ \left( \begin{array}{ccc} f & 2g & 3h \\ t & u & v \end{array} \right)$$

So $$\begin{cases} p=2vg-3uh \\ q= -vf+3th\\ r=uf-2tg \end{cases}$$ Continuing $$\begin{cases} a=x_1-y_1 \\ p=x_1+y_1 \\ b=x_2-y_2 \\ q= x_2+y_2\\ c= x_3-y_3\\ r=x_3+y_3 \end{cases} \implies \begin{cases} x_1=\frac 1 2 (p+a)=\frac 1 2 (2vg-3uh+mf) \\ x_2=\frac 1 2 (q+b)=\frac 1 2 (-vf+3th+mg) \\ x_3 =\frac 1 2 (r+c) =\frac 1 2 (uf-2tg+mh)\\ y_1=\frac 1 2 (p-a)=\frac 1 2 (2vg-3uh-mf) =-\frac 1 2 (mf-2vg+3uh)\\ y_2= \frac 1 2 (q-b)=\frac 1 2 (-vf+3th-mg)=-\frac 1 2 (vf+mg-3th)\\ y_3=\frac 1 2 (r-c)=\frac 1 2 (uf-2tg-mh)=-\frac 1 2 (-uf+2tg+mh) \end{cases}$$

Eliminate the $1/2$ and multiply the $y$ values by $-1$. So this is $A$: $$x=Af \iff \left[ \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right]=\left[ \begin{array}{ccc} m & 2v & -3u\\ -v & m & 3t\\ u & -2t & m\\ \end{array} \right]\left[ \begin{array}{c} f \\ g \\ h \\ \end{array} \right]$$

and this is $B$, $$y=Bf \iff \left[ \begin{array}{c} y_1 \\ y_2 \\ y_3 \\ \end{array} \right]=\left[ \begin{array}{ccc} m & -2v & 3u\\ v & m & -3t\\ -u & 2t & m\\ \end{array} \right]\left[ \begin{array}{c} f \\ g \\ h \\ \end{array} \right]$$

$B$ is the negated triangle matrices that make up $A$

To test so far, let $m=1, f=-1, g=2, h=-2, t=3, u=-3, v=5$

$$\left[ \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right]=\left[ \begin{array}{ccc} 1 & 10 & 9\\ -5 & 1 & 9\\ -3 & -6 & 1\\ \end{array} \right]\left[ \begin{array}{c} -1 \\ 2 \\ -2 \\ \end{array} \right]=\left[\begin{array}{c} 1 \\ -11\\ -11\end{array}\right]$$ $$\left[ \begin{array}{c} y_1 \\ y_2 \\ y_3 \\ \end{array} \right]=\left[ \begin{array}{ccc} 1 & -10 & -9\\ 5 & 1 & -9\\ 3 & 6 & 1\\ \end{array} \right]\left[ \begin{array}{c} -1 \\ 2\\ -2 \\ \end{array} \right]=\left[\begin{array}{c} -3\\ 15\\ 7\end{array}\right]$$ And this IS a solution to $x_1^2+2x_2^2+3x_3^2=y_1^2+2y_2^2+3y_3^2$.

found that: $$x=Af \iff \left[ \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right]=\left[ \begin{array}{ccc} m & 2v & -3u\\ -v & m & 3t\\ u & -2t & m\\ \end{array} \right]\left[ \begin{array}{c} f \\ g \\ h \\ \end{array} \right]$$

$$y=Bf \iff \left[ \begin{array}{c} y_1 \\ y_2 \\ y_3 \\ \end{array} \right]=\left[ \begin{array}{ccc} m & -2v & 3u\\ v & m & -3t\\ -u & 2t & m\\ \end{array} \right]\left[ \begin{array}{c} f \\ g \\ h \\ \end{array} \right]$$

I wrote $(2)$ in vector notation as: $x^t(Tx)=y^t(Ty)$ such that $T=\left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3\end{array}\right]$ So $$x^tT(Af)=y^tT(Bf)$$

Then, changing $f \to f_r$ by imposing a condition, $c=(2,0,1)$.

UPDATE: Right now the question stands as how can one find a parameterization containing all primitive solutions? The below was the answer I found with the approach I used. You will notice $(x_1, x_2)$ are permanently even. I was able to correct this, but my solution doesn't contain primitive forms of all solutions in Will Jagy's program.

$$\begin{cases} x_1=2(m^2+6t^2-3u^2-2v^2)+(-6mu+12tv) \\ x_2=2(-2mv+6tu)+(6mt+6uv) \\ x_3=2(2mu+4tv)+(m^2-6t^2-3u^2+2v^2) \\ y_1=m^2+6t^2+3u^2+2v^2 \end{cases}$$

Derivation: $x_1^2+2x_2^2+3x_3^2=y_1^2+2y_2^2+3y_3^2 \to (Af)^t(TAf)=(Bf)^t(TBf)$. If you set $Bf=c$, then $f=B^{-1}c$, and we have $$(AB^{-1}c)^t(TAB^{-1}c)=c^t(Tc)=2^2+2(0)^2+3(1)^2=7$$ Thus $$x=AB^{-1}c$$

  • 1
    this is stereographic: with $\gcd(p,q,r,s) = 1$ integers, make quadruple $(x,y,z,w)=(2+tp,tq,1+tr,1+ts),$ then find the nonzero (rational) value of $t$ for which $x^2 + 2 y^2 + 3 z^2 - 7 w^2 = 0.$ Plug in the $t$ value, the result is rational parametrizations in terms of $p,q,r,s.$ In order to get integer expressions, we expect to multiply through by $p^2 + 2 q^2 + 3 r^2 - 7 s^2,$ which must be nonzero. When done, the num,bers are integers but may not have gcd 1 – Will Jagy Dec 24 '19 at 03:05
  • https://math.stackexchange.com/questions/1127654/parametrization-of-solutions-of-diophantine-equation – individ Dec 24 '19 at 04:38
  • @WillJagy is the solution below complete? Did I find all solutions?? – MaximusFastidiousIrreverence Dec 25 '19 at 23:13
  • It would probably help if you sent me a pdf of the short article by Bradley. So far, I can't tell whether the campus mathematics library here has the Gazette back that far (in any format). – Will Jagy Jan 03 '20 at 19:03
  • @WillJagy I sent you an email. Did you get it? – MaximusFastidiousIrreverence Jan 04 '20 at 03:41
  • 1
    Just got it. I have gotten up early; it should be interesting. Somewhere in this question you suggested that more than one parametrization might be required. That is almost certainly true. Formulas (4) are exactly the solution of Welch listed in Dickson's History. So far, I see no indication that allows for coefficients. In (9) he considers $x_1^2 + x_2^2 + x_3^2 = y_1^2 + y_2^2 + y_3^2.$ This may take some time, evidently you felt you had found an acceptable generalization – Will Jagy Jan 04 '20 at 14:59
  • 1
    Getting there. Long and difficult process, stereographic projection and dealing with gcd's – Will Jagy Jan 05 '20 at 16:04
  • Sigh. Appears there is no usable bound on gcd... – Will Jagy Jan 05 '20 at 16:15
  • 1
    Hmmm; more intricate program, but I can do a raw search fo rht first 1000 quadruples $w^2 + 2 x^2 + 3 y^2 = 7 z^2$ sorted by $z.$ Save those, then for each quadruple, find the apparent smallest gcd required using the very first recipe I wrote, which is just stereographic projection around a fixed solution quadruple (2,0,1,1). There may be no bond on gcd, but the may be a finite collection of gcd's that need to be included in the program. That is how it works for three variables... – Will Jagy Jan 05 '20 at 16:39
  • 1
    @WillJagy How about that Bradley reference though? I wish I saw it earlier. It's so plain that I'm mad at myself for not realizing the connection between sums of squares and linear diophantine equations – MaximusFastidiousIrreverence Jan 07 '20 at 00:34
  • @MaximusFastidiousIrreverence: The connection is deeper than that — every Diophantine equation that I’ve ever come across can be converted into a sums of squares equation. – Kieren MacMillan Jan 22 '24 at 12:06

5 Answers5

3

Well, it is possible to solve $p^2 + 3 q^2 + 3 r^2 = 7 s^2$ using quaternions. The first recipe, using 1+3+3 = 7, comes out


? p = w^2 + x^2 - 3 * y^2 - 3 * z^2 - 0 *w*x - 6*w*y +6*w*z +6*x*y + 6*x*z +0*y*z 
%1 = x^2 + (6*y + 6*z)*x + (w^2 + (-6*y + 6*z)*w + (-3*y^2 - 3*z^2))
? q = w^2 - x^2 + 3 * y^2 - 3 * z^2 +2 *w*x - 0*w*y -2*w*z +2*x*y + 0*x*z +6*y*z 
%2 = -x^2 + (2*w + 2*y)*x + (w^2 - 2*z*w + (3*y^2 + 6*z*y - 3*z^2))
? r = w^2 - x^2 - 3 * y^2 + 3 * z^2 -2 *w*x +2*w*y -0*w*z +0*x*y + 2*x*z +6*y*z 
%3 = -x^2 + (-2*w + 2*z)*x + (w^2 + 2*y*w + (-3*y^2 + 6*z*y + 3*z^2))
? 
? s = w^2 + x^2 + 3*y^2 + 3 * z^2
%4 = x^2 + (w^2 + (3*y^2 + 3*z^2))
? 7* s^2
%5 = 7*x^4 + (14*w^2 + (42*y^2 + 42*z^2))*x^2 + (7*w^4 + (42*y^2 + 42*z^2)*w^2 + (63*y^4 + 126*z^2*y^2 + 63*z^4))
? 
? 
? p^2 + 3 * q^2 + 3 * r^2
%6 = 7*x^4 + (14*w^2 + (42*y^2 + 42*z^2))*x^2 + (7*w^4 + (42*y^2 + 42*z^2)*w^2 + (63*y^4 + 126*z^2*y^2 + 63*z^4))
? p^2 + 3 * q^2 + 3 * r^2 - 7 * s^2
%7 = 0
? 
? 

The second comes from writing 4+0+3 = 7.

? 
? p
%19 = 2*x^2 + 6*y*x + (2*w^2 + 6*z*w + (-6*y^2 - 6*z^2))
? 
? q
%20 = -x^2 + 4*y*x + (w^2 - 4*z*w + (3*y^2 - 3*z^2))
? 
? r
%21 = (-2*w + 4*z)*x + (4*y*w + 6*z*y)
? 
? s
%22 = x^2 + (w^2 + (3*y^2 + 3*z^2))
? 
? p^2 + 3 * q^2 + 3 * r^2 
%23 = 7*x^4 + (14*w^2 + (42*y^2 + 42*z^2))*x^2 + (7*w^4 + (42*y^2 + 42*z^2)*w^2 + (63*y^4 + 126*z^2*y^2 + 63*z^4))
? 
? 
? 7 * s^2
%24 = 7*x^4 + (14*w^2 + (42*y^2 + 42*z^2))*x^2 + (7*w^4 + (42*y^2 + 42*z^2)*w^2 + (63*y^4 + 126*z^2*y^2 + 63*z^4))
? 
? 
? p^2 + 3 * q^2 + 3 * r^2 - 7 * s^2
%25 = 0
? 

Will Jagy
  • 139,541
1

Nevermind I found it $$\begin{cases} x_1=2(m^2+6t^2-3u^2-2v^2)+(-6mu+12tv) \\ x_2=2(-2mv+6tu)+(6mt+6uv) \\ x_3=2(2mu+4tv)+(m^2-6t^2-3u^2+2v^2) \\ y_1=m^2+6t^2+3u^2+2v^2 \end{cases}$$

Derivation: $x_1^2+2x_2^2+3x_3^2=y_1^2+2y_2^2+3y_3^2 \to (Af)^t(TAf)=(Bf)^t(TBf)$. If you set $Bf=c$, then $f=B^{-1}c$, and we have $$(AB^{-1}c)^t(TAB^{-1}c)=c^t(Tc)=2^2+2(0)^2+3(1)^2=7$$ I didn't interpret it right that here $x=AB^{-1}c$, I also didn't impose $c$ correctly in redefining $f$. When you work that out it is correct. It's just that calculating $AB^{-1}c$ was a doozy for me. I may have just made a small error the first time. Totally fine with that!

  • This answer has a permanent even $x_1$ and $x_2$. Making $m$ and $u$ differ in parity will result in $x_3$ being odd. Does anyone know of a solution that is not part of this family of solutions? – MaximusFastidiousIrreverence Dec 25 '19 at 23:48
  • It is encouraging that your $y_1$ can take any positive value (Ihope the repetition of $t$ is an error, one of them really $v$). Just write one program as a raw search, the other program with bounds on the absolute values of your $mtuv$ and compare the outputs. If you format the printouts correctly, the computer can sort the lines for you, by $y_1$ – Will Jagy Dec 25 '19 at 23:51
  • @WillJagy thank you for spotting that. What program do you use? All I have is desmos. – MaximusFastidiousIrreverence Dec 25 '19 at 23:53
  • 1
    I use C++ with GMP when there are big integers. Given your apparent interest, you should learn how to program to check possible answers. These days I guess Python is good. Note that it is likely that you have written all rational solutions, taking your variables rational. The question is integers (with gcd 1). – Will Jagy Dec 26 '19 at 00:00
  • where was I? I can do a small test run. Need to write the pgrogram first. – Will Jagy Dec 26 '19 at 00:02
  • @WillJagy this vector approach worked out for me. I was inspired to try it after attempting to comprehend your answer to this question: https://math.stackexchange.com/questions/2383893/find-three-numbers-such-that-the-sum-of-all-three-is-a-square-and-the-sum-of-any . I never studied quaternions before, so imagine my difficulty reading that Jones and Pall reference. However now that I've found a way to answer that one and this one using vectors (and matricies), I'll be more inclined to see how your quaternion approach lines up. And I'll definitely try and learn C++ or python. – MaximusFastidiousIrreverence Dec 26 '19 at 00:07
  • @WillJagy actually this answer I was trying to comprehend: https://math.stackexchange.com/questions/1964607/when-will-a-parametric-solution-generate-all-possible-solutions/1965805#1965805 – MaximusFastidiousIrreverence Dec 26 '19 at 00:10
0

I'm afraid the permanent even variables are not doing the entire job:

     -7      1      2      3
-----------------------------
      1      2      0      1
      2      1      0      3
      2      5      0      1
      3      1      5      2
      3      2      4      3
      3      7      1      2
      5      1      9      2
      5      7      3      6
      5     10      6      1
      6      1      2      9
      6      5     10      3
      6      7      8      5
      6      7     10      1
      6     11      8      1
      6     13      2      5
      7      5      3     10
      7     10      0      9
      7     13      9      2
      7     14      6      5
      9      2     10     11
      9      5     11     10
      9     10     14      5
      9     11     13      6
      9     13      7     10
      9     14      2     11
      9     14      8      9
      9     19      7      6
      9     22      2      5
     10      5     18      3
     10      7     12     11
     10      7     18      1
     10     11      6     13
     10     13     12      9
     10     25      6      1
     11     10      6     15
     11     14     12     11
     11     14     18      1
     11     17     15      6
     11     22     12      5
     11     23      3     10
     13      1     21     10
     13      2     24      3
     13      7      9     18
     13     10      0     19
     13     17     21      2
     13     25     15      6
     13     34      0      3
     14      1     12     19
     14      7     18     15
     14     17      0     19
     14     19     18     11
     14     25      6     15
     14     29     12      9
     14     35      6      5
     14     37      0      1
     15      2     28      1
     15      5      7     22
     15      5     17     18
     15     10     14     19
     15     10     22     13
     15     11      1     22
     15     14     16     17
     15     14     26      3
     15     19     11     18
     15     22      2     19
     15     26      4     17
     15     26     14     13
     15     29     19      2
     15     34     14      3
     15     35     11      6
     15     35     13      2
     15     37      7      6
     15     38      8      1
     17      2     24     17
     17     11     15     22
     17     13     21     18
     17     14     24     15
     17     14     30      3
     17     29     21     10
     17     38      6     13
     17     43      9      2
     18      1     14     25
     18      5     28     15
     18      7      4     27
     18      7     26     17
     18     13     16     23
     18     17     14     23
     18     19      4     25
     18     25     22     15
     18     25     28      5
     18     29     26      5
     18     31     20     13
     18     35     20      9
     18     35     22      5
     18     37      4     17
     18     37     14     13
     18     41     16      5
     18     43     14      3
     18     47      4      3
     19      2      0     29
     19      2     18     25
     19      7     15     26
     19      7     33     10
     19     22     30      9
     19     25     15     22
     19     31     27      6
     19     34     12     19
     19     47      3     10
     19     49      3      6
     19     50      0      3
     21      1     23     26
     21      2     10     31
     21      7     13     30
     21      7     37     10
     21     10     20     27
     21     10     34     15
     21     14      2     31
     21     14     38      1
     21     17      7     30
     21     23     35      6
     21     25     35      2
     21     26     32     11
     21     31      7     26
     21     34     28     11
     21     38     22     15
     21     38     28      5
     21     46     22      1
     21     47     17     10
     21     49     17      6
     21     50     16      5
     21     55      5      2
     22      1     30     23
     22      7      6     33
     22      7     24     27
     22     11     36     15
     22     17     36     13
     22     19     24     25
     22     35     12     25
     22     35     30     11
     22     37     24     17
     22     47     24      3
     22     53      6     13
     22     55     12      5

==============================

Will Jagy
  • 139,541
  • and my $c$ could have been $(-2,0,1)$, $(-2,0,-1)$, $(2,0,-1)$ or maybe even another triple. – MaximusFastidiousIrreverence Dec 26 '19 at 00:19
  • 1
    @AmateurMathPirate I don't immediately see how to do this using quaternions. Given that the norm $w^2 + 2 x^2 + 3 y^2 + 6 z^2$ appeared in your set of solutions, perhaps there is a way; the obstacle I see is that we cannot write $7$ as $2x^2 + 3 y^3 + 6 z^2 ; . ; ; $ Still, you would need only very simple programming skills to duplicate the list I made, and a fairly straightforward programming language. – Will Jagy Dec 26 '19 at 00:51
  • there probably is a way with quaternions and I'd love to see it. – MaximusFastidiousIrreverence Dec 26 '19 at 14:49
0

Above equation shown below:

$x_1^2+2x_2^2+3x_3^2=7y_1^2 \tag{1}$

"OP" & Will Jagy gave four variable solution to equation $(1)$

There is a one variable solution & is given below:

$x_1=(7k^2+8k-35)$

$x_2=(k+1)(k+13)$

$x_3=2(k^2-7k+1)$

$y_1=3(k^2+5)$

For, $k=0$ we get:

$(x_1,x_2,x_3,y_1)=(35,13,2,15)$

Sam
  • 1
  • "OP"? Yes I answered my own question after figuring out what I did wrong. Your answer has a permanent even $x_3$. If you look at Will Jagy's answers, you will see that all four variables exhibit both parities. I've been working on another solution which would show all (primitive) solutions at least contained in its output. I've come to realize it may take at least two parameterizations. Perhaps you can help me find them. – MaximusFastidiousIrreverence Jan 03 '20 at 01:38
0

[Too long for a comment…]

Did you solve to this point? \begin{align} x_1 &= \frac{4g^2v^2-12ghuv-12ghmv-8g^2mv+9h^2u^2+18h^2mu+12ghmu-3h^2m^2-2g^2m^2}{ 2\left(2gv-3hu-3hm-2gm\right)}, \\[0.75em] x_2 &= \frac{4g^2v^2-12ghuv+4g^2mv+9h^2u^2-6ghmu+3h^2m^2-6ghm^2-2g^2m^2}{2\left(2gv-3hu-3hm-2gm\right)}, \\[0.75em] x_3 &= \frac{4g^2v^2-12ghuv+4ghmv+9h^2u^2-6h^2mu-3h^2m^2-4ghm^2+2g^2m^2}{2\left(2gv-3hu-3hm-2gm\right)}, \\[0.75em] y_1 &= \frac{4g^2v^2-12ghuv+9h^2u^2+3h^2m^2+2g^2m^2}{2\left(2gv-3hu-3hm-2gm\right)} \end{align}

It’s a rational [not-necessarily-integral] parameterization, but evidently allows different parities for the $x_i$. If you could absorb the denominator into the numerators, you’d have what you want!

Kieren MacMillan
  • 7,889
  • 2
  • 28
  • 70