6

This is a question that I have already asked on HSM stackexchange, and I decided to ask it again here because it is more mathematical than historic (to make a conclusion in this question one needs more mathematical then historical understanding). In p. 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 ($x$ in Gauss's formula and $q$ in Jacobi's formula). Gauss's formulas are the following identities on the 4th power of the theta function:

$(\sum_{-\infty}^\infty q^{{n^2}})^4 = (\sum_{-\infty}^\infty (-1)^n q^{{n^2}})^4 + (\sum_{-\infty}^\infty q^{{(2n - 1)^2/4}})^4 = 1 + 8\sum_{1\le m} \frac {{mq^m}}{{1 - (-1)^{m + 1}q^m}} = 1 + \sum_{1 \le m}\hat \sigma (k)q^k$

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

In the same passage from Gauss's nachlass (Werke, volume 3, p. 444-445, passage [9]) in which he writes down Jacobi's identity, and just before this identity, Gauss also writes down $\mathbb{log}(\vartheta_3^4(x))$ as:

$$\mathbb{log}((1+2x+2x^4+2x^9+\cdots)^4) = 8\cdot (\frac{x}{1+x}+\frac{x^3}{3(1+x^3)}+\frac{x^5}{5(1+x^5)}+\cdots)$$,

(actually he writes down the series for $\frac{1}{2}\mathbb{log}(\vartheta_3(x))$, but it is equivalent to what I wrote). Immediately after writing down several identities on the fourth powers of Jacobi theta functions $p,q,r$, Gauss proceeds and writes a differential equation satisfied by new variables $t,u$ (defined by : $t = \frac{1}{p^2}, u = \frac{1}{q^2}$) and their first, second and third derivatives (of $t,u$).

Since I'm unfamiliar with the theory of modular forms, I'm unable to see how Gauss arrived at this identity for $\mathbb{log}(\vartheta_3^4(x))$, nor I'm able to see how one can find the series developement of $\vartheta_3^4(x)$ from that of $\mathbb{log}(\vartheta_3^4(x))$. But maybe some of the mathematicians here who are familiar with modular forms can see the connection.

Update (July 23, 2022)

The identity for $\mathbb{log}(\vartheta_3(x))$ can be derived on the basis of Jacobi triple product indentity; it is essensially an expansion of the logarithm into a linear combination of Lambert series by transforming the logarithm of the infinite product form of the theta function (which is a special case of Jacobi triple product) into an infinite sum of logarithms. A detailed derivation of it can be found in this post.

