The Definite Integral Problem (with a twist)?

Let $b_r = \sum_{d \mid r} a_d\mu(\frac{r}{d})$. We prove that if the $b_r$'s are small enough, the result is true.

Claim: If $\lim_{n \to \infty} \frac{\log^2(n)}{n}\sum_{r=1}^n |b_r| = 0$ and $f$ is smooth, then $$\lim_{k \to \infty} \lim_{n \to \infty} \sum_{r=1}^n a_rf\left(\frac{kr}{n}\right)\frac{k}{n} = \left(\lim_{s \to 1} \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_s}{r^s}\right)\int_0^\infty f(x)dx.$$

Proof: It suffices to show, 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$$ for each $k$. By replacing $f(\cdot)$ with $f(k\cdot)$, it suffices to show $$\lim_{n \to \infty} \sum_{r=1}^n a_rf\left(\frac{r}{n}\right)\frac{1}{n} = \left(\lim_{s \to 1}\frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r}{r^s}\right)\int_0^1 f(x)dx$$ for any smooth $f$. By mobius inversion, $a_r = \sum_{d \mid r} b_d$, so $$\sum_{r=1}^n a_rf(\frac{r}{n})\frac{1}{n} = \sum_{r=1}^n \sum_{d \mid r} b_d f(\frac{r}{n})\frac{1}{n} = \sum_{d=1}^n \sum_{d \mid r \le n} b_df(\frac{r}{n})\frac{1}{n} = \sum_{d=1}^n b_d\frac{1}{n}\sum_{m \le n/d} f(\frac{md}{n}).$$ Also, $$\lim_{s \to 1} \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r}{r^s} = \lim_{s \to 1} \sum_{d=1}^\infty \frac{b_d}{d^s} = \sum_{d=1}^\infty \frac{b_d}{d},$$ where the last equality used the decay assumption on the $b_d$'s (precisely, we used dominated convergence theorem, which is justified, since $\sum_{d=1}^\infty \frac{|b_d|}{d} < \infty$, since, by partial summation, $\sum_{d=1}^\infty \frac{|b_d|}{d} = \int_1^\infty \frac{\frac{1}{t}\sum_{d \le t} |b_d|}{t}dt$). We therefore wish to prove $$\lim_{n \to \infty} \sum_{d=1}^n \frac{b_d}{d}\frac{1}{n/d}\sum_{m \le n/d} f(\frac{md}{n}) = \lim_{n \to \infty} \sum_{d=1}^n \frac{b_d}{d}\int_0^1 f(x)dx.$$ Take $n \ge 1$. Then, $$\left|\sum_{d=1}^n \frac{b_d}{d}\frac{1}{n/d}\sum_{m \le n/d} f(\frac{md}{n})-\sum_{d=1}^n \frac{b_d}{d}\int_0^1 f(x)dx\right| \le \sum_{d=1}^n \frac{|b_d|}{d}\left|\frac{1}{n/d}\sum_{m \le n/d} f(\frac{md}{n})-\int_0^1 f(x)dx\right|.$$ Now, using $$\int_0^1 f(x)dx = \sum_{m \le n/d} \int_{(m-1)d/n}^{md/n} f(x)dx + \int_{\lfloor \frac{n}{d}\rfloor \frac{d}{n}}^1 f(x)dx,$$ we get that, for any $d \le n$, $$\left|\frac{1}{n/d}\sum_{m \le n/d} f(\frac{md}{n})-\int_0^1 f(x)dx\right| \le \sum_{m \le n/d} \int_{(m-1)d/n}^{md/n} \left|f(\frac{md}{n})-f(x)\right|dx + \int_{\lfloor \frac{n}{d}\rfloor\frac{d}{n}}^1 |f(x)|dx.$$ By the mean value theorem, for any $x \in [(m-1)\frac{d}{n},m\frac{d}{n}]$, $|f(\frac{md}{n})-f(x)| \le ||f'||_\infty \frac{d}{n}$, so we bound $$\int_{(m-1)d/n}^{md/n} \left|f(\frac{md}{n})-f(x)\right|dx \le ||f'||_\infty \frac{d}{n}\frac{d}{n}.$$ We also have, using $\lfloor \frac{n}{d}\rfloor\frac{d}{n} \ge 1-\frac{d}{n}$, the bound $$\int_{\lfloor \frac{n}{d}\rfloor\frac{d}{n}}^1 |f(x)|dx \le ||f||_\infty \frac{d}{n}.$$ Therefore, $$\left|\frac{1}{n/d}\sum_{m \le n/d} f(\frac{md}{n})-\int_0^1 f(x)dx\right| \le (||f'||_\infty+||f||_\infty)\frac{d}{n}.$$ Combining everything, we obtain $$\left|\sum_{d=1}^n \frac{b_d}{d}\frac{1}{n/d}\sum_{m \le n/d} f(\frac{md}{n})-\sum_{d=1}^n \frac{b_d}{d}\int_0^1 f(x)dx\right| \le \frac{1}{n}\sum_{d=1}^n \frac{|b_d|}{d},$$ which does indeed tend to $0$ as $n \to \infty$, as desired. $\square$