Does $\sum_{n=1}^\infty \frac{\cos{(\sqrt{n})}}{n}$ converge?

The series is: $$\sum_{n=1}^\infty \frac{\cos(\sqrt{n})}{n}$$

Considering it isn't always positive, I replace $\frac{\cos{\sqrt{n}}}{n}$ with its absolute value and I find that: $$\vert \frac{\cos{\sqrt{n}}}{n}\vert\gt \frac{\cos^2{\sqrt{n}}}{n}=\frac{\ 1+\cos{2\sqrt{n}}}{2n}=\frac{1}{2n}+\frac{\cos{2\sqrt{n}}}{2n}$$ if $\sum_{n=1}^\infty \vert\frac{\cos{\sqrt{n}}}{n}\vert $ converges, then $\sum_{n=1}^\infty \frac{\cos{\sqrt{n}}}{n}$ converges.Using Comparison test,we can draw the conclusion that $\sum_{n=1}^\infty\frac{1}{2n}$ converges , which is impossible. So I get that $\sum_{n=1}^\infty \frac{\cos{\sqrt{n}}}{n}$ absolutely diverges. But I can't figure out whether $\sum_{n=1}^\infty \frac{\cos{\sqrt{n}}}{n}$ converges or not.

I have tried Dirichlet's test, but I can't figure out whether $$S_{n}=\sum_{k=1}^n \cos{\sqrt{k}}$$ is bounded.

(This is my first time to ask question.Maybe there exist some mistakes in my conclusion.Thanks. :)


Solution 1:

We show that $N\to\sum_{n = 1}^N {\frac{\cos(\sqrt{n})}{n}}$ is a Cauchy sequence and therefore the given series is convergent.

Hint. By using the MVT prove that for $n\geq 1$ and for all $x\in [n,n+1)$ $$\left|\frac{\cos(\sqrt{n})}{n}-\frac{\cos(\sqrt{x})}{x}\right|\leq \frac{1}{n^{3/2}}.$$ Then for $M>N\geq 1$, $$\begin{align} &\left|\sum_{n = N}^M {\frac{\cos(\sqrt{n})}{n}} - \int_N^{M + 1} {\frac{{\cos (\sqrt{x} )}}{x}dx} \right|\\ &=\left|\sum_{n = N}^M {\frac{\cos(\sqrt{n})}{n}} - \sum_{n = N}^M {\int_n^{n + 1} {\frac{{\cos (\sqrt{x} )}}{x}dx} } \right|\\ &\leq\sum_{n = N}^M \int_n^{n + 1}\left|{\frac{\cos(\sqrt{n})}{n}} - { {\frac{{\cos (\sqrt{x} )}}{x}} } \right|dx \le \sum_{n = N}^M \frac{1}{n^{3/2}}.\end{align}$$ Note that since $\sum_{n=1}^{\infty}\frac{1}{n^{3/2}}$ is convergent then $$\lim_{M,N\to +\infty} \sum_{n = N}^M \frac{1}{n^{3/2}}=0.$$ Moreover $$\int_1^{+\infty}\frac{{\cos (\sqrt{x} )}}{x}dx=2\int_1^{+\infty}\frac{{\cos (u )}}{u}\, du$$ where the last integral is convergent, and we have that $$\lim_{M,N\to +\infty}\int_N^{M+1}\frac{{\cos (\sqrt{x} )}}{x}dx=0.$$

Solution 2:

Not a theoretical answer but a computational one. Ran a SageMath code to check the sum. It appears that the sum is bounded between oscillates in the neighbourhood of $1/3$.

n = 1
s = 0
s_min = s_max = -0.33

while(n < 10^12):
    s = s + cos(n^0.5)/n
    if(s < s_min):
        s_min = s
    if(s > s_max):
        s_max = s
    if(n%10^6 == 0):
        print(n,s,s_min,s_max)
    n = n + 1

Given below is the sum of the first 540 million terms. I will keep updating the sum after every 100 million terms to see if and where it shows hints of convergence. Looking at these numbers, I wonder if the sum oscillates between -0.3307 and 0.3306.

     n             s_n     
(537000000, -0.330621546932186)
(538000000, -0.330725062788227)
(539000000, -0.330687353946068)
(540000000, -0.330649408748269)
(541000000, -0.330757389552252)
(542000000, -0.330602401857676)
(543000000, -0.330766627976051)
(544000000, -0.330637600125639)
(545000000, -0.330692819220692)
(546000000, -0.330730454234348)
(547000000, -0.330610479504947)
(548000000, -0.330771768297931)
(549000000, -0.330629435680553)
(550000000, -0.330695312033157)
(551000000, -0.330735165460147)
(552000000, -0.330605859570737)
(553000000, -0.330764635324360)
(554000000, -0.330655186664157)

Solution 3:

Notations: $\lfloor x \rfloor$ is the floor function, $\{x\}$ is the fractional part of $x$ so that $x=\lfloor x\rfloor + \{x\}$.

Applying partial summation with $f(x)=\frac{\cos(\sqrt x)}x$, $$\begin{align} \sum_{n=1}^N \frac{\cos(\sqrt n)}n&=\int_{1-}^N f(x)d\lfloor x \rfloor \\ &=f(x)\lfloor x\rfloor \Big\vert_{1-}^N-\int_{1-}^N f'(x)\lfloor x\rfloor dx\\ &=f(N)(N-\{N\})-\int_1^N xf'(x)dx+\int_1^N\{x\}f'(x)dx\\ &=Nf(N)-f(1)-\int_1^Nxf'(x)dx+\int_1^N\{x\}f'(x)dx+f(1)-\{N\}f(N). \end{align} $$ From integration by parts, the sum of first three terms is $$ \int_1^{N}f(x)dx $$ Thus, we have the following as $N\rightarrow\infty$, $$ \sum_{n=1}^{\infty}\frac{\cos(\sqrt n)}n=\int_1^{\infty}f(x)dx+\int_1^{\infty}\{x\}f'(x)dx+\cos 1. $$ It is easy to see that the integrals converge.