Academy
Maths›Number Theory›Dirichlet›Hyperbola 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 ln⁡n\ln n.

The number of lattice points under y=n/xy = n/x grows like nln⁡nn \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:

∫1nnx dx=nln⁡n\int_1^n \frac{n}{x}\, dx = n \ln n

This is exact. The lattice point count D(n)=∑x=1n⌊n/x⌋D(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)≈nln⁡nD(n) \approx n \ln n.

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


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

∫1n1x dx=ln⁡n\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 ln⁡n\ln n:

Hn=ln⁡n+γ+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 ln⁡n\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)=2∑x=1m⌊nx⌋−m2m=⌊n⌋D(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 xy≤nxy \leq n, x,y≥1x,y \geq 1.

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

  • The region x≤nx \leq \sqrt{n} contains ∑x=1m⌊n/x⌋\sum_{x=1}^{m} \lfloor n/x \rfloor points.
  • The region y≤ny \leq \sqrt{n} contains the same by symmetry.
  • The square x≤nx \leq \sqrt{n}, y≤ny \leq \sqrt{n} is counted twice — subtract m2m^2.

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

∫1nnxdx=n⋅12ln⁡n\int_1^{\sqrt{n}} \frac{n}{x}dx = n \cdot \frac{1}{2}\ln n

Doubling and subtracting the square gives nln⁡n−nn\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)−nln⁡n−(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=1n⌊nx⌋=nln⁡n+(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 nln⁡nn\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=ln⁡n+γ+…H_n = \ln n + \gamma + \ldots

For JEE purposes: the key fact is D(n)∼nln⁡nD(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)≈1000ln⁡1000+(2γ−1)⋅1000≈1000×6.908+0.1544×1000≈7062D(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)≥nln⁡n/2\displaystyle\sum_{k=1}^{n} \tau(k) \geq n\ln n / 2 for all n≥1n \geq 1.

Since τ(k)≥2\tau(k) \geq 2 for all k≥2k \geq 2 and τ(1)=1\tau(1)=1... this is weaker than the asymptotic. Use the lattice point lower bound: for each x≤nx \leq \sqrt{n}, there are at least ⌊n⌋\lfloor \sqrt{n} \rfloor values of yy, giving D(n)≥m2≥(n−1)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 ln⁡n\ln n.

Average =D(n)/n≈(nln⁡n)/n=ln⁡n= D(n)/n \approx (n\ln n)/n = \ln n. So a "typical" integer near nn has about ln⁡n\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.