$\sum_\limits{n=1}^{\infty}(1-\cos(\frac{\pi}{n}))$ convergence proof [duplicate]

Check if the following series converge or diverge:$\sum_\limits{n=1}^{\infty}(1-\cos(\frac{\pi}{n}))$

I have tried the integral test since the series are decreasing to zero as $n\to\infty$, but $\int_1^\infty 1-\cos(\frac{\pi}{n}) dn=n-\sin(\frac{\pi}{n})|_0^\infty$, which diverges. I am not seeing what test could I applied that would deliver me the desired result convergence, since the book solution states that the series converge.

Question:

What do you think of the series? What test shall I use?

marked as duplicate by Robert Z calculus StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 24 '18 at 14:03
• Note that $\int 1 - \cos(\pi /x){\rm d}x$ is not $x - \sin(\pi/x)$. The integral actually converges. Also note that if this was correct then it would have proven that the series diverges. – Winther Jun 24 '18 at 14:00
• It's a non elementary function (try plugging it into WA to see it - to see its wrong just take the derivative of what you got and see you don't get the integrand back). It converges because the integrated behaves as $C/n^2$ for large $n$ just as the sum does and the integral of this converges. – Winther Jun 24 '18 at 15:48
Hint: Use the fact that$$\lim_{n\to\infty}\frac{1-\cos\left(\frac\pi n\right)}{\frac1{n^2}}\in(0,+\infty).$$