Prove convergence of the series Help please to prove the convergence: $$\sum_{n=1}^{\infty}\left(\frac{1}{\sin \frac{1}{n}}-n\cos\frac1n\right)\cos \frac{\pi n(n-1)}2$$
It can be proved with Dirichlet's test, but there are come problems with $$\left(\frac{1}{\sin \frac{1}{n}}-n\cos\frac1n\right)$$ monotone. Other steps in this way are clear. Or I should use another test?
 A: Let $\frac{1}{n}=x$.
Hence,
$$\lim_{n\rightarrow\infty}\left(\frac{1}{\sin \frac{1}{n}}-n\cos\frac1n\right)=\lim_{x\rightarrow0}\left(\frac{1}{\sin{x}}-\frac{\cos{x}}{x}\right)=$$
$$\lim_{x\rightarrow0}\frac{x-\frac{1}{2}\sin2x}{x\sin{x}}=\lim_{x\rightarrow0}\frac{1-\cos2x}{\sin{x}+x\cos{x}}=$$
$$=\lim_{x\rightarrow0}\frac{2\sin^2x}{x\left(\frac{\sin{x}}{x}+\cos{x}\right)}=0.$$
Since with $$\sum_{n=1}^{\infty}\cos\frac{\pi n(n-1)}{2}$$ you know what to do, by the Dirichlet's Test we'll done if we'll prove that $a_{n+1}\leq a_{n}$, where
$$a_n=\frac{1}{\sin \frac{1}{n}}-n\cos\frac1n$$ or $\lim\limits_{x\rightarrow0^+}f'(x)>0$, where
$$f(x)=\frac{1}{\sin{x}}-\frac{\cos{x}}{x},$$
which is easy.
Indeed, $$\lim_{x\rightarrow0^+}f'(x)=\lim_{x\rightarrow0^+}\left(-\frac{\cos{x}}{\sin^2x}-\frac{-x\sin{x}-\cos{x}}{x^2}\right)=$$
$$=\lim_{x\rightarrow0^+}\left(\frac{\sin{x}}{x}+\frac{\cos x(\sin^2x-x^2)}{x^2\sin^2x}\right)=$$
$$=1+\lim_{x\rightarrow0^+}\frac{\sin{x}-x}{x^3}\lim_{x\rightarrow0^+}\frac{\frac{\sin{x}}{x}+1}{\frac{\sin^2x}{x^2}}=$$
$$=1+2\lim_{x\rightarrow0^+}\frac{\cos{x}-1}{3x^2}=1-\frac{1}{3}\lim_{x\rightarrow0^+}\frac{\sin^2\frac{x}{2}}{\frac{x^2}{4}}=\frac{2}{3}>0$$
and we are done!
