Let $a=1/2-30.424876126i$ ($i^2=-1$). Then trying to plot $$\operatorname{Re}\sum_{n=1}^{200} \frac{(a\ln x)^n}{n!\, n\zeta (n+1)}$$ in $x$ leads to a very inaccurate jaggy graph possibly caused by some floating point errors:

f[x_]:=Sum[(a Log[x])^n/(n! n Zeta[n+1]),{n,1,200}]

graph The beginning of the graph is good, though. How can the errors be mitigated?

  • $\begingroup$ If your value of a is supposed to be a zero of the zeta function, have you also tried including more decimal values? $\endgroup$ Jul 20 at 23:59
  • $\begingroup$ @zeattledave Combining SetPrecision and WorkingPrecision solved the problem. $\endgroup$
    – Wane
    Jul 21 at 0:54

Use higher WorkingPrecision:

f[u_] = Sum[u^n/(n n! Zeta[1 + n]), {n, 1, 200}];
a = SetPrecision[1/2 - 30.424876126 I, ∞];  (* make exact value *)
Plot[Re[f[a*Log[x]]], {x, 1, 5}, PlotRange -> All, 
     WorkingPrecision -> 100]

enter image description here

  • $\begingroup$ The option PlotPoints -> 100 instead of WorkingPrecision -> 100 works too. BTW, the plot is different from yours. $\endgroup$
    – user64494
    Jul 19 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.