But I believe the key to uncover the infinite series for $\vartheta^4_3(x)$ from that of $\mathbb{log}(\vartheta^4_3(x))$ is the differential equation Gauss writes at the end of passage 9 - he defines $t = \frac{1}{p^2}, u = \frac{1}{q^2}$ where $p = \vartheta_3(x), q = \vartheta_4(x)$ and then writes down several relations, and one of them is: $$\frac{u}{t}-\frac{t}{u}=2x(tu'-ut')$$ Rewriting it in terms of $p,q,r$, one gets: $$\frac{p^2}{q^2}-\frac{q^2}{p^2}=2x(tu'-ut')\implies \frac{p^4-q^4}{p^2q^2}=2x(tu'-ut')\implies p^4-q^4 = 2p^2q^2x(tu'-ut') \implies r^4 = \frac{2x}{tu}(tu'-ut')\implies r^4 = 2x(\frac{u'}{u}-\frac{t'}{t})\implies r^4 = 2x(\mathbb{log}'(u) - \mathbb{log}'(t))\implies r^4 = x\mathbb{log'}(\frac{u^2}{t^2}) = x\mathbb{log}'(\frac{p^4}{q^4})$$

I dont know how to prove this differential equation, but this development shows that it connects the logarithm of ratio of theta functions with the fourth power of another theta function ($r$), so this might be the original method Gauss used to arrive at the series for $\vartheta^4_3(x)$. In addition, since $q(x) = p(-x)$, the right side of the last equation, which is $$x(\mathbb{log}'(p(x)^4)-\mathbb{log}'(q(x)^4)) = x(\mathbb{log}'(p(x)^4)-\mathbb{log}'(p(-x)^4))$$, can be calculated on the basis of the series expansion for $\mathbb{log}(p(x))$. This produces Jacobi's identity for the generating function of $r^4(x)$. However, I still dont know how to derive the series for $p^4,q^4$, nor I am able to prove the differential equation stated by Gauss.

user2554
  • 1,228
  • My question is very historical in nature but requires deep mathematical understanding in order to answer it (i'm doing a historical project on C.F Gauss). In other words, my question can be reformulated as: does the derivation of the identities of Gauss imply that Gauss possesed the critical techniques for proving the four squares theorem? and in addition was Gauss aware of the interpretation of his results on theta functions as being related to the sum of squares function? – user2554 Dec 22 '17 at 12:52
  • Thus to answer we need to write down the sketch proof and techniques. Do you have some of them ? And it is clear Gauss knew $(\sum_n q^{n^2})^2 =1+4 \sum_k q^k \sum_{d | k} \chi_4(d)$ (Fermat two square theorem) – reuns Dec 22 '17 at 14:04
  • I know how to deduce from Gauss's identity: $(\sum_{-\infty}^\infty q^{{n^2}})^4 = 1 + 8\sum_{1\le m} \frac {{mq^m}}{{1 - (-1)^{m + 1}q^m}}$ the specific form of Jacobi's theorem - $r_4(k) = 8\sigma(k)$ or $24\sigma(k)$, depends if k is odd or even (by using elementary number theoretic demonstrations) . But i have no idea how to derive this identity; according to what i've read, it's derived from the advanced mathematical theories of elliptic functions, theta functions and modular forms. – user2554 Dec 22 '17 at 14:25
  • To make the deduction, one simply needs to notice that the sum is actually a double sum $\sum_{n = 1}^\infty n (\sum _{k = 1}^\infty (-1)^{(k+1)(n+1)}q^{kn})$ , a result of expansion in a geometric series. – user2554 Dec 22 '17 at 14:31
  • For the method using that both sides are modular forms $\in M_2(\Gamma_0(4))$, see p.33 here – reuns Dec 22 '17 at 14:34
  • Ok i saw the book and it's very advanced for me. Just a question - how page 33 is connected to my question? – user2554 Dec 22 '17 at 15:06

3 Answers3

4

Gauss knew a whole lot about theta functions and their modular properties. But his ideas regarding these functions were published posthumously. You can find a detailed description of the development done by Gauss in the famous paper of David Cox titled AGM of Gauss.

2

After a lot of efforts and much help from many users (notably Paramanand Singh), I think I finally have the essential steps for reconstructing Gauss's proof of Jacobi's four squares theorem. His proof might be identical with Jacobi's proof (I did not dig into Jacobi's Fundamenta Nova, so I am not sure of that).

Gauss's starting point was an identity like:

$$q^4 = 4x \frac{d}{dx}(\mathbb{log}(\frac{r}{p}))$$

which is stated in many places in his writings and is one of the essential ingredients of the proof. It can proved via the theory of elliptic integrals and elliptic functions, with a (partial) outline of it given in Paramanand Singh's answer to this question. The second essential ingredient is Jacobi's triple product identity (also discovered and proved by Gauss around 1808), which enables to write down the following identities:

$$p(x)=\prod_{n=1}^{\infty}(1-x^{2n})(1+x^{2n-1})^2$$ $$r(x) = 2x^{1/4}\prod_{n=1}^{\infty}(1-x^{2n})(1+x^{2n})(1+x^{2n-2})$$

Put this identities in the logarithmic derivative identity for $q^4$ and get:

$$q^4(x)=4x\frac{d}{dx}\mathbb{log}(2x^{1/4}\prod_{n=1}^{\infty}\frac{(1+x^{2n})(1+x^{2n-2})}{(1+x^{2n-1})^2}) = 4x\frac{d}{dx}\mathbb{log}(2x^{1/4}\cdot 2\prod_{n=1}^{\infty}(\frac{1+x^{2n}}{1+x^{2n-1}})^2) = 1+4x\cdot 2(\sum_{n=1}^{\infty}\frac{(2n)x^{2n-1}}{1+x^{2n}}-\sum_{n=1}^{\infty}\frac{(2n-1)x^{2n-2}}{1+x^{2n-1}}) = 1+8(\sum_{n=1}^{\infty}\frac{(2n)x^{2n}}{1+x^{2n}}-\sum_{n=1}^{\infty}\frac{(2n-1)x^{2n-1}}{1+x^{2n-1}}) = 1+8\sum_{n=1}^{\infty}\frac{(-1)^n n x^n}{1+x^n}$$

To get $p^4$ from the power series of $q^4$ one has to replace $x$ with $-x$ in the series of $q^4$, and so we get:

$$p^4(x) = 1+8\sum_{n=1}^{\infty}\frac{n x^n}{1+(-1)^n x^n} $$

which is the central identity behind Jacobi's four squares theorem. I am not exactly sure this was his proof but I gained the impression that he used these methods or equivalent ones (perhaps with another route to move between different theta identities).

I added here a pic of a page from a posthumous notebook of Gauss (Handbuch 6), which seems to point directly to the derivation presented here (the upper part of this deals with lemniscatic functions and is not related to what written here).

enter image description here

user2554
  • 1,228
  • +1 there. I was looking at the image of Gauss notebook and I think there Gauss uses the identity $R^4=16\sum_{n\geq 0}\frac{(2n+1)x^{2n+1}}{1-x^{4n+2}}$ directly and then uses it to write in the form $4x\frac{d}{dx}\log(P/Q)$. – Paramanand Singh Jan 04 '25 at 17:07
  • I am not sure how Gauss got the series for $R^4$ mentioned in the image. Jacobi gets this identity by using Fourier series for elliptic function $\text{sn} (u, k) $. – Paramanand Singh Jan 04 '25 at 17:10
  • @ParamanandSingh - I had this doubt too. But keep in mind this was a private notebook of Gauss (handbuch 6), so he probably simply recorded some of his recent results in a sketchy form; I do not claim this page to contain a well written derivation of Jacobi's four squares theorem. I included this page since it is the only place where all the essential ingredients of a proof are contained - the identity with the logarithmic derivative and conversion of infinite products into infinite series (probably via Jacobi triple product identity) - albeit in a reverse form (as you mentioned). – user2554 Jan 04 '25 at 17:27
  • I also checked Jacobi's proof of four square theorem in his Fundamenta Nova. He derived it using infinite product of $\text{cn} (u, k) $ and taking its logarithmic derivative. Most proofs of Jacobi are heavily dependent on his development of elliptic functions. – Paramanand Singh Jan 04 '25 at 18:12
  • Looking at various proofs of Jacobi four square theorem (proofs by Jacobi, Gauss, Ramanujan), I think that the simplest version is the one by Gauss (given in your answer) because it involves least amount of work. One needs some idea of elliptic integrals and theta functions. No prior knowledge of elliptic functions is required. – Paramanand Singh Jan 04 '25 at 18:37
  • Your remark is interesting, since according to what I understood, proof of the identity $R^4 = 4x\frac{d}{dx}\mathbb{log}(P/Q)$ requires the bulk of elliptic integrals theory. Are you aware of an elementary derivation of it? – user2554 Jan 04 '25 at 18:55
  • I am not aware of any direct elementary proof, but the amount of elliptic integrals and theta function theory needed for the proof is not too much. In particular I wrote two blog posts on theta functions and a blog post on relation between elliptic integrals and arithmetic-geometric mean. That's all we need here (one also needs Jacobi triple product and Legendre's identity). But yes sorting all that out into a neat proof requires effort. But I would still consider that smaller compared to elliptic functions. – Paramanand Singh Jan 04 '25 at 19:03
  • I finally found an elementary (but long) derivation which uses nothing but Jacobi triple product formula. Let me know if I should add that as another answer. – Paramanand Singh Jan 07 '25 at 09:29
  • @ParamanandSingh - I am very interested to read this derivation! and of course you can add that as another answer (you don't need my permission for that...). – user2554 Jan 07 '25 at 10:50
1

Using this thread we get the identity $$p^2(x)=1+4\sum_{n\geq 1}\frac{x^n}{1+x^{2n}}\tag{1}$$ Next let us use Ramanujan's technique (Jacobi also used the same technique in his Fundamenta Nova, but I am not sure if Ramanujan ever read this book of Jacobi) of squaring the above identity using algebraic manipulation. The proof below is borrowed from an exposition by G. H. Hardy in his book Ramanujan: Twelve lectures on subjects suggested by his life and work.

Ramanujan proves a more general identity $$\left(\frac{1}{4}\cot\frac{\theta}{2}+\sum_{n\geq 1}\frac{x^n}{1-x^n}\sin n\theta\right) ^2=\frac{1}{16}\cot^2\frac{\theta}{2}+\sum_{n\geq 1}\frac{x^n}{(1-x^n)^2}\cos n\theta+\frac{1}{2}\sum_{n\geq 1}\frac{nx^n}{1-x^n}(1-\cos n\theta) \tag{2}$$ He starts his proof with a formula for summing cosines of angles in arithmetic progression $$2(\cos\theta+\cos 2\theta+\dots+\cos(n-1)\theta)=\frac{2\cos(n\theta/2)\sin((n-1)\theta/2)}{\sin(\theta/2)}$$ Rewriting the numerator of right hand side as $$\sin((n-(1/2))\theta)-\sin(\theta/2)=\sin n\theta\cos\frac{\theta} {2}-\cos n\theta\sin\frac{\theta} {2}-\sin\frac{\theta}{2}$$ we get after a little algebra $$\cot\frac{\theta} {2}\sin n\theta=1+2\cos\theta+2\cos 2\theta+\dots+2\cos(n-1)\theta+\cos n\theta\tag{3}$$ Next let us write $u_n=x^n/(1-x^n)$ to simplify typing and let $S$ denote the left hand side of equation $(2)$ so that \begin{align} S&=\left(\frac {1}{4}\cot\frac{\theta}{2}+\sum_{n\geq 1}u_n\sin n\theta\right) ^2\notag\\ &=\frac{1}{16}\cot^2\frac{\theta}{2}+\frac{1}{2}\cot\frac{\theta}{2}\sum_{n\geq 1}u_n\sin n\theta+\left(\sum_{n\geq 1}u_n\sin n\theta\right) ^2\notag \\ &=\frac{1}{16}\cot^2\frac{\theta}{2}+T_1+T_2\text{ (say)} \notag \end{align} where using $(3)$ we can write $T_1$ in terms of cosines as $$T_1=\sum_{n\geq 1}u_n\left(\frac {1}{2}+\cos\theta+\cos 2\theta+\dots+\cos(n-1)\theta+\frac {1}{2}\cos n\theta\right) \tag{4}$$ and $T_2$ can also be expressed as sum of cosines as \begin{align} T_2&=\sum_{m\geq 1}u_m\sin m\theta\sum_{n\geq 1}u_n\sin n\theta\notag\\ &=\frac{1}{2}\sum_{m\geq 1}\sum_{n\geq 1}(\cos(m-n) \theta-\cos(m+n) \theta) u_mu_n\notag \end{align} and thus $T_1+T_2$ can be arranged in terms of cosines as $$T_1+T_2=\sum_{k\geq 0}C_k\cos k\theta$$ Now contribution to $C_0$ from $T_1$ is $(1/2)\sum _{n} u_n$ and from $T_2$ the contribution is $(1/2)\sum_{n} u_n^2$ and therefore \begin{align} C_0&=\frac{1}{2}\sum_{n\geq 1}u_n(1+u_n)\notag\\ &=\frac{1}{2}\sum_{n\geq 1}\frac{x^n}{(1-x^n)^2}\notag\\ &=\frac{1}{2}\sum_{n\geq 1}\sum_{m\geq 1}mx^{mn}\notag\\ &=\frac{1}{2}\sum_{m\geq 1}\frac{mx^m}{1-x^m}\notag\\ &=\frac{1}{2}\sum_{n\geq 1}nu_n\notag \end{align} For $k>0$ the part of $C_k$ coming from $T_1$ is $$\frac{1}{2}u_k+\sum_{m>k} u_m=\frac{1}{2}u_k+\sum_{l\geq 1}u_{k+l}$$ and the part of $C_k$ coming from $T_2$ is $$\frac{1}{2}\sum_{m-n=k}u_mu_n+\frac{1}{2}\sum_{n-m=k}u_mu_n-\frac{1}{2}\sum_{m+n=k}u_mu_n=\sum_{l\geq 1}u_lu_{k+l} - \frac{1}{2}\sum_{l=1}^{k-1}u_lu_{k-l} $$ Therefore for $k>0$ we have \begin{align} C_k&=\frac{1}{2}u_k+\sum_{l\geq 1}u_{k+l}+\sum_{l\geq 1}u_lu_{k+l} - \frac{1}{2}\sum_{l=1}^{k-1}u_lu_{k-l}\notag\\ &=\frac{1}{2}u_k+\sum_{l\geq 1}u_{k+l}(1+u_l) - \frac{1}{2}\sum_{l=1}^{k-1}u_lu_{k-l}\notag\\ &= \frac{1}{2}u_k+\sum_{l\geq 1}u_k(u_l-u_{k+l}) - \frac{1}{2}\sum_{l=1}^{k-1}u_k(1+u_l+u_{k-l})\notag\\ &=u_k\left(\frac{1}{2}+\sum_{l\geq 1}(u_l-u_{k+l})-\frac{1}{2}\sum_{l=1}^{k-1}(1+u_l+u_{k-l})\right)\notag\\ &=u_k\left(\frac{1}{2}+u_1+u_2+\dots+u_k-\frac{k-1}{2}-(u_1+u_2+\dots+u_{k-1})\right) \notag\\ &=u_k\left(1+u_k-\frac{k}{2}\right)\notag \end{align} The crucial part of the above proof are the easily verifiable (but slightly non-obvious) identities $$u_{k+l} (1+u_l)=u_k(u_l-u_{k+l}), u_lu_{k-l} =u_k(1+u_l+u_{k-l}) $$ Finally putting all pieces together we get \begin{align} S&=\left (\frac{1}{4}\cot \frac{\theta} {2}+\sum_{n\geq 1}u_n\sin n\theta\right) ^2\notag\\ &=\frac{1}{16}\cot^2\frac{\theta}{2}+\frac{1}{2}\sum_{n\geq 1}nu_n+\sum_{k\geq 1}u_k\left(1+u_k-\frac{k}{2}\right)\cos k\theta\notag\\ &=\frac{1}{16}\cot^2\frac{\theta}{2}+\sum_{n\geq 1}u_n(1+u_n)\cos n\theta+\frac{1}{2}\sum_{n\geq 1}nu_n(1-\cos n\theta) \notag\\ &= \frac{1}{16}\cot^2\frac{\theta}{2}+\sum_{n\geq 1}\frac{x^n}{(1-x^n)^2}\cos n\theta +\frac{1}{2}\sum_{n\geq 1}\frac{nx^n}{1-x^n}(1-\cos n\theta) \notag \end{align} and the proof of identity $(2)$ is complete.

Putting $\theta=\pi/2$ in $(2)$ we get the left hand side $S$ as $$S=\left(\frac{1}{4}+\sum_{n\geq 1}(-1)^{n-1}\frac{x^{2n-1}}{1-x^{2n-1}}\right)^2$$ Next we need to observe that $$\sum_{n\geq 1}(-1)^{n-1}\frac{x^{2n-1}}{1-x^{2n-1}}=\sum_{n\geq 1}(-1)^{n-1}\sum_{m\geq 1}x^{m(2n-1)}=\sum_{m\geq 1}x^m\sum_{n\geq 1}(-x^{2m})^{n-1}=\sum_{m\geq 1}\frac{x^m}{1+x^{2m}}$$ so that $$S=\left(\frac{1}{4}+\sum_{n\geq 1}\frac{x^n}{1+x^{2n}}\right)^2$$ For $\theta=\pi/2$ the right hand side of $(2)$ is $$\frac{1}{16}+\sum_{n\geq 1}(-1)^n\frac{x^{2n}}{(1-x^{2n})^2}+\frac{1}{2}\sum_{n\geq 1}(2n-1)u_{2n-1}+2\sum_{n\geq 1}(2n-1)u_{4n-2}$$ The second term in above expression can be rewritten as $$\sum_{n\geq 1}(-1)^n\sum_{m\geq 1}mx^{2mn}=\sum_{m\geq 1}m\sum_{n\geq 1}(-x^{2m})^n=-\sum_{m\geq 1}\frac{mx^{2m}}{1+x^{2m}}=-\sum_{m\geq 1}\left(\frac{mx^{2m}}{1-x^{2m}}-\frac{2mx^{4m}}{1-x^{4m}}\right)$$ which is same as $$-\sum_{n\geq 1}(2n-1)u_{4n-2}$$ so that right hand side of $(2)$ becomes $$ \frac{1}{16}+\frac{1}{2}\sum_{n\geq 1}(2n-1)u_{2n-1}+\frac{1}{2}\sum_{n\geq 1}(4n-2)u_{4n-2}=\frac{1}{16}+\frac{1}{2}\sum_{n\geq 1}\frac{(2n-1)x^{2n-1}}{1-x^{2n-1}}+\frac{1}{2}\sum_{n\geq 1} \frac{2nx^{2n}}{1+x^{2n}}=\frac{1}{16}+\frac{1}{2}\sum_{n\geq 1}\frac{nx^n}{1+(-x)^n}$$ Thus identity $(2)$ for $\theta=\pi/2$ gives us $$p^4(x)=1+8\sum_{n\geq 1}\frac{nx^n} {1+(-x)^n}$$ which is Jacobi's four squares theorem.