Academy
MathsNumber TheoryDirichletHyperbola Area and the Logarithm

Hyperbola Area and the Logarithm

The area under 1/x from 1 to n is log n. The number of lattice points under n/x is approximately n log n. The gap between the two is the deepest open problem in analytic number theory.

The area under the curve y=1/xy = 1/x from x=1x=1 to x=nx=n is lnn\ln n.

The number of lattice points under y=n/xy = n/x grows like nlnnn \ln n.

These two facts are related by a single scaling argument. And the gap between the curve and the lattice points is where one of the deepest unsolved problems in mathematics lives.


Area under the hyperbola

The curve xy=nxy = n, or equivalently y=n/xy = n/x, is a hyperbola. The area under it from x=1x=1 to x=nx=n (above y=0y=0) is:

1nnxdx=nlnn\int_1^n \frac{n}{x}\, dx = n \ln n

This is exact. The lattice point count D(n)=x=1nn/xD(n) = \sum_{x=1}^{n} \lfloor n/x \rfloor approximates this area, because n/x\lfloor n/x \rfloor is the height of the column of lattice points at position xx.

The approximation: D(n)nlnnD(n) \approx n \ln n.

How good is this approximation? That is the Dirichlet Divisor Problem — addressed in Dirichlet's Divisor Problem.


Why lnn\ln n appears from 1/x1/x

1n1xdx=lnn\int_1^n \frac{1}{x}\, dx = \ln n

This is the defining property of the natural logarithm. The hyperbola y=1/xy = 1/x is the unique curve whose area grows logarithmically.

Discrete version. The harmonic sum Hn=1+12+13++1nH_n = 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n} approximates lnn\ln n:

Hn=lnn+γ+O ⁣(1n)H_n = \ln n + \gamma + O\!\left(\frac{1}{n}\right)

where γ0.5772\gamma \approx 0.5772\ldots is the Euler-Mascheroni constant — the "gap" between the harmonic series and the logarithm.

This gap γ\gamma appears because the harmonic sum HnH_n is the area of unit-width rectangles of height 1/k1/k, while lnn\ln n is the smooth area. The rectangles overshoot by exactly γ\gamma in the limit.


The symmetry argument for area

The lattice point count using symmetry:

D(n)=2x=1mnxm2m=nD(n) = 2\sum_{x=1}^{m} \left\lfloor \frac{n}{x} \right\rfloor - m^2 \qquad m = \lfloor\sqrt{n}\rfloor

Geometrically: count all lattice points in the region xynxy \leq n, x,y1x,y \geq 1.

Split at the line x=y=nx = y = \sqrt{n}:

  • The region xnx \leq \sqrt{n} contains x=1mn/x\sum_{x=1}^{m} \lfloor n/x \rfloor points.
  • The region yny \leq \sqrt{n} contains the same by symmetry.
  • The square xnx \leq \sqrt{n}, yny \leq \sqrt{n} is counted twice — subtract m2m^2.

This mirrors how the area nlnnn\ln n can be computed as twice the area of the region xnx \leq \sqrt{n} minus the square of area nn (since n×n=n\sqrt{n} \times \sqrt{n} = n):

1nnxdx=n12lnn\int_1^{\sqrt{n}} \frac{n}{x}dx = n \cdot \frac{1}{2}\ln n

Doubling and subtracting the square gives nlnnnn\ln n - n — matching the lattice point formula structurally.


The error term

Define the error between the lattice count and the area approximation:

Δ(n)=D(n)nlnn(2γ1)n\Delta(n) = D(n) - n\ln n - (2\gamma - 1)n

Dirichlet proved Δ(n)=O(n)\Delta(n) = O(\sqrt{n}) — the error grows no faster than n\sqrt{n}.

The conjecture (still unproved): Δ(n)=O(n1/4+ε)\Delta(n) = O(n^{1/4+\varepsilon}) for any ε>0\varepsilon > 0.

The best known result (as of 2025): Δ(n)=O(n131/416)\Delta(n) = O(n^{131/416}), due to Huxley. The true exponent is somewhere between 1/41/4 and 131/416131/416.


Where γ\gamma comes from, concretely

x=1nnx=nlnn+(2γ1)n+O(n)\sum_{x=1}^{n} \left\lfloor \frac{n}{x} \right\rfloor = n\ln n + (2\gamma - 1)n + O(\sqrt{n})

The constant 2γ12\gamma - 1 appears because:

  • The smooth approximation gives nlnnn\ln n
  • The correction for replacing n/x\lfloor n/x \rfloor by n/xn/x introduces n-n (from the fractional parts summing to roughly n/2n/2 each in the positive and negative direction)
  • The Euler-Mascheroni constant γ\gamma enters through Hn=lnn+γ+H_n = \ln n + \gamma + \ldots

For JEE purposes: the key fact is D(n)nlnnD(n) \sim n\ln n, with a correction of order n\sqrt{n}.


Worked problems

Problem 1. Estimate k=11000τ(k)\displaystyle\sum_{k=1}^{1000} \tau(k).

D(1000)1000ln1000+(2γ1)10001000×6.908+0.1544×10007062D(1000) \approx 1000 \ln 1000 + (2\gamma-1) \cdot 1000 \approx 1000 \times 6.908 + 0.1544 \times 1000 \approx 7062.

Exact value: D(1000)=7069D(1000) = 7069. The approximation is off by 7 — error is O(1000)31O(\sqrt{1000}) \approx 31, well within bounds.

Problem 2. Prove that k=1nτ(k)nlnn/2\displaystyle\sum_{k=1}^{n} \tau(k) \geq n\ln n / 2 for all n1n \geq 1.

Since τ(k)2\tau(k) \geq 2 for all k2k \geq 2 and τ(1)=1\tau(1)=1... this is weaker than the asymptotic. Use the lattice point lower bound: for each xnx \leq \sqrt{n}, there are at least n\lfloor \sqrt{n} \rfloor values of yy, giving D(n)m2(n1)2D(n) \geq m^2 \geq (\sqrt{n}-1)^2... actually the asymptotic gives the result directly for large nn.

Problem 3. Show that the average number of divisors of integers up to nn grows like lnn\ln n.

Average =D(n)/n(nlnn)/n=lnn= D(n)/n \approx (n\ln n)/n = \ln n. So a "typical" integer near nn has about lnn\ln n divisors — logarithmically many, not a fixed constant.


The median of an n×nn \times n multiplication table is determined by where the hyperbola xy=medianxy = \text{median} cuts through exactly half the table entries. That geometric picture is in The Multiplication Table Median.