If you are interested in obtaining approximations of the zeros of that function, you don't really need to plot it to high precision.
In this case, NSolve
is able to give you numerical solutions for specific ranges of $x$, and it can do that at an arbitrary precision that you specify using the WorkingPrecision
option:
NSolve[f2 == 0 && 0 <= x <= 15, x, WorkingPrecision -> 30]
(* Out:
{{x -> 0},
{x -> 3.80400271741859550812071773878},
{x -> 10.3253913711535069593238631633},
{x -> 14.0297407505371491584516215691}}
*)
A much faster approach uses numerical root-finding methods to find all the zeros of your function in a given interval. A few methods have been proposed on this site to do so using numerical methods; I'll refer you to a recent post by yohbs on this topic.
For instance, you could use yohbs's excellent rootSearchD
function from his answer in that thread (where you can also find the code for it). rootSearchD
needs a pure function to work on, so I generate such a function f
from your expression of f1
and f2
. I then look for zeros of that function in the interval $[\text{rangemin}, \text{rangemax}]=[100,106]$ setting the desired precision of the results using WorkingPrecision
.
f = Sum[Sin[# Log[Prime[i]]]/Prime[i], {i, 1, 50}] &;
rangemin = 100; rangemax = 106;
nsols = rootSearchD[f, rangemin, rangemax, WorkingPrecision -> 35]
Plot[f[x], {x, rangemin, rangemax},
Epilog -> {Red, PointSize[0.015], Tooltip[Point[{#, 0}], #] & /@ nsols},
ImageSize -> Large
]
(* Out: {100.19626209644848914285986869397657,
101.59999375978473413106702727668323,
101.84542249631610381942296725497735,
105.15676371559998831763738622073285} *)