Proving that the limit of a series is a polynomial? Let $f(x)=\sum_{n=1}^{\infty}\frac{\cos(nx)}{n^2}$ defined on $ [0,2\pi] $
The series is absolutely convergent, and its limit is a polynomial of degree two, this can be shown by considering the Fourier coefficient of a suitable polynomial(differentiable) then appealing to the uniqueness of the limit. 
My question: 
Is there a way of proving this fact directly without using Fourier Analysis?
 A: $$\sum_{n\geq 1}\frac{\sin(nx)}{n}$$
is the Fourier series of a sawtooth wave, a $2\pi$-periodic function which equals $\frac{\pi-x}{2}$ over the interval $(0,2\pi)$. Pointwise convergence towards such function is proved at page 53 of my notes, for instance, first by contour integration, then by exploiting the Fejér kernel. By applying termwise integration,
$$ \frac{\pi^2}{6}-\sum_{n\geq 1}\frac{\cos(nx)}{n^2}$$
is uniformly convergent towards a $2\pi$-periodic function which is continuous and piecewise-quadratic. So, long story short, once you know that $\sum_{n\geq 1}\frac{\sin(nx)}{n}$ is the periodic extension of a Bernoulli polynomial/is related to the fractional part you are done. Ignoring Fourier Analysis,
$$\text{Li}_2(z) = \sum_{n\geq 1}\frac{z^n}{n^2} $$
is a continuous function on $\{z\in\mathbb{C}:\|z\|\leq 1\}$ and a holomorphic function on $\{z\in\mathbb{C}:\|z\|<1\}$, fulfilling $\frac{d}{dz}\text{Li}_2(z)=-\frac{\log(1-z)}{z}$. We have
$$ f(x)=\sum_{n\geq 1}\frac{\cos(n x)}{n^2}=\operatorname{Re}\operatorname{Li}_2(e^{ix})=\lim_{\rho\to 1^-}\operatorname{Re}\operatorname{Li}_2(\rho e^{ix}) $$
hence for any $x\in(0,2\pi)$ we may write
$$\begin{eqnarray*} f(x)&=&\lim_{\rho\to 1^-}\operatorname{Re}\left[\,f(0)-\int_{0}^{x}\rho i e^{it}\frac{\log(1-\rho e^{it})}{e^{it}}\,dt\right]\\&=&\frac{\pi^2}{6}+\lim_{\rho\to 1^-}\operatorname{Im}\int_{0}^{x}\log(1-\rho e^{it})\,dt
\\&=&\frac{\pi^2}{6}+\lim_{\rho\to 1^-}\int_{0}^{x}\text{Arg}(1-\rho e^{it})\,dt\\&=&\frac{\pi^2}{6}+\lim_{\rho\to 1^-}\int_{0}^{x}\frac{t}{2}+\text{Arg}(e^{-it/2}-\rho e^{it/2})\,dt\\&=&\frac{\pi^2}{6}+\frac{x^2}{4}\color{red}{+\lim_{\rho\to 1^-}\int_{0}^{x}\text{Arg}\left(\frac{e^{-it/2}-\rho e^{it/2}}{e^{-it/2}-e^{it/2}}\right)\,dt}+\lim_{\rho\to 1^-}\int_{0}^{x}\text{Arg}\left(-2i\sin\tfrac{t}{2}\right)\,dt\\&=&\frac{\pi^2}{6}+\frac{x^2}{4}-\frac{\pi x}{2}\color{red}{+0}\end{eqnarray*}$$
by the dominated convergence theorem. $f(x)$ is given by a uniformly convergent series of continuous functions, hence the last identity holds at $x=0$ and $x=2\pi$, too.
A: If
$f(x)=\sum_{n=1}^{\infty}\frac{\cos(nx)}{n^2}
$,
and rigor is completely ignored,
then
$f'(x)
=-\sum_{n=1}^{\infty}\frac{\sin(nx)}{n}
$
and
$f''(x)
=-\sum_{n=1}^{\infty}\cos(nx)
$
so
$\begin{array}\\
\sin(x)f''(x)
&=-\sum_{n=1}^{\infty}\sin(x)\cos(nx)\\
&=-\sum_{n=1}^{\infty}\frac12(\sin((n+1)x)-\sin((n-1)x))\\
&=-\sum_{n=1}^{\infty}\frac12\sin((n+1)x)+\sum_{n=1}^{\infty}\frac12\sin((n-1)x)\\
&=-\sum_{n=2}^{\infty}\frac12\sin(nx)+\sum_{n=0}^{\infty}\frac12\sin(nx)\\
&=\frac12\sin(x)\\
\end{array}
$
so
$f''(x)
= \frac12
$.
Therefore,
integrating twice,
$f(x)
=\frac14 x^2+ax+b
$
for some
$a$ and $b$.
Now,
can this nonsense be made rigorous?
