|
Part 2. Sums of Squares
I. Sums of two squares
1. Form: x2+y2 = zk
While integers a,b,c that satisfy a2+b2 = c2 are called Pythagorean triples, the ancient Babylonians already knew there were triangles whose sides satisfy that relationship more than a thousand years earlier. The famous tablet Plimpton 322 (pre-1500 BC, now kept in Columbia University) contains pairs of numbers in sexigesimal which can be seen as part of a Pythagorean triple. The largest pair is (18541, 12709) and a quick calculation shows that the difference of their squares is also a square, 185412-127092 = 135002. Quick for us using a calculator but the size of this example shows the Babylonians must have known of a method to generate solutions other than randomly scribbling figures in the sand. The smallest primitive solns (where a,b,c have no common factor) are: {3, 4, 5}, {5, 12, 13}, {7, 24, 25}, {8, 15, 17}, etc.
Theorem: “For primitive triples a2+b2 = c2, exactly,
1) one of a,b is odd, and c is always odd. 2) one of a,b is divisible by 3 and/or 4. 3) one of a,b,c is divisible by 5.”
which shows the importance of the triple {3,4,5}. Also, one can use a soln to generate others,
Theorem: “If a2+b2 = c2, then (a+2b+2c)2 + (2a+b+2c)2 = (2a+2b+3c)2.”
Starting with {a, b, c} = {±3, ±4, 5}, one can iteratively generate all primitive Pythagorean triples. (Barning, 1963; Roberts, 1977)
Note 1: It is said that given one primitive triple, the identity can generate three others. Strictly speaking, it’s four, since there are four possibilities, namely, {a,b,c}, {-a,b,c}, {a,-b,c}, {-a,-b,c}, though the last will generate a negative term. For example, using {a,b,c} = {±5, ±12, 13} yields {55, 48, 73}, {45, 28, 53}, {7, 24, 25}, {-3, 4, 5}. Note 2: It is possible the divisibility by 3,4,5 is contained in just one term, such as in the first term of (60v)2 + (900v2-1)2 = (900v2+1)2.
Theorem: “All odd numbers and multiples of 4 appear in a primitive Pythagorean triple.” Proof: This is easily proven using the identities:
(2m+1)2 + n2 = (n+1)2, where n = 2(m2+m) (4m)2 + n2 = (n+2)2, where n = 4m2-1 Theorem: The complete non-trivial soln to x12+x22 = y12, with a scaling factor t, is given by,
((a2-b2)t)2 + (2abt)2 = ((a2+b2)t)2
Proof: For any soln xi where x1 ≠ y1, one can always find rational {a,b,t} using the formulas: {a,b,t} = {x1+y1, x2, (-x1+y1)/(2x22)}. In general, one can completely solve x12+x22+...+ xn2 = y12. See Sums of Three Squares.
The unscaled soln to Pythagorean triples was already known by the classical Greek mathematicians. But the Babylonians and Greeks didn’t know about complex numbers which makes it easy for us to identically solve x2+y2 = zk for any positive integer k, though for k > 2, it is not necessarily the complete soln. For example, when k = 3, the method yields, with a rational scaling factor u,
(a3-3ab2)2u6 + (3a2b-b3)2u6 = (a2+b2)3u6
but does not always cover the alternative soln with scaling factor v,
(a3+ab2)2v6 + (a2b+b3)2v6 = (a2+b2)3v6 This will be discussed more in Sums of Two Squares, as well as the similar equation a2+b2 = cn+dn. More generally for other k, given the expansion of the complex number (a+bi)k = A+Bi where {A,B} are polynomials in terms of {a,b}, and i = Ö-1, then,
A2+B2 = (a2+b2)k
Similarly, for the case of four squares equal to an nth power, one can use quaternions. Given the expansion of the quaternion (a+bi+cj+dk)n = A+Bi+Cj+Dk, then,
A2+B2+C2+D2 = (a2+b2+c2+d2)n
though there is an easier method to be discussed later. One can also solve the equation A2+B2 = (a2+b2)k by factoring over Ö-1 to get,
(A+Bi)(A-Bi) = (a+bi)k(a-bi)k
Equating factors yields a system of two equations in two unknowns A,B which, being only linear, can then easily be solved for. This yields,
A = (pk+qk)/2, B = -(pk-qk)i/2,
where {p,q} = {a+bi, a-bi} and B, after simplification, is a real value. This technique of equating factors will prove useful for similar equations.
Update (6/17/09): It has come to my attention that Pythagorean triples {x2-y2, 2xy, x2+y2} can be used in the form,
(x2-y2)k + (2xy)k + (x2+y2)k = 2(x8+14x4y4+y8)k/4, for k = 4,8
Now, the expression x8+14x4y4+y8 is no ordinary polynomial. Equated to zero, it is in fact the octahedral equation, involved in the projective geometry of the octahedron. It also appears in a formula for the beautiful j-function j(τ) in terms of the Dedekind eta function η(τ) as,
j(τ) = 16(x8+14x4+1)3/(x5-x)4
where x = 2η2(τ) η4(4τ) / η6(2τ)
If you have Mathematica, you can easily verify this, say, for the particular value of d = (1+Sqrt[-163])/2 which conveniently yields an integer,
j(d) = -6403203 = N[16(x8+14x4+1)3/(x5-x)4 /. x → 2*DedekindEta[d]2 DedekindEta[4d]4 / DedekindEta[2d]6 /. d → (1+Sqrt[-163])/2, 100]
Why Pythagorean triples, when expressed in a certain manner, spell out the octahedral equation, I do not know. (End note.)
Update (10/11/09): Pythagorean triples also appear in the equation x2 = -1 where x, instead of the imaginary unit, is to be a quaternion. To recall, given the expansion of (a+bi+cj+dk)n = A+Bi+Cj+Dk, then,
A2+B2+C2+D2 = (a2+b2+c2+d2)n
In a Mathematica add-on package, this object is given as Quaternion[a,b,c,d] and one can use NonCommutativeMultiply to multiply them, and for the case n = 2, we get,
Quaternion[a,b,c,d] ** Quaternion[a,b,c,d] = Quaternion[a2-b2-c2-d2, 2ab, 2ac, 2ad] (eq.1)
One can note two immediate consequences. First, as expected, (a2-b2-c2-d2)2 + (2ab)2 + (2ac)2 + (2ad)2 = (a2+b2+c2+d2)2. Second, while the Fundamental Theorem of Algebra states that an nth degree univariate equation with complex coefficients has n complex roots, this does not apply when the roots are quaternions. For example, the nth roots of plus/minus unity or, xn = ±1 have n complex solns. But if x is to be a quaternion, then there can be an infinite number of them. Let n = 2 and take the negative case: x2 = -1. Thus, we wish (eq.1) to have the product: Quaternion[-1,0,0,0]. Since the {a,b,c,d} are to be real, then a = 0, and {b,c,d} should satisfy,
b2+c2+d2 = 1
which have an infinite number of real and rational solns, a subset of which is d = 0 and {b,c} as rationalized Pythagorean triples. (If c = d = 0, then the only soln is b = ±1 in which case the quaternion reduces to the imaginary unit.) This will also be discussed in the section on Sums of Three Squares. Of course, the most general setting for solving x2 = -1 would be x as the octonions, where the coefficients of the non-real part would have to satisfy the sum of seven squares,
y12+y22+y32+y42+y52+y62+y72 = 1
(End update.) Other solns for Pythagorean triples are,
Euler
(x+1/x)2 + (y+1/y)2 = z2
{x,y} = {4p/(p2-1), (3p2+1)/(p3+3p)}
and,
x2(y2-1)2 + y2(x2-1)2 = r2
{x,y} = {4p/(p2+1), (3p2-1)/(p3-3p)}
with a very similar soln to the previous and which is useful in making {x2+y2, x2+z2, y2+z2} all squares, or the Euler Brick Problem, to be discussed more in the section on Simultaneous Polynomials. Another by Euler is,
(a2+b2)2 + (b2+d2)2 = (b2+8c2+d2)2, where d = (b2+3c2)/(2c), and a2-b2 = 10c2
The conditional eqn can be solved as {a,b,c} = {u2+10v2, u2-10v2, 2uv}. This can be generalized as (Piezas),
(a2+b2)2 + (b2+d2)2 = (b2+pc2+d2)2, where d = (b2+qc2)/(2c), and a2-(n-1)b2 = n(n2+1)c2, with {p,q} = {2n2, n2-1} for any n. (Euler’s was n = 2.)
Another approach is to use the parametrization for Pythagorean triples in the form,
(a2+b2)2 + (c2+d2)2 = (p2+q2)2
where {a,b,p,q}= {u2-v2-w2, 2uv, u2+v2+w2, 2uw}, and conditional eqn, c2+d2 = 4uw(u2+v2+w2) .
One soln to the conditional eqn is to let {v,w} = {e/(2u), u}, and it becomes c2+d2 = e2+8u4 which can easily solved as discussed in the Section on x2+y2 = z2+ntk. Q: Any other soln to (a2+b2)2 + (c2+d2)2 = e2?
Update (6/20/09): After this author posted the question in sci.math, Dave Rusin gave a very elegant five-parameter soln. He notes that one way to approach the problem is to treat the legs (each of which are sums of two squares) as the product of two sums of two squares since we know that,
(x1x3+x2x4)2 + (x1x4-x2x3)2 = (x12+x22)(x32+x42)
Thus we get, ((x12+x22)(x32+x42))2 + (2(y12+y22)(y32+y42))2 = ((y12+y22)2 + (y32+y42)2)2 and, after some clever manipulation of some eqns describing a 5-dimensional projective variety over Q, gave the soln as, {x1, x2, x3, x4} = {2de, d2+z, d2-z, 2(a2+b2-c2)d} {y1, y2, y3, y4} = {4acd, 4bcd, d2-z, 2(a2+b2+c2)d} where z = (a2+b2)2+6(a2+b2)c2+c4-e2 for five free parameters {a,b,c,d,e}. (Nice.) Incidentally, the related form, ((u12-u22)(u32-u42))2 + (2(v12-v22)(v32-v42))2 = ((v12-v22)2 + (v32-v42)2)2 has soln, {u1, u2, u3, u4} = {2de, d2-z2, d2+z2, 2(a2-b2-c2)d} {v1, v2, v3, v4} = {4acd, 4bcd, d2+z2, 2(a2-b2+c2)d} where z2 = (a2-b2)2+6(a2-b2)c2+c4-e2 for five free parameters {a,b,c,d,e}. (End note.) Given a triangle with legs as consecutive integers {p, p+1}, then a second can be found,
Theorem: “If p2 + (p+1)2 = r2, then q2 + (q+1)2 = (p+q+r+1)2, where q = 3p+2r+1.” (Fermat)
Update (6/24/09): Maurice Mischler pointed out that all integer solns to the triple (p, p+1, r) is given by,
((x-1)/2)2 + ((x+1)/2)2 = y2
where {x,y} satisfy the Pell equation x2-2y2 = -1. Since x is always odd, then terms are integers. (End note).
Update (7/2/09): Adam Bailey gave a variant of the complete soln to a2+b2 = c2 as,
(p+2)2r2 + (2/p+2)2r2 = (p+2/p+2)2r2 where r is a scaling factor, since for any {a,b,c} > 0, one can always find rational {p,r} using the formulas {p,r} = {-(a+b-c)/(a-c), 2/(a+b-c). Thus, this shows that the complete soln to a2+b2 = c2, as well as Binet's complete one for a3+b3+c3 = d3, is expressible (with a scaling factor) in just n-1 parameters, where n is the degree of the equation. (End note).
One can also find solutions to x2+y2 = z2 using the equation p2+q2 = r2+s2 and vice-versa,
Fibonacci
(ad+be)2 + (ae-bd)2 = (dc)2 + (ec)2, if a2+b2 = c2
Correspondingly,
P. Volpicelli
(ac+bd)2 + (ad-bc)2 = (a2+b2)2, if a2+b2 = c2+d2
A. Fleck
(a2c-b2c+2abd)2 + (a2d-b2d-2abc)2 = (a2+b2)3, if a2+b2 = c2+d2
The solns by Volpicelli and Fleck suggest a generalization can be found for all positive integer k. Using a variation of the technique introduced earlier, assume,
A2+B2 = (a2+b2)g(c2+d2)h
and equating factors,
A+Bi = (a+bi)g(c+di)h, A-Bi = (a-bi)g(c-di)h
call this as System 1, then solving for A,B can give a soln to,
A2+B2 = (a2+b2)g+h
where A,B are polynomials in {a,b,c,d} with the constraint a2+b2 = c2+d2 (call this eq.1). Thus, for k = g+h = 4,
(ac3-3bc2d-3acd2+bd3)2 + (bc3+3ac2d-3bcd2-ad3)2 = (a2+b2)4, if a2+b2 = c2+d2
and so on for all k. In Volpicelli’s soln, if we let {c,d} = {a, ±b}, then we get either the usual formula for Pythagorean triples or, after removing common factors, a tautology. But if we solve for {a,b,c,d} in eq.1 using Euler’s complete soln,
(pr+qs)2 + (ps-qr)2 = (pr-qs)2 + (ps+qr)2
(a form to be discussed later) and plus the fact that for non-negative integers g,h, there are k+1 ways to get the sum g+h = k, this gives the more general result.
Theorem (Piezas): “Let F := (p2+q2)(r2+s2). Then Fk (for k > 0) is identically the sum of two squares in k+1 ways.”
Proof: It is well known Fk for k = 1 is a sum of two squares via the Brahmagupta-Fibonacci Two-Squares Identity. In fact, Euler’s soln for (eq.1) is just this in disguise since,
(pr+qs)2 + (ps-qr)2 = (pr-qs)2 + (ps+qr)2 = (p2+q2)(r2+s2)
thus easily proving that for k = 1, there are indeed two ways to express Fk as the sum of two squares. However, for k >1, there are not just one, but k+1 corresponding identities. To prove this, since one is to solve,
A2+B2 = (a2+b2)g(c2+d2)h
where A,B are polynomials in {a,b,c,d}, the solns are dependent on the particular values of the exponents g,h chosen. And there are k+1 ways such that g+h = k. Since a2+b2 = c2+d2, then,
A2+B2 = (a2+b2)g+h
and by Euler’s soln {a,b} = {pr+qs, ps-qr}, then
A2+B2 = ((p2+q2)(r2+s2))g+h = Fk
in k+1 ways. (End proof) For example, for F3 let exponents {g,h} of the factors be in turn {0,3}, {1,2}, {2,1}, {3,0}. Solving for A,B in System 1, these yield the four identities,
{A1, B1} = {c(c2-3d2), d(3c2-d2)} {A2, B2} = {ac2-2bcd-ad2, bc2+2acd-bd2} {A3, B3} = {a2c-2abd-b2c, a2d+2abc-b2d} {A4, B4} = {a(a2-3b2), b(3a2-b2)}
where {a,b,c,d} = {pr+qs, ps-qr, pr-qs, ps+qr}. To give a numerical example, let {p,q,r,s} = {1, 2, -2, 3} so (p2+q2)(r2+s2) = 65. These then yield {Ai, Bi} as {488, 191}, {140, 505}, {320, 415}, {524, 7} such that A2+B2 = 653. And so on for other k, for arbitrary {p,q,r,s}. An interesting variant to Pythagorean triples is x2+y3 = z4:
H. Mathieu
(q2(p2-2))2 + (2q2)3 = (pq)4, if p2-2q2 = 1
((p4-p2)/2)2 + p6 = (pq)4, if p2-2q2 = -1
Solns can be given by the nth triangular number (n2+n)/2 that is also a square and depends on solving the above Pell equation. Note that solving n in (n2+n)/2 = y2 for rational n entails making its discriminant a square 1+8y2 = x2, or equivalently, x2-2(2y)2 = 1. More generally though,
Piezas
(4q2d4(p2-2))2 + (4q2d3)3 = (2pqd2)4, if p2-dq2 = 1
(4p2d3(p2-1))2 + (2pd)6 = (2pqd2)4, if p2-dq2 = -1
thus it is not just limited to triangular numbers. Another variant is x4+y3 = z2:
K. Brown
p4 + (q2-1)3 = (q3+3q)2, if p2-3q2 = 1
(See Brown’s “Miscellaneous Diophantine Equations”.)
More generally,
p4 + (dq2-1)3 = d(dq3+3q)2, if p2-3dq2 = 1
|