For $0<x<2\pi$, prove the infinite sum $$S = \sum_{n=1}^\infty \frac{\cos(nx)}{n}$$ converges.
I want to prove it by the same idea given by the text(Arfken mathematical physics).
$$S = \int_{1}^{\infty} f(n)\mathrm{d}x + \int_{1}^{\infty}(n-[n])f'(n)\mathrm{d}x$$ Now, substitute $f(n)$ by the given series then, it is easy to show the first integral converges through some simple calculations. I'm wondering how to check the second integral. $$ S' = \int_{1}^{\infty}(n-[n])(-\frac{x}{n}\sin (nx) - \frac{cos(nx)}{n^2} )\mathrm{d}n$$ The text says "we note that its term $\cos(nx) / n^2$ also leads to a convergent integral". I don't understand why it works. It seems to ignore the $(n-[n])$ term which is in the integral.
Moreover, it says that "setting $(n-[n])\sin(nx)= g'(n)$, we write $$\int_{1}^{\infty}(n-[n]) \frac{\sin(nx)}{n} \mathrm{d}n = [\frac{g(n)}{n}]_{n=1}^{\infty}+ \int_{1}^{\infty}\frac{g(n)}{n^2}\mathrm{d}n$$ We do not have an explicit expression for $g(n)$, but we do know that it is bounded because $\sin x$ oscillates with a period incommensurate with that of the sawtooth periodicity of $(n-[n])$. " Is there any condition for a function to be derivative function? I guess that there are some more conditions for being derivative function such as Darboux's thm. It is odd to me to set $g'(n)$ without considering these derivative conditions. Even if the setting is logically safe, how we can verify the integral converges? I don't know how to deal with $\lim_{n \rightarrow \infty}\frac{g(n)}{n}$ and $\int_{1}^{\infty}\frac{g(n)}{n^2}\mathrm{d}n$.