I'm using FindMaxValue
to study the distribution of maxima of Abs[RiemannSiegelZ[t]]
between consecutive values of ZetaZero
,
Some background: RiemannSiegelZ[t]
is Zeta[1/2+I* t]
'with the phase taken out'; i.e. real for real $t$ and with the same absolute value as Zeta
. Outside of Mathematica this is known as Hardy's function $Z(t)$. On the Riemann Hypothesis, $Z(t)$ has no positive local minima or negative local maxima 'for $t$ sufficiently large' (see Edwards' book "Riemann's Zeta Function".) In fact $t>5$ is sufficient. Thus on the Riemann Hypothesis $Z(t)$ is positive (resp. negative) and concave down (resp. up) with a unique local maximum (resp. minimum) for $t$ between ZetaZero[2k-1]
and ZetaZero[2k]
(resp ZetaZero[2k]
and ZetaZero[2k+1]
).
To determine the maxima, I'm less concerned with speed or precision than I am with robustness. The documentation says that
FindMaxValue[f,{x, x0, x1}]
searches for a local maximum inf
usingx0
andx1
as the first two values of x, avoiding the use of derivatives.
Is this routine guaranteed to return a value between x0
and x1
if there is in fact a unique local maximum there (i.e., guaranteed to not jump outside the interval)? Should I be using a Method
other than Automatic
, and if so, which one?
The documentation also says:
FindMaxValue[f,{x, x0, xmin, xmax}]
searches for a local maximum, stopping the search ifx
ever gets outside the rangexmin
toxmax
.
It does not say what the parameter x0
determines but from earlier documentation one would suppose that it is the starting point for the search. What does it mean if the search 'stops'? Does Mathematica return an error message?
What is the difference between
FindMaxValue[f,{x, x0, xmin, xmax}]
and
FindMaxValue[{f, xmin < x < xmax}, {x, x0}]
Finally, I'm having difficulties with (I think) the fact that FindMaxValue
has the attribute HoldAll
, for example
In[3]:= t1 = N[Im[ZetaZero[1]]]; t2 =
N[Im[ZetaZero[2]]]; tmid = (t1 + t2)/2; FindMaxValue[
RiemannSiegelZ[t], {t, tmid, t1, t2}]
FindMaxValue::nrgnum: The gradient is not a vector of real numbers at {t} = {17.8742}. >>
Out[3]= 2.31595
2.3405510299088133
$\endgroup$t1 = N[Im[ZetaZero[1]], 8]; t2 = N[Im[ZetaZero[2]], 8]; tmid = (t1 + t2)/2; FindMaxValue[ RiemannSiegelZ[t], {t, tmid, t1, t2}, WorkingPrecision -> 8]
$\endgroup$MachinePrecision
indirectly. Mathematica doesn't give warnings for the mistake caused byMachinePrecision
. You can check the document, and for more information, have a look at the links I pasted in this answer. $\endgroup$