All natural number solutions to the equation $a^2+b^2=c^2+d^2=2x^2$

algebra-precalculusdiophantine equationselementary-number-theorysums-of-squares

Yesterday, I posted this question, and got that if $a$, $b$ and $c$ are in the form $$a=k(m^2-n^2+2mn)$$
$$b=k(n^2-m^2+2mn)$$
$$c=k(m^2+n^2)$$ where $m$ and $n$ are natural numbers, $a$, $b$ and $c$ will satisfy the equation $$a^2+b^2=2c^2$$ Also every $a$, $b$ and $c$ satisfying this equation could be written in terms of $m$ and $n$ as in the three equations mentioned above.

Now, is it possible to write $a$, $b$, $c$, $d$ and $x$ of the equation $$a^2+b^2=c^2+d^2=2x^2$$ to be written in terms of some other variable as for the $a^2+b^2=2c^2$ equation?

So, I need a set of equations for which I can plug in any natural numbers and generate $a$, $b$, $c$, $d$ and $x$ which satisfies my equation. And every natural numbers $a$, $b$, $c$, $d$ and $x$ satisfying my equation should satisfy the set of equations.

When I tried, I didn't see any clear way to do it as there is two equal symbols.

I would like to get the proof with the answer. (Otherwise I won't know if every pairs of number satisfying the equation will satisfy the set of equations in the answer.)

If you don't get the answer, any comment that helps to give an insight to solving the problem is also really appreciated.

Best Answer

Here is an approach to generate solutions where all the terms in each individual sum of square are relatively prime. It's not a direct formula, but an algorithm that uses Pythagorean triples as inputs. We can, of course, generate the Pythagorean triples from the well-known formula.

Begin with two primitive Pythagorean triples. Here I will use

$3^2+4^2=5^2$

$5^2+12^2=13^2$

We multiply these together, using the Brahmagupta-Fibonacci identity on the left side:

$(3×5+4×12)^2+(3×12-4×5)%2=5^2×13^2$

$63^2+16^2=65^2$

Now we get a second solution by going back to our original triples and rewriting obe of them in reverse order:

$3^2+4^2=5^2$

$\color{blue}{12^2+5^2=13^2}$

Now with the Brahmagupta-Fibonacci identity our product relation is

$(3×12+4×5)^2+(3×5-4×12)^2=5^2×13^2$

$56^2+33^2=65^2$

Putting these results together we now have

$63^2+16^2=56^2+33^2=65^2.$

To get twice a square we then replace $a^2+b^2$ with its doubled value $(a+b)^2+(a-b)^2$, and so with the $3-4-5$ and $5-12-13$ triples as inputs we end with

$\color{blue}{79^2+47^2=89^2+23^2=2×65^2}.$

$6241+2209=7921+529=8450☆$

These are the relatively prime combinations with $x=65$, but there are more solutions where the component squares have a common factor. Go back to our Pythagorean triples and replace one with its $c^2+0^2=c^2$ form, keeping its hypotenuse the same as in the original triple. If, in the pair we are considering, we replace $3^2+4^2$ with $5^2+0^2$, we get:

$\color{blue}{5^2+0^2=5^2}$

$5^2+12^2=13^2$

Hence

$(5×5)^2+(5×12)^2=5^2×13^2$

$25^2+60^2=65^2$

$\color{blue}{85^2+35^2=2×65^2}$

Similarly, keeping $3^2+4^2$ but replacing $5^2+12^2$ with $13^2+0^2$ will yield

$\color{blue}{91^2+13^2=2×65^2}$

Thus ultimately, we get all the following for $x=65$:

$\color{blue}{79^2+47^2=85^2+35^2=89^2+23^2=91^2+13^2=2×65^2}.$

The reader can verify that all members if this equation equal $8450$.

It might be noted that while this approach is attractive for giving solutions, it does not mean such solutions can be readily pieced together into a $3×3$ magic square of squares. The numbers generated in the above solution are much smaller than those that are now known to be required if such a square were to exist.