The Logarithmic Derivative of ζ

The Euler product tells us that the zeta function knows about the primes. But knowing is not the same as speaking: the product itself is a clumsy object to push analysis through. The single instrument that turns zeta's silent knowledge into an audible statement about primes is its logarithmic derivative,

\frac{\zeta'(s)}{\zeta(s)} = \frac{d}{ds}\log\zeta(s).

This one function is the hinge of the whole theory. On one side it is a tidy Dirichlet series whose coefficients are the von Mangoldt function \Lambda(n) — pure prime data. On the other side, its poles sit exactly at the zeros of \zeta. Feed it into a contour integral and those two descriptions collide: the primes on one side, the zeros on the other. That collision is the explicit formula for \psi(x). Everything in this course flows through \zeta'/\zeta.

From the Euler product to a prime-powered series

Start where the primes live — the Euler product, valid for \Re(s) > 1:

\zeta(s) = \prod_{p}\frac{1}{1 - p^{-s}}.

A product is hard to differentiate, but a logarithm turns it into a sum. Take \log of both sides:

\log\zeta(s) = -\sum_{p}\log\!\left(1 - p^{-s}\right).

Now differentiate term by term with respect to s. Recall \frac{d}{ds}p^{-s} = -p^{-s}\log p. For a single prime,

\frac{d}{ds}\Big[-\log\!\left(1 - p^{-s}\right)\Big] = -\frac{-(-p^{-s}\log p)}{1 - p^{-s}} = -\frac{p^{-s}\log p}{1 - p^{-s}}.

Summing over all primes gives the logarithmic derivative directly, and it is cleaner to write with the overall minus sign moved to the front:

For \Re(s) > 1,

-\frac{\zeta'(s)}{\zeta(s)} = \sum_{p}\frac{p^{-s}\log p}{1 - p^{-s}} = \sum_{n=1}^{\infty}\frac{\Lambda(n)}{n^{s}},

where the von Mangoldt function is

\Lambda(n) = \begin{cases} \log p, & n = p^{k}\ \text{for a prime } p,\ k\ge 1,\\[2pt] 0, & \text{otherwise.} \end{cases}

So -\zeta'/\zeta is the Dirichlet series of \Lambda. This is why \zeta'/\zeta carries the primes: its coefficients are supported entirely on prime powers, each weighted by \log p.

Worked example: expanding one prime's factor

Let's verify the last equality by expanding a single prime's contribution as a geometric series and checking that its coefficients really are \Lambda. Fix a prime p and look at

-\frac{d}{ds}\log\!\left(1 - p^{-s}\right)^{-1} = \frac{p^{-s}\log p}{1 - p^{-s}}.

Because \Re(s) > 1 we have |p^{-s}| < 1, so \frac{1}{1 - p^{-s}} = \sum_{k\ge 0}p^{-ks}. Multiply through by p^{-s}\log p:

\frac{p^{-s}\log p}{1 - p^{-s}} = \log p\sum_{k=0}^{\infty}p^{-(k+1)s} = \log p\left(p^{-s} + p^{-2s} + p^{-3s} + \cdots\right) = \sum_{k=1}^{\infty}\frac{\log p}{(p^{k})^{s}}.

Every term is \log p divided by (p^{k})^{s} — exactly \Lambda(p^{k})/(p^{k})^{s}. So this single prime contributes the series terms at n = p, p^{2}, p^{3}, \dots, each with coefficient \log p, and nothing anywhere else. Take p = 2 for concreteness: the factor produces

\frac{\log 2}{2^{s}} + \frac{\log 2}{4^{s}} + \frac{\log 2}{8^{s}} + \frac{\log 2}{16^{s}} + \cdots.

Summing over all primes stitches these strands together — \Lambda(4) = \log 2, \Lambda(9) = \log 3, \Lambda(6) = 0 (since 6 is not a prime power) — reproducing \sum_n \Lambda(n)n^{-s} term for term.

Because the sum form of \zeta has no product structure, and \log only tames products. Differentiating \zeta(s) = \sum_n n^{-s} gives \zeta'(s) = -\sum_n (\log n)\,n^{-s}, which is perfectly true but useless for prime-spotting: \log n spreads its weight across every integer. The magic is entirely in dividing by \zeta. The quotient \zeta'/\zeta is what the Euler product renders as a sum over primes, and \Lambda(n) is precisely the Dirichlet convolution identity \log = \Lambda * 1 in disguise. Multiplying by \zeta (i.e. by 1) recovers \sum_{d\mid n}\Lambda(d) = \log n.

The other face: poles at the zeros

The Dirichlet series above only lives in the half-plane \Re(s) > 1. But \zeta'/\zeta continues meromorphically to the whole plane, and there it wears a completely different face — a landscape of simple poles. The rule for reading them is elementary complex analysis: the logarithmic derivative of any meromorphic function has a simple pole at each zero and each pole of that function, with residue equal to the order.

The proof is one line: write f(s) = (s - s_{0})^{m}g(s) with g(s_{0}) \ne 0. Then \log f = m\log(s - s_{0}) + \log g, and differentiating gives f'/f = \dfrac{m}{s - s_{0}} + \dfrac{g'}{g}, where the second piece is analytic at s_{0}. Apply this to \zeta:

Read the two faces together: on the right, coefficients that are prime data; across the plane, poles that are the zeros. \zeta'/\zeta is the translator between them.

Seeing the pole landscape

Every marked point below is a simple pole of \zeta'/\zeta. One special pole sits at s = 1 with residue -1 (inherited from zeta's pole). All the others sit at zeros of \zeta: the nontrivial zeros \rho = \tfrac12 + i\gamma in symmetric pairs up the critical line, and the trivial zeros at s = -2, -4, -6, \dots. Each carries residue equal to the multiplicity of that zero (+1 for a simple zero).

