Does $\sum_{n=2}^{\infty}\frac{\cos\left(\frac{\pi n^2}{n+1}\right)}{(\log n)^2}$ converge? I'm pretty sure the sum converges by Abel or Dirichelet, I just have no idea how to tackle the numerator. Any tips would be appreciated!
 A: Note that 
$$
\frac{n^2}{n+1}= \frac{(n^2 + n) - (n+1) + 1}{n+1} = n-1+\frac{1}{n+1}
$$
From there, we note that
$$
\begin{align}
\cos\left(\frac{\pi n^2}{n+1}\right) &= 
\cos\left(\pi(n-1) + \frac{\pi}{n+1}\right) 
\\&=
\cos\left(\pi(n-1)\right)\cos\left(\frac{\pi}{n+1}\right)
- \sin\left(\pi(n-1)\right)\sin\left(\frac{\pi}{n+1}\right)
\\&=
(-1)^n\cos\left(\frac{\pi}{n+1}\right)
\end{align}
$$
Noting that for all $n \geq 2$, $0 < \frac{\pi}{n+1}< \pi/2$ so that $\cos(\frac{\pi}{n+1})$ is strictly positive and less than $1$.  It follows that
$$
0<\frac{\cos(\frac{\pi}{n+1})}{(\log(n))^2} < \frac{1}{(\log(n))^2}
$$
Now, in order to apply the alternating series test, we would need to show that $\frac{\cos(\frac{\pi}{n+1})}{(\log(n))^2}$ is decreasing for sufficiently large $n$.
In order to do so, note that
$$
\frac{d}{dx} \frac{\cos(\frac{\pi}{x+1})}{(\log(x))^2} = 
\frac{\pi \sin(\frac{\pi}{x+1})}{(1+x^2)(\log(x))^2} 
-\frac{2 \cos(\frac{\pi}{x+1})}{x(\log(x))^3} 
$$
If we may find an $x_0$ so that the above is negative for all $x>x_0$, then we will have shown that the sequence eventually decreases, as is required.
As David Mitra points out in the comment below, $x_0 = 2$ works perfectly well.
