sum from 1 to infinity cos^2(x)/(n^2 + 1)