# Calculating the Zeroes of the Riemann-Zeta function

Wikipedia states that

The Riemann zeta function $\zeta(s)$ is defined for all complex numbers $s \neq 1$. It has zeros at the negative even integers (i.e. at $s = −2, −4, −6, ...)$. These are called the trivial zeros. The Riemann hypothesis is concerned with the non-trivial zeros, and states that: The real part of any non-trivial zero of the Riemann zeta function is $\frac{1}{2}$.

What does it mean to say that $\zeta(s)$ has a $\text{trivial}$ zero and a $\text{non-trivial}$ zero. I know that $$\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s}$$ what wikipedia claims it that $\zeta(-2) = \sum_{n=1}^{\infty} n^{2} = 0$ which looks absurd.

My question is can somebody show me how to calculate a zero for the $\zeta$ function.

• I think it may help mathworld.wolfram.com/Riemann-SiegelFormula.html Commented Apr 20, 2012 at 13:34
• The series is not applicable for $\Re(s)\leq 1$; one uses a different formula (an analytic continuation, if you will) of the $\zeta$ function (so yes, it does look absurd until you consider the extension of the function to the rest of the complex plane). Commented Apr 20, 2012 at 13:37
• As Ginger mentions, one uses the Riemann-Siegel formula numerically to compute the nontrivial zeroes (there are no known closed forms for them). Commented Apr 20, 2012 at 13:39
• (*start*) (*Calculating the non-trivial zero near s=1+14*I*) (*Mathematica 8*) n = 30;(*Try setting set n=40;*) s = 1 + 14*I;(* Try setting s=1*) N[s + 1/n + 1/(1 - Sum[(-1)^(k - 1)*Binomial[n - 1, k - 1]/(HarmonicNumber[10^10000, s + k/n]), {k, 1, n}]/Sum[(-1)^(k - 1)*Binomial[n - 1, k - 1]/(HarmonicNumber[10^10000, s + k/n + 1/n]), {k, 1, n}]), 15] (*end*) Commented Aug 23, 2023 at 18:48
• I wrote a (not yet complete) implementation of Riemann-Siegel in Julia. You can use it to calculate non-trivial zeros (or write your own implementation off of it). Commented Oct 17, 2023 at 5:23

You are going to need a bit of knowledge about complex analysis before you can really follow the answer, but if you start with a function defined as a series, it is frequently possible to extend that function to a much larger part of the complex plane.

For example, if you define $f(x)=1+x+x^2+x^3+...$ then $f$ can be extended to $\mathbb C\setminus \{1\}$ as $g(x)=\frac{1}{1-x}$. Clearly, it is "absurd" to say that $f(2)=-1$, but $g(2)=-1$ makes sense.

The Riemann zeta function is initially defined as a series, but it can be "analytically extended" to $\mathbb C\setminus \{1\}$. The details of this really require complex analysis.

Calculating the non-trivial zeroes of the Riemann zeta function is a whole entire field of mathematics.

• In particular: $$\zeta(s)=2(2\pi)^{s-1}\sin\frac{\pi s}{2}\Gamma(1-s)\zeta(1-s)$$ Replace $s$ in both sides with a negative even integer and observe... Commented Apr 20, 2012 at 13:46
• Analytic continuation for $\Re s>0$ does not really require so much knowledge other than integrals, and good notion of convergence. Analytic continuation to $s \neq 1$ requires only the Poisson summation formula, not really complex analysis either. Commented Apr 20, 2012 at 13:50
• Perhaps, but the whole notion of analytic continuations - What is analytic? Is it distinct? Why would we want this type of continuation? - really require beginning complex analysis. Commented Apr 20, 2012 at 13:53
• Sorry, I was only focusing on the last question. The OP seems really to have difficulties about the notion of analytic continuation. Commented Apr 20, 2012 at 14:08
• There is an even simpler example of analytic continuation: when we are first taught about $x^a$, we only consider positive integer $a$ at first. Then we figure out what it means for $a=0$ and $a$ a negative integer. Then we figure out what it means for $a\in\mathbb Q$ (algebra), and then $a\in\mathbb R$ (calculus/real analysis) and then finally $a\in\mathbb C$ (complex analysis)... Commented Apr 20, 2012 at 14:16

Copied from Wikipedia:

For all $s\in\mathbb{C}\setminus\{1\}$ the integral relation $$\zeta(s) = \frac{2^{s-1}}{s-1}-2^s\!\int_0^{\infty}\!\!\!\frac{\sin(s\arctan t)}{(1+t^2)^\frac{s}{2}(\mathrm{e}^{\pi\,t}+1)}\,\mathrm{d}t,$$ holds true, which may be used for a numerical evaluation of the Zeta-function. http://mo.mathematik.uni-stuttgart.de/kurse/kurs5/seite19.html

Regarding your question on how to calculate zeros of $$\zeta(s)$$...

The algorithm below will converge to a nontrivial zero of $$\zeta(s)$$ along the line $$s=1/2+t \in \mathbb{C}$$.

$$\mathbf{Newton-Raphson}$$ $$\mathbf{Algorithm}$$ $$\mathbf{for}$$ $$\zeta(s)$$: Given an initial $$t_{k} \in \mathbb{R}$$, iterative solutions $$t_{k+1}$$ converge to nontrivial zeros of $$\zeta(s)$$,

