Question
Given $f$ is a smooth function and $b_r = \sum_{d \mid r} a_d\mu(\frac{r}{d})$ with $\lim_{n \to \infty} \frac{\log^2(n)}{n}\sum_{r=1}^n |b_r| = 0$. Then if (and only if) $f(k)$ is a global maxima in the region $c$ to $d$ for all $a_r \in R_{> 0}$ (where $R_{> 0}$ is the set of all positive reals) then:
$$ (d-c) f(k) \lim_{n \to \infty} \sum_{r=1}^n \frac{a_r}{n} - \left(\lim_{s \to 1} \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r} {r^s}\right)\int_c^d f(x)dx > 0 $$
Obviously this is too powerful a formula. My best guess is the proof is wrong? On the off chance I haven't made a mistake then is it pragmatic to use this formula to find the maxima?
Background
Let's say I have a function which has a maxima $f(b)$ in the region $c$ and $d$. Now, let's assume there is a solution $f(k)$ which I'm uncertain if it's a global maxima. Then,
$$ a_i(f(k) - f(l)) > 0$$
where $l$ is an arbitrary number and $a_i$ is a fudge factor which enables the inequality to still be true even when our assumption ($f(k)$ is not a global maxima) is false: $f(k) - f(c) < 0$ by simply becoming a negative number. Now consider:
$$ a_1(f(k) - f(c + \frac{1}{n})) > 0$$ $$ a_2(f(k) - f(c + \frac{2}{n})) > 0$$ $$ a_3(f(k) - f(c + \frac{3}{n})) > 0$$ $$ \vdots $$ $$ a_n(f(k) - f(c + \frac{n(d-c) }{n})) > 0$$
Adding the above (and removing the point $f(b) - f(b)$:
$$ \sum_{r=1}^n a_r ( f(k) - f(c + \frac{r}{n})) > 0 $$
Multiplying by $\frac{(d-c) }{n}$ both sides and taking $n \to \infty$:
$$ \lim_{n \to \infty} \sum_{r=1}^n a_r \frac{(d-c) }{n}( f(k) - f(c + \frac{r}{n})) > 0 $$
We can integrate the following using this formula which claims:
Let $b_r = \sum_{d \mid r} a_d\mu(\frac{r}{d})$.
Claim: If $\lim_{n \to \infty} \frac{\log^2(n)}{n}\sum_{r=1}^n |b_r| = 0$ and $f$ is smooth, then but, for any smooth $f$, that $$\lim_{n \to \infty} \sum_{r=1}^n a_rf\left(\frac{rk}{n}\right)\frac{k}{n} = \left(\lim_{s \to 1} \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r} {r^s}\right)\int_0^k f(x)dx$$
Hence:
$$ (d-c) f(k) \lim_{n \to \infty} \sum_{r=1}^n \frac{a_r}{n} - \left(\lim_{s \to 1} \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r} {r^s}\right)\int_c^d f(x)dx > 0 $$
If there exists any solution where all $a_i > 0$ and
$$ (d-c) f(k) \lim_{n \to \infty} \sum_{r=1}^n \frac{a_r}{n} - \left(\lim_{s \to 1} \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r} {r^s}\right)\int_c^d f(x)dx < 0 $$
then $f(k)$ is not a global maxima.