# Proving $\lim\limits_{n\to \infty} n \sum\limits_{j=1}^n \frac{\cos\left(\frac nj\right)f\left(\frac nj\right)}{j^2} < \infty$

Let $f: \Bbb R \to \Bbb R$ be a monotonic decreasing function such that $\displaystyle{\lim_{x\to \infty}} f(x)= 0$. Prove that:

$$\lim_{n\to \infty} n \sum_{j=1}^n \frac{\cos\big(\frac{n}{j}\big)f\big(\frac{n}{j}\big)}{j^2} < \infty$$

My only thought about it was maybe using the integral test for convergence, but I didn't find a way to do it.

• Hint: Riemann Sum. Aug 21 '17 at 19:09

$$\frac{1}{n}\sum_{j=1}^{n}\frac{\cos\left(\frac{n}{j}\right)\,f\left(\frac{n}{j}\right)}{\left(\frac{j}{n}\right)^2}$$ is a Riemann sum associated with $$\int_{0}^{1}\frac{\cos\left(\frac{1}{x}\right)\,f\left(\frac{1}{x}\right)}{x^2}\,dx \stackrel{x\mapsto\frac{1}{z}}{=}\int_{1}^{+\infty}\cos(z)\,f(z)\,dz$$ which is convergent (in the improper Riemann integrability sense) due to Dirichlet's test: $f(x)$ is decreasing towards zero and $\cos(x)$ has a bounded primitive.
• I actually thought about Dirichlet's test but shouldn't $f$ be continuously differentiable in order to use it? Aug 21 '17 at 19:13
• @user401516: no, the monotonicity of $f$ is enough, see the last paragraph of the linked Wikipedia page. Aug 21 '17 at 19:15
• And anyway, if $f$ is non-negative and decreasing towards zero, $f*K_\varepsilon$ has the same properties and it is continuously differentiable, it is enough to pick a smooth and concentrated kernel $K_\varepsilon$. Aug 21 '17 at 19:16
• Strange, my professor proved this theorem when $f$ is continuously differentiable, but not non-negative though. Aug 21 '17 at 19:31
• @user401516: maybe because the proof is simpler in such a case, but the principle stays the same. The previous mollification argument shows that the $C^1$ assumption is not really needed. Aug 21 '17 at 19:34