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 infusingx0andx1as 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 ifxever gets outside the rangexmintoxmax.
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– Sasha Dec 24 '12 at 02:16t1 = N[Im[ZetaZero[1]], 8]; t2 = N[Im[ZetaZero[2]], 8]; tmid = (t1 + t2)/2; FindMaxValue[ RiemannSiegelZ[t], {t, tmid, t1, t2}, WorkingPrecision -> 8]– xzczd Dec 24 '12 at 06:09MachinePrecisionindirectly. 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. – xzczd Dec 25 '12 at 04:38FindMaxValue[](okay, apart from some of the Gram points not actually being near the extrema of $Z(t)$...)? – J. M.'s missing motivation Apr 30 '13 at 08:07