0
$\begingroup$

I’m reading the paper Explicit estimates for the Riemann zeta function close to the 1-line (arXiv:2312.09412), and on page 6, the authors define the following expressions:

$w_1 \geq max _{t\geq t_0}\frac{8 \log \log t}{\log t}$

$w_2 = \begin{cases} \displaystyle \frac{1 - \frac{1}{e} + \frac{\log w_1}{\log \log t_0}}{w_1 \log 2}, & \text{if } w_1 < 1, \\ \displaystyle \frac{1 - \frac{1}{e}}{w_1 \log 2}, & \text{if } w_1 \geq 1, \end{cases} $

$B = 1 + \frac{8}{3w_1}$

$A_k = 1.546 \cdot \zeta\left(1 + k\right) \cdot\left(1+\frac{2+k} {t_0}\right)^{1/6} \cdot \left(1 + \frac{2 + k}{t_0 \log t_0} \right) \cdot \left(1 + \frac{2 \sqrt{1 + k}}{t_0} \right)$

I would like to compute these quantities in MATLAB for given values of and k. For example, if and k = 1.5, the approximate expected outputs (based on the paper) are: $w_1=\frac{8}{e}$ $w_2 = 0.309$ $B = 1.91$ $A_k = 10$

My MATLAB code

              ****% Inputs****

                t0 = sym(3);
                k = sym(1.5);
                e = exp(sym(1));
                w1 = (8/e);
               log2 = log(sym(2));

              ***% Compute w2***

              if w1 < 1
                w2 = (1 - 1/e + log(w1) / log(log(t0))) / (w1 * log2);
              else
                 w2 = (1 - 1/e) / (w1 * log2);
              end

             ***% Compute zeta(s)***

             s = 1 + k;
             zeta_val = zeta(s);

             ***% Compute B***

             B = 1 + 8 / (3 * w1);

             ***% Compute A_k***

             Ak = sym(1546)/sym(10)^3 * zeta_val * (1 + (2 + 
                 k)/t0)^(1/sym(6)) ...
                 * (1 + (2 + k) / (t0 * log(t0))) ...
                 * (1 + 2 * sqrt(1 + k) / t0);

             ***% Display results***

           fprintf('For t0 = %.2f and k = %d:\n', t0, k);
           fprintf('w1 = %.8f\n', w1);
           fprintf('w2 = %.8f\n', w2);
           fprintf('zeta(s) = %.8f at s = %.8f\n', zeta_val, s);
           fprintf('B = %.8f\n', B);
           fprintf('A_k = %.8f\n', Ak);


         *** The results are***

            For t0 = 3.00 
            k = 2:
            w1 = 2.94303553
            w2 = 0.30986958
            zeta(s) = 1.34148726 at s = 2.50000000
            B = 1.90609394
            A_k = 9.99214293

My questions : Is this implementation correct and numerically stable?

$\endgroup$
2
  • $\begingroup$ Seems to me you could run some hand calculations to compare step-by-step with MATLAB. Then permute your inputs (individually and in groups) to see if solution goes off. $\endgroup$ Commented Apr 27 at 16:53
  • $\begingroup$ The point of using the symbolic math toolbox (your sym) usually is that you don't need to worry about numerical stability; you can just power through it by setting the number of digits high enough. $\endgroup$ Commented Apr 27 at 18:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.