This picture is the machine. When we integrate -\dfrac{\zeta'(s)}{\zeta(s)}\dfrac{x^{s}}{s} around a large contour, the residue theorem harvests exactly these dots: the pole at s = 1 yields the main term, and each zero \rho yields an oscillating correction.

The partial-fraction expansion

There is a closed formula that lays all of these poles out at once. Applying the Hadamard product for \zeta (its factorisation over the zeros) and taking the logarithmic derivative produces the celebrated expansion:

\frac{\zeta'(s)}{\zeta(s)} = B + \tfrac12\log\pi - \frac{1}{s - 1} - \tfrac12\frac{\Gamma'}{\Gamma}\!\left(\tfrac{s}{2} + 1\right) + \sum_{\rho}\left(\frac{1}{s - \rho} + \frac{1}{\rho}\right),

where the sum runs over the nontrivial zeros \rho and B is a constant (with B = -\sum_\rho \operatorname{Re}(1/\rho)).

Every ingredient is a pole you already recognise:

The whole content of "the zeros drive the primes" is compressed into this one line: it is \zeta'/\zeta written as a running total of its poles.

How this manufactures the explicit formula

Here is the payoff, in outline. The Chebyshev function \psi(x) = \sum_{n\le x}\Lambda(n) is the natural prime-counting sum (weighted by \log p). Perron's formula recovers such a partial sum from the Dirichlet series by a contour integral:

\psi(x) = \frac{1}{2\pi i}\int_{c - i\infty}^{c + i\infty}\left(-\frac{\zeta'(s)}{\zeta(s)}\right)\frac{x^{s}}{s}\,ds,\qquad c > 1.

Now push the contour far to the left and collect residues. The integrand is -\zeta'/\zeta times x^{s}/s, so at every pole of \zeta'/\zeta we pick up a residue:

Assembling the residues gives the explicit formula

\psi(x) = x - \sum_{\rho}\frac{x^{\rho}}{\rho} - \log(2\pi) - \tfrac12\log\!\left(1 - x^{-2}\right).

Read it as sound: x is the steady main tone, and each zero \rho = \tfrac12 + i\gamma adds an oscillation of amplitude x^{1/2}/|\rho| and frequency \gamma. The primes' fluctuations are a chord struck by the zeros — and every note passed through \zeta'/\zeta to get here.

Two residues trip people up, and both are about sign and multiplicity.

At a zero \rho: the residue of \zeta'/\zeta is the multiplicity of the zero, not merely 1. A simple zero gives residue +1; a hypothetical double zero would give +2. (Every known nontrivial zero is simple, but the residue counts multiplicity — that is exactly how the explicit formula would register a repeated zero.) The sign is positive because a zero is where the function vanishes.

At s = 1: this is a pole of \zeta, not a zero, so the residue of \zeta'/\zeta is -1 — negative, and equal to minus the order of the pole. Do not misread it as +1. It is this -1 that (after the extra minus sign in -\zeta'/\zeta) turns into the +x main term of the prime count. Flip that sign and you lose the entire Prime Number Theorem.

The constant B in the partial-fraction expansion is not arbitrary. When you take the logarithmic derivative of the Hadamard product \zeta(s) = \tfrac{e^{Bs}}{s-1}\prod_\rho\big(1 - \tfrac{s}{\rho}\big)e^{s/\rho}\cdots (with the Gamma factor folded in), the leading exponential e^{Bs} differentiates to the constant B, and each Weierstrass factor (1 - s/\rho)e^{s/\rho} contributes exactly the paired term \tfrac{1}{s-\rho} + \tfrac{1}{\rho}. The convergence factor e^{s/\rho} in the product is the reason the +1/\rho appears alongside 1/(s-\rho): without it, neither the product nor the pole sum would converge, because the zeros are only barely sparse enough (\zeta is an entire function of order 1 after clearing the pole).