What is the solution of the equation $x^2+y^2+z^2+t^2=w^2$ in polynomials over C ("Pythagorean 5-tuples")?

There are simple formulas describing Pythagorean n-tuples for n=3,4,6:

- n=3. The formula for solutions of $x^2+y^2=z^2$ [4]:

$x=d(p^2−q^2)$,

$y=2dpq$,

$z=d(p^2+q^2),$

where p,q,d are arbitrary polynomials.

- n=4. Similarly, all Pythagorean 4-tuples of polynomials are given by the identity [4, Theorem 2.2], [3, Theorem 7.1]:

$(p^2+q^2-r^2-s^2)^2+(2pr+2qs)^2+(2ps-2qr)^2=(p^2+q^2+r^2+s^2)^2$

- n=6. The following identity produces Pythagorean 6-tuples [3, Theorem 7.2]:

$(m^2-n^2)^2+(2mn)^2+(2(n_0m_1-m_1n_0+m_3n_2-m_2n_3))^2+$

$(2(n_0m_2-m_2n_0+m_1n_3-m_3n_1))^2+$

$(2(n_0m_3-m_3n_0+m_2n_1-m_1n_2))^2=(m^2+n^2)^2$

where $m=(m_1,m_2,m_3,m_4)$, $n=(n_1,n_2,n_3,n_4)$, and $mn$ is the usual scalar product.

These identities are somehow related to sl(2,R), sl(2,C), sl(2,H), but the case n=5 is missing in this description [3, Theorems 7.1 and 7.2].

The above formuli describe also Pythagorean n-tuples of *integers*. There are another descriptions of those; see [2] and [5, Chapter 5] for n<10, [6] for n<15, [1, Theorem 1 in Chapter 3] for arbitrary n, and also the answers below.

There are reasons to believe that Pythagorean 5-tuples cannot be described by a single polynomial identity. Thus identities producing a "large" set of solutions are also of interest, like $(-p^2+q^2+r^2+s^2)^2+(2pq)^2+(2pr)^2+(2ps)^2=(p^2+q^2+r^2+s^2)^2$

This identity does not give all solutions because it produces only reducible polynomials y,z,t (once p,q,r,s are nonconstant). Examples of solutions which cannot be obtained by the approaches in the answers below are also interesting.

Given a solution (x,y,z,t,w), methods to construct a new solution (x',y',z',t',w') are also of interest. For instance,

$x'=w+y+z$,

$y'=w+z+x$,

$z'=w+x+y$,

$t'=t$,

$w'=2w+x+y+z$

[see the answer of Ken Fan below for generalizations to other n] or

$x'+iy'+jz'+kt'=q(x+iy+jz+kt)q$,

where $q$ is arbitrary polynomial with quaternionic coefficients [see the answer of Geoff Robinson below].

--

[1] L.J. Mordell, Diophantine Equations, Academic Press, London, 1969

[2] D. Cass, P.J. Arpaia, MATRIX GENERATION OF PYTHAGOREAN n-TUPLES, Proc. AMS 109:1 (1990), 1-7

[3] J. Kocik, Clifford Algebras and Euclid’s Parametrization of Pythagorean Triples, Adv. Appl. Clifford Alg. 17:1 (2007), 71-93

[4] R. Dietz, J. Hoschek and B. Juttler, An algebraic approach to curves and surfaces on the sphere and on other quadrics, Computer Aided Geom. Design 10 (1993) 211-229

[5] V. Kac, Infinite-Dimensional Lie Algebras (3rd edn. ed.), CUP, 1990

[6] E. Vinberg, The groups of units of certain quadratic forms (Russian), Mat. Sbornik (N.S.) 87(129) (1972), 18–36

polynomialsandintegers. Most of the answers below refer to solutions in integers. The accepted answer provides the largest available set of solutions inpolynomials. $\endgroup$ – mikhail skopenkov May 7 '11 at 21:05