I have some formulas in the form $$a - x^2 + f(x), \quad x \geqslant 0$$ where $f(x)$ is a smooth periodic function. For example when $f(x)$ is a sinusoid, that looks something like this:

There can be one or more positive roots, arbitrarily close together, and I need to numerically approximate the first positive root. I know the period of $f(x)$.
Basic root-finding methods (Newton's etc) seem not reliable here as they are not guaranteed to find the correct root. How can I approach this problem?