The Circle Method

18 minute read

Published:

We use the circle method to count solutions to linear Diophantine equations.

This post is dedicated to my girlfriend, who suggested I study the circle method. The exposition is loosely based on A’Campo’s undergraduate thesis.

The Statement

Throughout, we fix a sequence \((a_1,\ldots,a_s)\) of positive integers, and we will be interested in the solutions to the equation \[a_1x_1+\cdots+a_sx_s=N,\] where \(N\) is a fixed positive integer. To avoid a distracting discussion of divisibility, we assume \(\gcd(a_1,\ldots,a_s)=1\) throughout.

Definition. For a positive integer sequence \((a_1,\ldots,a_s)\) and a positive integer \(N\), define \[R_a(N):=\#\left\{(x_1,\ldots,x_s)\in\mathbb Z_{\ge0}^s:a_1x_1+\cdots+a_sx_s=N\right\}.\]

Theorem. Let \((a_1,\ldots,a_s)\) be a sequence of positive integers for which \(\gcd(a_1,\ldots,a_s)=1\). Then for positive integers \(N\), we have \[R_a(N)\sim\frac{N^{s-1}}{(s-1)!a_1\cdots a_s}\] as \(N\to\infty\).

It is tricky (but possible) to prove Theorem by a direct combinatorial argument; for example, this has been done by Cimpoeas and Nicolae. We will provide two proofs using complex analysis (Theorem and Theorem). For context (and later use), here are some quickly achievable special cases.

Example. When \(s=1\), we have the positive integer sequence \((1)\). Then Theorem asserts that \(R_{(1)}(N)\sim1\). Of course, \(R_{(1)}(N)=1\) in this case.

Example. When \(s=2\), we have a positive integer sequence \((a,b)\) where \(\gcd(a,b)=1\), and Theorem asserts that \(R_{(a,b)}(N)\sim\frac1{ab}\cdot N\). Let’s show this directly: given \(ax+by=N\), we see \(by\equiv N\pmod a\), so \(y\pmod a\) is uniquely determined to be equivalent to some \(r_{a,b}(N)\in\{0,1,\ldots,a-1\}\). Now, for each \(y\in[0,N/b]\) satisfying \(y\equiv r_{a,b}(N)\pmod a\), there is a unique \(x\) for which \(ax+by=N\). Thus, \(R_{(a,b)}(N)\) equals \[1+\left\lfloor\frac{\lfloor N/b\rfloor-r_{a,b}(N)}{a}\right\rfloor=\frac N{ab}+O(1).\]

Example. When \(a_1=\cdots=a_s=1\), Theorem asserts \(R_a(N)\sim\frac1{(s-1)!}\cdot N^{s-1}\). Let’s show this directly: in fact, we claim \(R_a(N)=\binom{N+s-1}{s-1}\). Indeed, lay down \(N+s-1\) blanks and place down \(s-1\) bars in the blanks; also place a bar before and after all the blanks. The distances between the bars gives a sequence \((x_1,\ldots,x_s)\) satisfying \(x_1+\cdots+x_s=N\), and such sequences are in bijection with bar arrangements.

Remark. Theorem implies that any sufficiently large positive integer \(N\) is a nonnegative integer linear combination of the \(a_\bullet\)s. Taking differences, we find \(a_1\mathbb Z+\cdots+a_s\mathbb Z=\mathbb Z\). Let’s show this last claim directly: let \(g\) be the smallest positive integer in \(a_1\mathbb Z+\cdots+a_s\mathbb Z\), and it is enough (by taking multiples) to show \(g=1\). Because \(\gcd(a_1,\ldots,a_s)=1\), it is enough to show \(g\mid a_k\) for each \(k\). Well, note \(a_k-mg\in a_1\mathbb Z+\cdots+a_k\mathbb Z\) for any \(m\). For a carefully chosen \(m\), one can achieve \(a_k-mg\in[0,g-1]\), so \(a_k-mg=0\) by minimality of \(g\), so \(g\mid a_k\).

Remark. When \(a_k\ge2\) for each \(k\), it is an interesting problem to compute the largest positive integer which is not a nonnegative integer linear combination of the \(a_\bullet\)s, even when \(s=3\).

Before continuing with the post, let’s set some notation.

  • Fix a sequence \(a=(a_1,\ldots,a_s)\) of positive integers for which \(\gcd(a_1,\ldots,a_s)=1\). Also define \(A:=\operatorname{lcm}(a_1,\ldots,a_s)\).
  • The number \(N\) is always a (large) positive integer.
  • Define \(R_a(N)\) to be the number of nonnegative integral solutions to \(a_1x_1+\cdots+a_sx_s=N\).
  • Define the generating function \(f(z):=1/(1-z)\) and its truncation \(f_N(z):=\left(1-z^{2N}\right)/(1-z)\).
  • Define the generating function \(f_a(z):=\prod_kf(z^{a_k})\) and its truncation \(f_{a,N}(z):=\prod_kf_{N}(z^{a_k})\).
  • Define \(e\colon\mathbb C\to\mathbb C\) by \(e(z):=\exp(2\pi iz)\).
  • For \(x\in\mathbb R\), let \(\lVert x\rVert\) denote the distance between \(x\) and the nearest integer.
  • The number \(\varepsilon\) is a real number in \((0,1/2A)\).
  • The major arc is \(\mathfrak M_\varepsilon:=[-\varepsilon,\varepsilon]\). The minor arc is \(\mathfrak m_\varepsilon:=[-1/2,1/2]\setminus\mathfrak M_\varepsilon\).
  • For \(b\in\mathbb Z/A\mathbb Z\), define \(\mathfrak m_{b,\varepsilon}:=(b/A+\mathfrak M_\varepsilon)\cap[-1/2,1/2]\). Then define \(\mathfrak m’_{\varepsilon}:=\mathfrak m_\varepsilon\setminus\bigcup_b\mathfrak m_{b,\varepsilon}\).

Generating Functions

To crystallize some of the ideas, we prove Theorem in a way which circumvents some of the technicalities of the circle method. This argument is taken from Wilf’s generatingfunctionology.

Complex analysis enters analytic number theory via generating functions. In short, a generating function is a usually well-behaved (e.g., meromorphic) function whose coefficients encode interesting (e.g., arithmetic) information. Here is the function relevant to our story.

Definition. Define \(f(z):=1/(1-z)\). For a positive integer sequence \((a_1,\ldots,a_s)\), define \[f_a(z):=\prod_{k=1}^sf\left(z^{a_k}\right).\]

Lemma. For a positive integer sequence \((a_1,\ldots,a_s)\), we have \[f_a(z)=\sum_{N=0}^\infty R_a(N)z^N.\] This is an equality of holomorphic functions on the open disk \(\left|z\right|<1\).

Proof. This follows by directly expanding \[f_a(z)=\Bigg(\sum_{x_1=0}^\infty z^{a_1x_1}\Bigg)\cdots\Bigg(\sum_{x_s=0}^\infty z^{a_sx_s}\Bigg)\] via the geometric series. (The geometric series converge absolutely when \(\left|z\right|<1\).) The direct expansion (e.g., as a Cauchy product) continues to converge absolutely, so we may rearrange to prove the lemma. \(\blacksquare\)

Thus, we are interested in the coefficients of the power series \(f_a(z)\). Roughly speaking, the growth rate of the coefficients is controlled by pole behavior.

Example. By combining Example with Lemma, we see that \[\frac1{(1-z)^s}=\sum_{N=0}^\infty\binom{N+s-1}{s-1}z^N,\] and \(\binom{N+s-1}{s-1}\sim\frac1{(s-1)!}\cdot N^{s-1}\). More generally, if \(\alpha\) has \(\left|\alpha\right|=1\), then the power series expansion \[\frac1{(1-\alpha z)^s}=\sum_{N=0}^\infty\binom{N+s-1}{s-1}\alpha^Nz^N\] has coefficients which are \(O(N^{s-1})\).

We are thus motivated to understand something about the poles of the rational function \(f_a(z)\). This will be done using a partial fraction decomposition.

Lemma. Let \(a(X)/q(X)\) be a rational function in \(\mathbb C(X)\). Suppose we may factor \(q(X)\) as \(\prod_k(1-X/\alpha_k)^{n_k}\) where the \(\alpha_\bullet\)s are distinct and nonzero. Then there is a decomposition \[\frac{a(X)}{q(X)}=a_0(X)+\sum_k\Bigg(\sum_{n=1}^{n_k}\frac{c_{\alpha_k,n}}{(1-X/\alpha_k)^{n}}\Bigg),\] where \(a_0(X)\) is a polynomial, and the \(c_{\alpha_k,n}\)s are constants.

Proof. Let’s start by reducing to the case where \(q(X)\) has only one root. Namely, if \(q_1(X)\) and \(q_2(X)\) are coprime polynomials in \(\mathbb C[X]\), then any polynomial \(a(X)\) admits a decomposition \[\frac{a(X)}{q_1(X)q_2(X)}=\frac{a_1(X)}{q_1(X)}+\frac{a_2(X)}{q_2(X)}\] for some polynomials \(a_1(X)\) and \(a_2(X)\). Indeed, upon clearing fractions, this amounts to solving \(a(X)=a_1(X)q_2(X)+a_2(X)q_1(X)\), which is possible because \(q_1(X)\mathbb C[X]+q_2(X)\mathbb C[X]=\mathbb C[X]\). For example, one should use that \(\mathbb C[X]\) is a principal ideal domain here.

Thus, the factorization of \(q(X)\) allows us to assume that \(q(X)\) has the form \((1-X/\alpha)^n\). By rescaling \(X\), we may assume that \(q(X)=(1+X)^n\). By shifting \(X\), we may assume that \(q(X)=X^n\). Then we may write \[\frac{a(X)}{X^n}=a_n(X)+\sum_{k=0}^{n-1}\frac{a_k}{X^{n-k}},\] where \(a_n(X)\) is a polynomial and \(a_kX^k\) is a monomial in \(a(X)\). \(\blacksquare\)

We are now ready to prove Theorem with an explicit error term.

Theorem. Let \((a_1,\ldots,a_s)\) be a sequence of positive integers for which \(\gcd(a_1,\ldots,a_s)=1\). Then for positive integers \(N\), we have \[R_a(N)=\frac{N^{s-1}}{(s-1)!a_1\cdots a_s}+O_a\left(N^{s-2}\right).\]

Proof. By Lemma, we are interested in the growth rate of the coefficients of the power series of \(f_a(z)\). By Lemma, \(f_a(z)\) can be written as \[f_a(z)=p(z)+\sum_\alpha\Bigg(\sum_{n=1}^{\operatorname{ord}_\alpha(f_a)}\frac{c_{\alpha,n}}{(1-z/\alpha)^n}\Bigg),\] where \(p(z)\) is some polynomial, the \(\alpha\)s vary over the poles of \(f_a\) (where \(\operatorname{ord}_\alpha(f_a)\) is the order of the pole), and the \(c_{\alpha,n}\)s are some coefficients. (Note zero is not a pole.) Here are some remarks on these poles.

  • All poles occur at roots of unity. Indeed, the poles of \(f_a(z)\) correspond to roots of \(1-z^{a_k}\) as \(k\) varies.
  • There is a pole at \(\alpha=1\) of order \(s\). Indeed, for each \(k\), we see \(1-z^{a_k}\) has a zero at \(z=1\) of order one.
  • All other poles \(\alpha\) have smaller order. Indeed, for each \(k\), each root of \(1-z^{a_k}\) occurs with multiplicity one, so the total multiplicity is at most \(s\). Furthermore, equality holds only if \(\alpha\) is a root of \(1-z^{a_k}\) for each \(k\), and then \(\alpha^{a_k}=1\) for each \(k\). By taking linear combinations of the \(a_k\)s, we find that \(\alpha=1\). (See Example. Only here we use \(\gcd(a_1,\ldots,a_s)=1\).)

We now plug in our partial fraction decomposition into Example: the pole of order \(s\) at \(1\) contributes a main term of \(\frac{c_{1,s}}{(s-1)!}\cdot N^{s-1}\), and all other poles contribute error terms of order \(O_a\left(N^{s-2}\right)\). Thus, by Lemma, \[R_a(N)=\frac{c_{1,s}N^{s-1}}{(s-1)!}+O_a\left(N^{s-2}\right).\] It remains to compute the constant \(c_{1,s}\). By construction, \(c_{1,s}\) is the limit of \((1-z)^sf_a(z)\) as \(z\to1\). This limit expands out as a product of the limits \[\left(\lim_{z\to1}\frac{1-z^{a_k}}{1-z}\right)^{-1}=a_k^{-1}\] as \(k\) varies. Thus, \(c_{1,s}=1/(a_1\cdots a_s)\), and the theorem follows. \(\blacksquare\)

Remark. A careful examination of the proof shows that the restriction of \(R_a(N)\) to any residue class in \(\mathbb Z/A\mathbb Z\) is a polynomial. (Recall \(A=\operatorname{lcm}(a_1,\ldots,a_s)\).) Indeed, this follows once we expand out the contributions of the error terms from the partial fraction decomposition; the point is that \(f_a(z)\) has all its poles located at \(A\)th roots of unity.

The Circle Method

We now introduce the circle method. The idea is to use Cauchy’s integral formula to compute the coefficients of the power series \(f_a(z)\). Indeed, by Lemma, we see that \[R_a(N)=\frac1{2\pi i}\oint_\gamma\frac{f_a(z)}{z^{N+1}}\,dz,\] where \(\gamma\) is a small counterclockwise loop around \(0\). It will be convenient to integrate over \(\{z\in\mathbb C:\left|z\right|=1\}\), so we truncate \(f_a(z)\) to make it entire.

Definition. Define \(f_N(z):=\left(1-z^{2N}\right)/(1-z)\). For a positive integer sequence \((a_1,\ldots,a_s)\), define \[f_{a,N}(z):=\prod_{k=1}^sf_N\left(z^{a_k}\right).\]

One could truncate differently; for example, one could take the product over \(f_{AN/a_k}(z^{a_k})\). This choice will not matter very much.

Lemma. For a positive integer sequence \((a_1,\ldots,a_s)\) and positive integer \(N\), \[R_a(N)=\int_{\mathbb R/\mathbb Z}f_{a,N}(e(x))e(-Nx)\,dx.\]

Proof. Exactly as in Lemma, we see that \(R_a(N)\) is the coefficient of \(z^N\) in the Taylor expansion of \(f_{a,N}(z)\) around \(z=0\). Thus, the Cauchy integral formula gives \[R_a(N)=\frac1{2\pi i}\oint_\gamma\frac{f_{a,N}(z)}{z^{N+1}}\,dz,\] The lemma now follows by letting \(\gamma\colon[0,1]\to\mathbb C\) be the loop \(\gamma(x):=e(x)\), where we recall here that \(e(x)=\exp(2\pi ix)\). \(\blacksquare\)

We are now in a position to discuss the circle method. The idea is to estimate the integral \[\int_{\mathbb R/\mathbb Z}f_{a,N}(e(x))e(-Nx)\,dx\] directly. In short, the exponential sum \(f_{a,N}(e(x))\) is expected to exhibit large cancellation for generic \(x\).

To be precise, it will turn out to be the case that our main term arises from \(x\) being close to the rational \(0\), and we will be able to throw everything else in the integral into an error term. Thus, the values \(x\) close to \(0\) is called the “major arc,” and everything else is called a “minor arc.” Let’s be explicit about these arcs.

Definition. Fix a real parameter \(\varepsilon\in(0,1/2A)\). Then the major arc \(\mathfrak M_{\varepsilon}\) is the interval \(\left[-\varepsilon,\varepsilon\right]\). The minor arc \(\mathfrak m_{\varepsilon}\) is the complement \([-1/2,1/2]\setminus\mathfrak M_{\varepsilon}\).

The Minor Arc

Because it is a little easier, we start by estimating the minor arcs. The following rigorizes the idea that \(f_N\) exhibits cancellation away from rationals.

Lemma. For \(x\in\mathbb R\), \[f_N(e(x))\lesssim\min\left\{N,\frac1{\lVert x\rVert}\right\}.\]

Proof. The left bound by \(N\) holds by expanding \(f_N(e(x))\) as a geometric sum, so it only remains to show the right bound. By periodicity, we may assume \(x\in[-1/2,1/2]\), and by symmetry, we may assume \(x\in[0,1/2]\); then we want to show \(f_N(e(x))\lesssim\lVert x\rVert^{-1}\). Note \[f_N(e(x))=\frac{1-e(2Nx)}{1-e(x)}.\] The numerator has absolute value at most \(2\), and \(\left|1-e(x)\right|=2\left|\sin\pi x\right|\), so \(\left|f_N(e(x))\right|\le\left|\sin\pi x\right|^{-1}\). The lemma thus follows from the estimate \(\left|\sin\pi x\right|\ge2\left|x\right|\), which one can see (for example) by the concavity of \(\left|\sin\pi x\right|\). \(\blacksquare\)

Remark. We will use the following estimate twice, so we give it here: for \(s\ge3\), we claim \[\int_{[-\varepsilon,\varepsilon]}\min\left\{N,\frac1{\left|t\right|}\right\}^{s-1}\,dt\stackrel?\lesssim_\varepsilon N^{s-2}.\] For \(\left|t\right|\le1/N\), the minimum yields \(N\), so the integral is \(\lesssim N^{s-2}\). For \(\left|t\right|\ge1/N\), the minimum yields \(1/\left|t\right|\), so the integral is \(\lesssim N^{s-2}\). Combining the two bounds completes the proof. While we’re here, we note that we can even bound the integral when \(s=2\) as \(\lesssim_\varepsilon\log N\), due to the integral over \(1/\left|t\right|\).

Recall we set \(A=\operatorname{lcm}(a_1,\ldots,a_s)\). Lemma basically implies that the factors of \(f_{a,N}(e(x))\) should exhibit cancellation when \(a_kx\) is far from an integer for each \(k\). We thus divide our minor arc estimates into two regimes depending on if \(Ax\) is close to an integer or not.

Definition. Fix a real parameter \(\varepsilon\in(0,1/2A)\). For \(b\in\mathbb Z/A\mathbb Z\), define \[\mathfrak m_{b,\varepsilon}:=\left(\frac bA+\mathfrak M_{\varepsilon}\right)\cap[-1/2,1/2].\] For example, \(\mathfrak m_{0,\varepsilon}=\mathfrak M_\varepsilon\). Define \(\mathfrak m’_{\varepsilon}\) to be the complement \(\mathfrak m\setminus\bigcup_b\mathfrak m_{b,\varepsilon}\).

Lemma. For a positive integer sequence \((a_1,\ldots,a_s)\), \[\int_{\mathfrak m_\varepsilon’}f_{a,N}(e(x))e(-Nx)\,dx\lesssim_{a,\varepsilon}1.\]

Proof. The length of \(\mathfrak m_{\varepsilon}’\) is less than one, so it is enough to show that \(f_{a,N}(e(x))\lesssim_{a,\varepsilon}1\) for \(x\in\mathfrak m_{\varepsilon}’\). By taking a product, it is enough to show that \(f_N(e(a_kx))\lesssim_{a,\varepsilon}1\) for each \(k\) and \(x\in\mathfrak m_{\varepsilon}’\). By Lemma, it is enough to show that \[\lVert a_kx\rVert\stackrel?\ge a_k\varepsilon\] for each \(k\) and \(x\in\mathfrak m_{\varepsilon}’\). Well, we proceed by contraposition: suppose that we have an integer \(b\) for which \(\left|a_kx-b\right| < a_k\varepsilon\). Then \(x\in\mathfrak m_{bA/a_k,\varepsilon}\), so \(x\notin\mathfrak m_\varepsilon’\). \(\blacksquare\)

Lemma. Suppose \(s\ge3\). For a positive integer sequence \((a_1,\ldots,a_s)\) such that \(\gcd(a_1,\ldots,a_s)=1\) and nonzero \(b\in\mathbb Z/A\mathbb Z\), \[\int_{\mathfrak m_{b,\varepsilon}}f_{a,N}(e(x))e(-Nx)\,dx\lesssim_{a,\varepsilon} N^{s-2}.\]

Proof. We are going to bound the integral over \(\left|f_{a,N}(e(x))\right|\) using Lemma. Let’s start by bounding the individual \(f_{N}(e(a_kx))\)s. There are two cases.

  • If \(a_kb\) is equivalent to some nonzero residue \(r\pmod A\), then \(a_kx\pmod{\mathbb Z}\) is a distance of at most \(a_k\varepsilon\) from \(r/A\), so \(\lVert a_kx\rVert\gtrsim_{a,\varepsilon}1\). Thus, by Lemma, \(f_N(e(a_kx))\lesssim_{a,\varepsilon}1\).
  • Suppose \(a_kb\equiv0\pmod A\). Then set \(t:=x-b/A\), and now Lemma grants \(f_N(e(a_kx))\) admits the bound \[f_N(e(a_kt))\lesssim\min\left\{N,\frac1{\lVert t\rVert}\right\}.\]

Quickly, observe that the first case must occur for at least one \(k\): indeed, if \(a_kb\equiv0\) for all \(k\), then \(b\equiv0\) by taking linear combinations as in Example. Thus, the second case occurs at most \(s-1\) times, and we conclude \[\int_{\mathfrak m_{b,\varepsilon}}f_{a,N}(e(x))e(-Nx)\,dx\lesssim_{a,\varepsilon}\int_{[-\varepsilon,\varepsilon]}\min\left\{N,\frac1{\left|t\right|}\right\}^{s-1}\,dt.\] We are now done by Remark. \(\blacksquare\)

Remark. The difficulty of the estimate in Lemma stems from the intuition that \(f_{a,N}(e(x))\) is potentially large when \(x\) is close to a rational. Namely, we must work harder to exhibit cancellation; for example, this is the only part of the proof where we use \(\gcd(a_1,\ldots,a_s)=1\).

We now collect our estimates.

Proposition. Fix a real parameter \(\varepsilon\in(0,1/2A)\). Suppose \(s\ge3\). For a positive integer sequence \((a_1,\ldots,a_s)\) such that \(\gcd(a_1,\ldots,a_s)=1\), \[\int_{\mathfrak m_\varepsilon}f_{a,N}(e(x))e(-Nx)\,dx\lesssim_{a,\varepsilon} N^{s-2}.\]

Proof. Combine Lemma and Lemma. \(\blacksquare\)

Remark. Not all is lost at \(s=2\): an examination of the proof of Lemma gives an error of \(\log N\); see Remark.

The Major Arc

We now turn to the task of estimating the major arc. The idea is to pass from \(f_{a,N}\) to a more controlled function.

Lemma. For \(x\in[-1/2,1/2]\), \[f_N(e(x))=\frac{e(2Nx)-1}{2\pi ix}+O(1).\] At \(x=0\), the right-hand side is understood to be defined by continuity.

Proof. The difference between the two functions is \[(e(2Nx)-1)\left(\frac1{e(x)-1}-\frac1{2\pi ix}\right).\] We claim that the right-hand factor can be extended to a holomorphic function on the unit open disk around \(0\), which will complete the proof. Well, the only possible pole is at \(z=0\), where it is at worst simple. Thus, it is enough to show that the residue vanishes: the residue of \((e(x)-1)^{-1}-(2\pi ix)^{-1}\) at zero is \[\lim_{x\to0}\left(\frac{x}{e(x)-1}-\frac1{2\pi i}\right).\] This limit vanishes. \(\blacksquare\)

Proposition. Suppose \(s\ge3\). Fix a positive integer sequence \((a_1,\ldots,a_s)\). Then there is a constant \(c_a\) satisfying the following: for a positive integer \(N\) and real parameter \(\varepsilon\in(0,1/2A)\), \[\int_{\mathfrak M_\varepsilon}f_{a,N}(e(x))e(-Nx)\,dx=c_aN^{s-1}+O_{a,\varepsilon}\left(N^{s-2}\right).\]

Proof. For brevity, let the desired integral be \(I\). Recall \(f_{a,N}(z)=\prod_kf_N(z^{a_k})\), so Lemma implies \(f_{a,N}(e(x))\) is \[\prod_{k=1}^s\left(\frac{e(2a_kNx)-1}{2\pi ia_kx}+O(1)\right)=\prod_{k=1}^s\frac{e(2a_kNx)-1}{2\pi ia_kx}+O_a\left(\min\{N,1/\left|x\right|\}^{s-1}\right).\] Here, we have used Lemma to collect the error term. Integrating yields \[I=\frac1{a_1\cdots a_s}\int_{\mathfrak M_\varepsilon}e(-Nx)\prod_{k=1}^s\frac{e(2a_kNx)-1}{2\pi ix}\,dx+O_{a,\varepsilon}\left(N^{s-2}\right).\] (The error term comes from Remark.) For convenience, let’s extend the integral from \(\mathfrak M_\varepsilon\) to \(\mathbb R\). Indeed, the integrand is \(\lesssim\left|x\right|^{-s}\), which has \(\int_{\varepsilon}^\infty x^{-s}\,dx\lesssim_\varepsilon1\). Thus, \[I=\frac1{a_1\cdots a_s}\int_{\mathbb R}e(-Nx)\prod_{k=1}^s\frac{e(2a_kNx)-1}{2\pi ix}\,dx+O_{a,\varepsilon}\left(N^{s-2}\right).\] To remove the dependence of the integral on \(N\), we substitute \(x\mapsto x/N\), which gives \[I=\frac{N^{s-1}}{a_1\cdots a_s}\int_{\mathbb R}e(-x)\prod_{k=1}^s\frac{e(2a_kx)-1}{2\pi ix}\,dx+O_{a,\varepsilon}\left(N^{s-2}\right),\] as desired. \(\blacksquare\)

It remains to compute the constant \(c_a\), which the proof of Proposition reveals to be \[c_a=\frac1{a_1\cdots a_s}\int_{\mathbb R}e(-x)\prod_{k=1}^s\frac{e(2a_kx)-1}{2\pi ix}\,dx.\] The calculation of this integral is a little tricky, so we pass it off to a lemma.

Lemma. Fix a positive integer sequence \((a_1,\ldots,a_s)\). For \(s\ge2\), \[\int_{\mathbb R}e(-x)\prod_{k=1}^s\frac{e(2a_kx)-1}{2\pi ix}\,dx=\frac1{(s-1)!}.\]

Proof. Let the desired integral be \(I\). This is a fairly standard contour integral; for example, we will use the same tricks that one uses to compute \(\int_{\mathbb R}\frac{\sin x}x\,dx\). Indeed, we can basically reduce to that integral after fully expanding the product. Of course, such an expansion is not entirely legal because the functions \(e(bz)/z^s\) have a pole at \(z=0\). Thus, we adjust the contour to avoid \(z=0\).

Fix some large \(R>1\). Let \(\gamma_0(R)\) be the contour starting at \(-R\), following a straight line until \(-1\), following a semicircle in the upper-half plane until \(1\), and lastly continuing a straight line until \(R\). Because the integrand is holomorphic, we see \[I=\lim_{R\to\infty}\int_{\gamma_0(R)}e(-z)\prod_{k=1}^s\frac{e(2a_kz)-1}{2\pi iz}\,dz.\] We are now allowed to fully expand the product. Then we see that we are interested in integrals over functions which look like \(e(bz)/z^s\). Accordingly, we claim that \[\lim_{R\to\infty}\int_{\gamma_0(R)}\frac{e(bz)}{(2\pi iz)^s}\,dz\stackrel?=\begin{cases}0 & \text{if }b\ge0, \\-b^{s-1}/(s-1)! & \text{if }b<0.\end{cases}\] The lemma then follows by a full expansion of the product in \(I\). In particular, the only term in the expansion which contributes is \(\int e(-z)(-1)^s/(2\pi iz)^s\,dz\).

It remains to show the claim. We have two cases.

  • Suppose \(b\ge0\). Then \(\left|e(bz)\right|=\exp(-2\pi b\operatorname{Im}z)\), which is bounded when \(\operatorname{Im}z\) is lower-bounded. Accordingly, define \(\gamma_+(R)\) to be the counter-clockwise semicircle starting at \(R\) and ending at \(-R\), so the integral over \(\gamma_+(R)\) is \(o(1)\). (For example, one can use \(s\ge2\) here.) We conclude that the answer is \[\lim_{R\to\infty}\int_{\gamma_0(R)\cdot\gamma_+(R)}\frac{e(bz)}{(2\pi iz)^s}\,dz.\] The contour encloses no poles, so this integral vanishes by the Cauchy integral formula.
  • Suppose \(b<0\). By a symmetric argument to the previous point, we find that the answer is \[\lim_{R\to\infty}\int_{\gamma_0(R)\cdot\gamma_-(R)}\frac{e(bz)}{(2\pi iz)^s}\,dz,\] where \(\gamma_-(R)\) is the clockwise semicircle starting at \(R\) and ending at \(-R\). This contour encloses a single pole around \(z=0\). The Cauchy integral formula (or a power series expansion of \(e(bz)\)) reveals that this integral equals \(-b^{s-1}/(s-1)!\), where the \(-\) arises for orientation reasons. \(\blacksquare\)

Remark. Difficult integrals like this one occur frequently in applications of the circle method. They are known as “singular integrals.”

Proposition. Suppose \(s\ge3\). Fix a positive integer sequence \((a_1,\ldots,a_s)\). For a positive integer \(N\) and real parameter \(\varepsilon\in(0,1/2A)\), \[\int_{\mathfrak M_\varepsilon}f_{a,N}(e(x))e(-Nx)\,dx=\frac{N^{s-1}}{(s-1)!a_1\cdots a_s}+O_{a,\varepsilon}\left(N^{s-2}\right).\]

Proof. Combine (the proof of) Proposition with Lemma. \(\blacksquare\)

Remark. Once again, not all is lost at \(s=2\): the proof of Proposition gives an error of \(O_{a,\varepsilon}(\log N)\); see Remark.

Completion of the Proof

Combining the estimates on the major and minor arcs produces the theorem.

Theorem. Let \((a_1,\ldots,a_s)\) be a sequence of positive integers for which \(\gcd(a_1,\ldots,a_s)=1\). Suppose \(s\ge3\). Then for positive integers \(N\), we have \[R_a(N)=\frac{N^{s-1}}{(s-1)!a_1\cdots a_s}+O_a\left(N^{s-2}\right).\]

Proof. By Lemma, we pass to estimating the integral \[\int_{\mathbb R/\mathbb Z}f_{a,N}(e(x))e(-Nx)\,dx.\] Summing Proposition and Proposition (with any \(\varepsilon\in(0,1/2A)\)) gives the result. \(\blacksquare\)

Remark. At \(s=2\), using Remark and Remark shows the same asymptotic with the worse error term \(O_a(\log N)\).

Notably, this proves Theorem as soon as \(s\ge2\). Thus, we have a complete proof of Theorem once combined with Example.

Remark. The circle method performed worse than our earlier approach in Theorem; for example, the error term at \(s=2\) discussed in Remark is worse. Nonetheless, the circle method is a powerful tool in other problems where one has less control of the poles of the relevant generating function. For example, one can use the circle method to count solutions to Diophantine equations such as \[x_1^2+\cdots+x_s^2=N.\]

AI Disclosure. ChatGPT was used to locate technical errors. It also suggested various refinements of the estimates, which improved the error term in Theorem.