# Find all points where $\Re f(x)=0$ inside a given rectangle on the complex plane

Is it possible to find the real roots of a complex function inside a given rectangle? I'm trying to find the real zeros of the prime zeta function. How would I go about finding all zeros in the Rectangle[{0, 0}, {.23, 37}] for example?

pzz = ToExpression[
Import["https://raw.githubusercontent.com/martinq321/primezetazero/main/pzz", "Text"]];
Show[
Take[pzz, 100] // ListPlot,
Graphics[{EdgeForm[Black], FaceForm[None], Rectangle[{0, 0}, {.23, 37}]}]
]


The real zeros of the PrimeZetaP function for the above were taken from here, and extracted with pzz = Catenate@Cases[image, Point[data_] :> data, Infinity]; I've since uploaded them here.

• Where were the roots taken from??? Jan 1 at 22:32
• @azerbajdzan from here as stated in the question! Jan 1 at 22:46
• I see the link but it is not clear to me, where from that link and how you extracted them. Furthermore the roots does not seem to be roots of PrimeZetaP[s] == 0 as is assumed by the author of the link but rather of Re[PrimeZetaP[s]] == 0 in which case they can not be called roots of prime zeta function. Jan 1 at 22:52
• @azerbajdzan I extracted them by downloading the notebook, and usiung pzz = Catenate@Cases[image, Point[data_] :> data, Infinity]; from the image on the right of this Jan 1 at 22:56
• There was nothing wrong with the original question to find the roots. I just wanted to point out that the author of the link mistakenly presented roots of the real part as roots in general. Jan 1 at 23:29

If your guess is relatively close to the actual zero then this works:

FindRoot[PrimeZetaP[s], {s, 0.1 + I 0.3}, WorkingPrecision -> 10]
PrimeZetaP[s] /. %
FindRoot[PrimeZetaP[s], {s, 0.6 + I 9}, WorkingPrecision -> 10]
PrimeZetaP[s] /. %
FindRoot[PrimeZetaP[s], {s, 1.1 + I 24}, WorkingPrecision -> 10]
PrimeZetaP[s] /. %


{s -> 0.1188814636 + 0.4260430864 I}

0.*10^-8 + 0.*10^-8 I

{s -> 0.6179556663 + 8.827520647 I}

0.*10^-8 + 0.*10^-8 I

{s -> 1.061924186 + 23.71733036 I}

0.*10^-8 + 0.*10^-8 I


But PrimeZetaP seems to be computationally expensive. Just try WorkingPrecision -> 100 instead...

So I guess it would be difficult to do the exact search in a larger area of the complex plane.

• thanks - yes, PrimeZetaP seems tricky to work with .. Jan 1 at 23:44