$$t_{k+1}=t_{k}-\frac{2 i}{\frac{16 i t_{k}}{1+4t_{k}^2}+\log_{e}(\pi) - \psi(1/4+i t_{k}/2)-\frac{2 \zeta’(1/2+i t_k)}{\zeta(1/2+i t_k)}}.$$

Note that $$\psi(s)$$ is the di-gamma function and that $$t_k$$ is the imaginary part of the root $$s=1/2+i t_k$$, with $$\zeta(1/2+it_k)\approx 0$$.

• That converges really impressively fast. Just that there is a permanent imaginary part that is not always getting smaller, but remains in the range of machine precision. Have You a reference for this formula? Commented May 7, 2023 at 10:15
• Only an unpublished article titled Algorithms to Locate Zeros of the Riemann Zeta Function, which is available at my research website: josephjdillon.com. Commented May 10, 2023 at 5:56
• This has longer calculations times for the intended larger zeros. So it is not too helpful. Commented May 10, 2023 at 15:09

For the first question, what are the "trivial" and "non-trivial" zeros of the Riemann zeta function? These are terms used to describe 1) the zeros of the Riemann zeta function that occur at regular intervals to infinity (trivial) and those that do not (non-trivial). Take any function, not just the zeta function. For instance the sine function $$\sin(s)$$. Anytime $$\sin(s)=0$$, then that's a zero of the sine function. All the sine zeros would be considered "trivial" by comparison, as they occur at regular intervals: $$\sin(\pi n)$$, anytime the argument is a natural number $$(0, 1, 2, 3, ...)$$ multiplied by $$\pi$$.

The trivial zeros of the Riemann zeta function occur at $$s=-2n$$, so for natural numbers $$n>0$$, one gets a zero at $$\zeta(-2)$$, $$\zeta(-4)$$, $$\zeta(-6)$$, etc.. So rather trivial.

The non-trivial are more complicated. Assuming you are familiar with complex arithmetic, the first one is $$\zeta(1/2 + i 14.134725141734...)$$, where $$i$$ is the imaginary number. The next non-trivial zero is its complex conjugate $$\zeta(1/2 - i 14.134725141734...)$$ and the next is $$\zeta(1/2 + i 21.022039638771...)$$, and likewise its complex conjugate $$\zeta(1/2 - i 21.022039638771...)$$, and they go on and on to infinity, getting closer and closer together, but never exhibiting any real clear pattern. The reason they are more complicated is due to the fact that no one knows much about the imaginary parts, almost nothing at all. It is known that all the non-trivial zeros whose imaginary part is up into somewhere greater than $$3\cdot10^9$$ each have a real part equal to one half, as seen with the first couple examples. The Riemann hypothesis states that they all have a real part one half.

The second question...

The infinite series representation you reference cannot calculate any of the zeros of the Riemann zeta function, so that's probably why it doesn't make a lot of sense. Fortunately, there are other representations of the function available. Here's a straight forward way to calculate the non-trivial zeros with what you already have.

Multiply the infinite series you used in your post by $$(-1)^{1-s}/(1-2^{1-s})$$ in order to "alternate" the function. This gives $$\sum_{n=1}^{\infty} (-1)^{1-n}/(n^s(1-2^{1-s}))=\zeta(s),\quad \operatorname{Re}(s)>0,$$ which does converge for the non-trivial zeros. You can apply one of the non-trivial zeros I provided above and you will see that by summing to infinity the negative values begin to negate the positive. This representation is sometimes called the Dirichlet (alternating) zeta function.

For calculating the trivial zeros, one will need to use a functional representation of the zeta function or the Abel-Plana representation, which you can read up more at https://en.wikipedia.org/wiki/Abel%E2%80%93Plana_formula .

Here's that representation, which will also work for the non-trivial zeros: $$\zeta(s)=1/(s-1)+1/2+2\int_0^{\infty} \sin(s\cdot \arctan(t))/((e^{2 \pi t }-1) (1+t^2)^{s/2}) dt$$

While the Abel-Plana formula is powerful, it's a bit lengthy. I hope the sum I provided for the non-trivial zeros helps.

• This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review Commented Feb 20, 2020 at 19:50
• I have edited it with a clear answer...I hope.
– Jeff
Commented Feb 20, 2020 at 22:18
• $\sum_{n=1}^\infty (-1)^{n+1} n^{-s}$ converges for $\Re(s) >0$ not for $s=-2$. Moreover the interesting part is how do we prove that a zero has real exactly $1/2$ and how do we prove that there are no other non-trivial zeros up to height $T$ Commented Feb 21, 2020 at 3:47
• Correct, it does not converge for s=-2, so I provided the Abel-Plana representation as well. jamie's highlighted question just asks how to calculate "a" zero. I provided two methods, the first calculates for Re(s)>0 and the second calculates both types of zeros (and of course every other argument s except s=1). The first representation is most similar to where jamie began.
– Jeff
Commented Feb 21, 2020 at 12:50
• Do you know how to prove that there is a zero near $1/2 + i 14.13$ and that it has real part exactly $1/2$ ? (you can do it from the evaluation of $\eta(s)=\sum_n (-1)^{n+1}n^{-s}$, but you have to know the functional equation) Commented Feb 23, 2020 at 6:54