Solving quadratic Diophantine Equation $x_1^2+2x_2^2+3x_3^2=7y^2$. UPDATE: find all primitive solutions...
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$$
Solution 1:
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
?
Solution 2:
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!