# Did Gauss know Jacobi's four squares theorem?

In pp. 283–285 of volume 2 of Dickson's “history of the theory of numbers” appear several formulas of striking similarity: some of them are stated by Gauss (p. 283) and some are stated by Jacobi (p. 285); they are actually the same and only the notation differs ($$y$$ in Gauss's formula and $$q$$ in Jacobi's formula). Gauss's formulas are the following:

\begin{align} & (1 + 2y + 2y^4 + 2y^9 + \cdots + 2y^{n^2})^4 \\[6pt] = {} & (1 - 2y + 2y^4 - \cdots)^4 + (2y^{1/4} + 2y^{{9/4}} + 2y^{(2n - 1)^2/4})^4 \end{align}

and

\begin{align} & (1 + 2y + 2y^4 + 2y^9 + \cdots + 2y^{n^2})^4 \\[6pt] = {} & 1 + 8\left( \frac y {1 - y} + \frac{2y^2}{1 + y^2} + \frac{3y^3}{1 - y^3} + \cdots + \frac{ny^n}{1 + (-1)^n y^n} \right) \end{align}

The point is that the last equality means that the coefficients of the $$k$$th power in the right side of the last equality must be equal to $$r_4(k)$$ (number of representations of $$k$$ as sum of $$4$$ squares), and an additional interpretation (by certain manipulations) of the right side of the equality gives the result of Jacobi: $$r_4(k) = 8\sigma(k)$$ or $$24\sigma(k)$$, depends if $$k$$ is odd or even.

The only other reference for Gauss's result that i found in the english literature is in the "Sums of Squares" chapter of Ranjan Roy's book "Elliptic and Modular Functions from Gauss to Dedekind to Hecke" (chapter 15, p.386) where the author writes that:

Note that Gauss independently discovered (15.2) and (15.3); they were written without proof, and without explicit application to the sums of squares, in an undated manuscript published after his death.

(15.2) and (15.3) in this book are the identities mentioned before in this post. Reading what Ranjan Roy says, several questions arise:

• If Gauss didn't write down a proof of Jacobi's identity, why Ranjan Roy states that Gauss "independently discovered" Jacobi's identity? i mean - this is a general question on the authenticity of posthomous papers; in this case, how can we be sure that Gauss didn't simply copy Jacobi's identity after he saw his Fundamenta Nove from 1828? how is authenticity of an historical document confirmed?
• Looking again into Gauss's manuscript, i found out that in the commentary on it, the editor Schering states it was found in a notebook dated approximately to 1808, while there are no dates on the actual manuscripts. So, along the same lines like the first question, i'd like to know what is the degree of certainty in such "evaluations of dates".

In my opinion, when an already known result is discovered in a posthomous manuscript, and is not rigorously derived in this manuscript, the only way to argue in favour of an independent discovery of the author of the manuscript is to find new (previously unknown) results in the same direction in this manuscript.

So, for the completeness of the discussion, i must add another relevant reference. In the chapter "sum of four squares" of volume 2 of Dickson's work, at page 300, he mentions that the czech mathematician Karel Petr proved two formulas by Gauss (Werke, III,p. 476) on theta functions by the method outlined by Gauss. The point is that K. petr used those identities of Gauss to derive relations giving the number of representations of a number N by three quaternary quadratic forms: $$x^2 + y^2 + 9z^2 + 9u^2$$, $$x^2+y^2+z^2+9u^2$$, $$x^2+9y^2+9z^2+9u^2$$.

I mention this fact because in light of Karel Petr's results it seems that Gauss-Jacobi identity wasn't an isolated result by Gauss, but was part of a grand plan Gauss had for the subject of analysis, and theta functions, in particular. Unfortunately i'm far from being knowledgable enough in those matters, so i can't make a conclusion about how this additional result sheds light on Gauss's possible derivation of Jacobi's four sqaures theorem (and perhaps several additional arithmetical facts). So i'd like to know an expert opinion on this question.

• Your question would be more self-contained if you include some of the formulas you mention here only by page number. Also, the first sentence is not really necessary.
– KCd
Jul 5 '17 at 13:26
• i've included the formulas. Jul 5 '17 at 14:51
• You may have a look at the paper linked in this answer. Dec 13 '20 at 9:46
• It's spelled "posthumous". Dec 20 '20 at 6:50

