MatsGranvik

Riemann zeta zeros limiting ratios vs newton raphson 4 programs comparison

Jul 27th, 2020 (edited)
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. (*Mathematica 8.0.1*)
  2. (*Program 1*)
  3. (*Series expansion of the Riemann zeta function in the critical strip \
  4. with imaginary part greater than 10 and arbitrary real part.The \
  5. series expansion is done in two steps:First as a Taylor polynomial to \
  6. length firstNN=10 and then of the reciprocal of that Taylor \
  7. polynomial to length secondNN=20.*)(*Mathematica 8.0.1*)
  8. (*start*)
  9. Clear[cons, ww, div, real, secondNN, firstNN, zz, z, t, b, n, k, nn,
  10. x, g1, g2];
  11. cons = 10;
  12. ww = 500;
  13. div = 10;
  14. real = 0;
  15. (*secondNN must be much greater than firstNN*)
  16. firstNN = 10;
  17. secondNN = 20;
  18. Monitor[TableForm[zz = Table[Clear[t, b, n, k, nn, x];
  19. z = N[cons + w/div, 20];
  20. polynomial =
  21. Normal[Series[Zeta[(real + x + z*N[I, 20])], {x, 0, firstNN}]];
  22. digits = 20;
  23. b = With[{nn = secondNN},
  24. CoefficientList[Series[1/polynomial, {x, 0, nn}], x]];
  25. nn = Length[b];
  26. x = z*I + N[b[[nn - 1]]/b[[nn]], digits], {w, 0, ww}]];, w]
  27. "Plot of the real part:"
  28. g1 = ListLinePlot[Flatten[Re[zz]], DataRange -> {cons, cons + ww/div},
  29. PlotRange -> {-2, 2}]
  30. "Plot of the imaginary part:"
  31. g2 = ListLinePlot[Flatten[Im[zz]], DataRange -> {cons, cons + ww/div}]
  32. zz
  33. (*end*)
  34.  
  35.  
  36. (*Program 2*)
  37. (*The limiting ratio of the form (n-1)*a (n-1)/a(n) applied to the \
  38. first column of the matrix inverse of the binomial matrix multiplied \
  39. elementwise with the coefficients in the Taylor polynomial of the \
  40. Riemann zeta function,expanded at an arbitrary point in the critical \
  41. strip (with imaginary part greater than 10),appended with trailing \
  42. zeros.The trailing zeros...0,0,0,0,0,0,0,... in the vector "a" give \
  43. better convergence to the Riemann zeta zeros*)
  44. (*start*)
  45. Clear[start, end, realPart, zz, d, digits, a, nn, A, n, k, b, z, list,
  46. x];
  47. start = 10;
  48. end = 60;
  49. realPart = 0;
  50. (*realPart=1/2;*)
  51. (*realPart=1;*)
  52. (*d must be much greater than zz*)
  53. Monitor[list = Table[zz = 10;
  54. d = 20;
  55. digits = 30;
  56. a = Flatten[{CoefficientList[
  57. Normal[Series[
  58. Zeta[realPart + x + z*N[I, digits]], {x, 0, zz}]], x]*
  59. Range[0, zz]!, Range[d]*0}];
  60. nn = Length[a];
  61. A = Table[
  62. Table[If[n >= k, Binomial[n - 1, k - 1]*a[[n - k + 1]], 0], {k,
  63. 1, Length[a]}], {n, 1, Length[a]}];
  64. Quiet[b = Inverse[A][[All, 1]]];
  65. z*I + N[(nn - 1)*b[[nn - 1]]/b[[nn]], digits], {z, start, end,
  66. 1/10}], z*10]
  67. "Plot of the real part:"
  68. ListLinePlot[Re[list], PlotRange -> {-1, 3}, DataRange -> {start, end}]
  69. "Plot of the imaginary part:"
  70. ListLinePlot[Im[list], DataRange -> {start, end}]
  71. (*end*)
  72.  
  73.  
  74. (*Program 3*)
  75. (*Newton Raphson iteration*)
  76. (*start*)
  77. Clear[f, g, t, min, max];
  78. f[t_] = Zeta[N[1/2] + I*t]/Zeta'[1/2 + I*t];
  79. g[t_] = Im[(1/2 + I*t) - f[t]];
  80. min = 10;
  81. max = 60;
  82. "Plot of the imaginary part"
  83. Plot[g[g[g[g[t]]]], {t, min, max}]
  84. (*Plot[g[g[g[g[g[g[g[t]]]]]]],{t,min,max}]*)
  85. (*end*)
  86.  
  87. (*Program 4*)
  88. (*An approximation of the logarithmic derivative of the Riemann zeta \
  89. function giving faster Newton Raphson iteration*)
  90. (*The approximation of the logarithmic derivative is based on the \
  91. formula:Limit[Zeta[s]*Zeta[c]/Zeta[s+c+-1]-Zeta[c],c->1]^(-1)=-Zeta[s]\
  92. /Zeta'[s]*)
  93. (*start*)
  94. Clear[f, g, t, s, c, min, max];
  95. c = 1 + 1/1000;
  96. f[t_] = -1/((Zeta[N[1/2] + I*t]*Zeta[c])/Zeta[1/2 + I*t + c - 1] -
  97. Zeta[c]);
  98. g[t_] = Im[(1/2 + I*t) - f[t]];
  99. min = 10;
  100. max = 60;
  101. "Plot of imaginary part"
  102. Plot[g[g[g[g[t]]]], {t, min, max}]
  103. (*Plot[g[g[g[g[g[g[g[t]]]]]]],{t,min,max}]*)
  104. (*end*)
Add Comment
Please, Sign In to add comment