I just wanted to summarize several useful facts about Gauss's notation and methodology which i infered from Gauss's original writings after a lot of effort (this doesn't constitute an answer to the title question).

Notation

In all of Gauss's posthomous papers on elliptic and theta function (which are notoriously difficult to read!) he employs several definitions:

• On p.440 of volume 3 of Gauss's werke, Gauss defines the infinite product $$\prod_{n=1}^{\infty}(1-x^n)$$ (in modern terminology this is called Euler function) and denotes it $$[x]$$. Gauss makes a lot of use of this infinite product.
• On p. 465 of this volume Gauss defines functions which are of essential importance for his theory, so he designates them with special symbols. The functions are:

$$P(x,y)=1+x(y+\frac{1}{y})+x^4(y^2+\frac{1}{y^2})+x^9(y^3+\frac{1}{y^3})+...$$ $$Q(x,y)= 1-x(y+\frac{1}{y})+x^4(y^2+\frac{1}{y^2})-x^9(y^3+\frac{1}{y^3})+...$$ $$R(x,y)=x^{\frac{1}{4}}(y^{\frac{1}{2}}+y^{-\frac{1}{2}})+x^{\frac{9}{4}}(y^{\frac{3}{2}}+y^{-\frac{3}{2}})+x^{\frac{25}{4}}(y^{\frac{5}{2}}+y^{-\frac{5}{2}})+...$$

These functions include the usual theta functions as special cases, for example:

$$P(x,1)=1+2x+2x^4+2x^9+...$$

Theorems discovered by Gauss

• On page 470 appears the most "general theorem" of Gauss (Gauss writes it's date of writing as August 6, 1827):

$$P(x,ty)\cdot P(x,\frac{y}{t}) = P(x^2,t^2)P(x^2,y^2) + R(x^2,t^2)R(x^2,y^2)$$

• On p. 471 Gauss defines:

$$P(x^3,1)=P , P(x,1)=p$$ $$Q(x^3,1)=Q , Q(x,1)=q$$ $$R(x^3,1)=R , R(x,1)= r$$

And on p. 476 appears the definitions $$P^0=P(x^{\frac{1}{3}},1), Q^0=Q(x^{\frac{1}{3}},1)$$ The identities mentioned in the posted question, which were used by Karel Petr for the determination of the number of times that certain quaternary quadratic forms represent a given integer $$n$$, appear in the same passage (article [10]) on p. 476:

$$(\frac{3P^2-P^0\cdot P^0}{2})^2= p^4-4(\frac {pqr}{2})^{\frac{4}{3}}$$ $$(\frac{3Q^2-Q^0\cdot Q^0}{2})^2=q^4+4(\frac{pqr}{2})^{\frac{4}{3}}$$

Significance of the remarks in passage [10]

I also had to write up also some very useful remarks by the editor of Gauss's analytic papers (Ludwig Schlesinger). On p.186 of Schlesinger's essay on Gauss's contributions to analysis, Schlesinger has the following things to say about this part of the posthomous paper:

... This is followed (article [7]) by the modular transformation of 7th order, and, on August 29, also the 5th order modular transformation. The passage in article [10] (p.476), where the general transformation of odd order is mentioned, is remarkable; so Gauss really has, as he writes to Schumacher, the theorem contained in the second letter of Jacobi... very easily derived from his own research on the transcendents. The article [12] relating to the theory of the modular function has already been discussed above.

That's all up to now. If anyone has useful comments on the meaning of the functions mentioned here, it will blessed!

The first formula of Gauss comes from the arithmetic-geometric mean (AGM) algorithm. More precisely, if we are given three numbers

$$a_1,b_1,c_1 \qquad \text{ such that }\qquad a_1^2=b_1^2+c_1^2\tag{1}$$

then define another such triple with

$$a_2 = (a_1+b_1)/2, \;\; b_2 = \sqrt{a_1\,b_1}, \;\; c_2 = (a_1-b_1)/2. \tag{2}$$

This process can be iterated to produce $$\,a_m,b_m,c_m\,$$ where $$\,m = 2^n.$$ This is the quadratic AGM studied by Gauss which can be parametrized using theta functions by

$$a_m = \theta_3(q^m)^2,\;\; b_m = \theta_4(q^m)^2, \;\; c_m = \theta_2(q^m)^2. \tag{3}$$

Thus, equation $$(1)$$ in terms of theta functions is $$\theta_3(q)^4 = \theta_4(q)^4 + \theta_2(q)^4. \tag{4}$$

The three $$q$$-series are the generating functions of OEIS sequences A000118, A096727, and A129588 respectively. See also OEIS sequence A008438. These $$q$$-series all have Lambert series expansions such as the one given for $$\,\theta_3(q)^4.\,$$

More details are in the David A. Cox article The Arithmetic-Geometric Mean of Gauss. Among which is that Gauss computed the AGM of $$\,1\,$$ and $$\,\sqrt{2}\,$$ in 1799.

The 98th entry, dated May 30, 1799, reads as follows:

We have established that the arithmetic-geometric mean between $$1$$ and $$\sqrt{2}$$ is $$\pi/\varpi$$ to the eleventh decimal place; the demonstation of this fact will surely open an entirely new field of analysis.

Cox also writes that

This algorithm first appeared in a paper of Lagrange, but it was Gauss who really discovered the amazing depth of this subject. Unfortunately, Gauss published little on the agM (his abbreviation for the arithmetic-geometric mean) during his lifetime. It was only with the publication of his collected works [12] between 1868 and 1927 that the full extent of his work became apparent.