21
$\begingroup$

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. :)

$\endgroup$
3
  • 1
    $\begingroup$ If you approximate the sum by an integral, then you have $$\sum_{n=1}^m\,\frac{\cos(\sqrt{n})}{n}\approx \int_1^m\,\frac{\cos(\sqrt{x})}{x}\,\text{d}x=2\,\text{Ci}(\sqrt{m})-2\,\text{Ci}(1)\,,$$ where $\text{Ci}$ is the cosine integral $$\text{Ci}(t)=-\int_t^\infty\,\frac{\cos(s)}{s}\,\text{d}s\,.$$ However, I do not know how accurate the approximation is. But I am convinced that the sum converges since $$\lim_{m\to\infty}\,\text{Ci}(\sqrt{m})=0\,.$$ $\endgroup$ Oct 9, 2018 at 11:27
  • 1
    $\begingroup$ Plus, after trying to sum up to $3000$ terms, it seems to me that the sum fluctuates around $-0.32$. This looks very promising that the sum does converge to a limit around $-0.32$. $\endgroup$ Oct 9, 2018 at 11:32
  • 1
    $\begingroup$ Related question from the Art of Problem Solving. $\endgroup$
    – PinkyWay
    Nov 9, 2020 at 19:44

6 Answers 6

17
$\begingroup$

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.$$

$\endgroup$
4
  • $\begingroup$ So ultimately the absolute-term series is less than $\zeta(3/2)$ and thus the original series converges? $\endgroup$ Oct 9, 2018 at 11:49
  • $\begingroup$ Not sure how the first inequality can lead to the second one. $\endgroup$
    – Szeto
    Oct 9, 2018 at 11:50
  • $\begingroup$ @Szeto Is it clear now? $\endgroup$
    – Robert Z
    Oct 9, 2018 at 11:55
  • $\begingroup$ Thanks for your excellent proof! $\endgroup$
    – hmtbgc
    Oct 9, 2018 at 12:55
3
$\begingroup$

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)
$\endgroup$
3
  • $\begingroup$ A quick estimate suggest you roughly need $\sim 10^{2k}$ terms to get convergence to $k$ digits. $\endgroup$
    – Winther
    Oct 9, 2018 at 12:01
  • 1
    $\begingroup$ Letting $a(k) = \frac{\cos \left(\sqrt{k}\right)}{k}$ Mathematica gives $s=\text{NSum[a[k], {k, 1, \infty}]} = -0.330688$ $\endgroup$ Oct 9, 2018 at 14:10
  • 1
    $\begingroup$ Numeric inverse Laplace: $\gamma +\mathcal{L}_s^{-1}\left[\frac{\psi \left(1+s^2\right)}{s}\right](1)\approx -0.33068768045214513116891754615748$ where $\psi$ is PolyGamma and $\gamma$ is EulerGamma. $\endgroup$ Oct 24, 2018 at 17:42
2
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ @ i707107 I have derived the same final formula, but without using the differential $d\lfloor x\rfloor$ which looks strange to me. Could you please explain its meaning. $\endgroup$ Oct 10, 2018 at 13:06
  • $\begingroup$ $d\lfloor x\rfloor$ means that you take the jump amount whenever there is a jump. The jumps of $\lfloor x \rfloor$ occur at integers with amount $1$. So, the integral on the right in fact means the same as the sum on the left. The formula I use is a partial summation formula, this is Abel's summation formula in wikipedia. $\endgroup$ Oct 11, 2018 at 2:13
  • 1
    $\begingroup$ Also, you can refer to Riemann-Stieltjes integral. $\endgroup$ Oct 11, 2018 at 2:14
2
$\begingroup$

This development is similar to that of user i707107 but it is more detailed and avoids the strange expression $d \lfloor x \rfloor$.

Letting

$$c_{k} = c(k) = \frac{\cos(\sqrt{k})}{k}$$

we attempt to find an integral representation for the partial sum

$$s_n = \sum_{k=1}^n c_{k}$$

The formulas for partial summation are

$$\sum_{k=1}^n a_{k} b_{k} = A_{n} b_{n} + \sum_{k=1}^{n-1} A_{k}(b_{k}-b_{k+1})$$

$$A_{k} = \sum_{i=1}^k a_{i}$$

Letting $a_{k}=1, b_{k} = c_{k}$ we have $A_{k} = k$.

Now comes the trick which introduces an integral: we have

$$(b_{k}-b_{k+1}) = - \int_{k}^{k+1} c'(x)\;dx$$

and, what's more, the factor $k$ can be incorporated in the integral:

$$k (b_{k}-b_{k+1}) = - k \int_{k}^{k+1} c'(x)\;dx = - \int_{k}^{k+1} \lfloor x\rfloor c'(x)\;dx $$

Where $\lfloor x\rfloor$ is the floor function.

Hence, using

$$\lfloor x\rfloor = x -\{x\} $$

where $\{x\}$ is the fractional part of $x$, the partial sum becomes

$$s_{n} = n c_n -\sum_{k=1}^{n-1} \int_{k}^{k+1} \lfloor x\rfloor c'(x)\;dx \\ = n c_n -\int_{1}^{n} x c'(x)\;dx + \int_{1}^{n} \{x\} c'(x)\;dx$$

By partial integration of the first integral the term $n c_{n}$ drops out and we get

$$s_{n} = \cos(1) +\int_{1}^{n} c(x)\;dx + \int_{1}^{n} \{x\} c'(x)\;dx$$

The first integral can be solved explicitly

$$\int_{1}^{n} c(x)\;dx = 2 \text{Ci}\left(\sqrt{n}\right)-2 \text{Ci}(1)$$

Where $\text{Ci}$ is the integral cosine.

The second integral is absolutely convergent and can be very roughly estimated thus (notice that $0\le \{x\} \lt 1$)

$$|i_2| = |\int_{1}^{n} \{x\} c'(x)\,dx| <= \int_{1}^{n}| \{x\} c'(x)|\,dx \\ <= \int_{1}^{n} |\{x\}| |c'(x)|\,dx <=\int_{1}^{n} | c'(x) | \,dx$$

Now

$$| c'(x) | = |\frac{\cos \left(\sqrt{x}\right)}{x^2}+\frac{\sin \left(\sqrt{x}\right)}{2 x^{3/2}}| \\ \leq | \frac{\sin \left(\sqrt{x}\right)}{2 x^{3/2}}| +|\frac{\cos \left(\sqrt{x}\right)}{x^2}| \leq \frac{1}{2 x^{3/2}}+\frac{1}{x^2}$$

Hence

$$| i_2| <=\int_1^n \left(\frac{1}{2 x^{3/2}}+\frac{1}{x^2}\right) \, dx = 2-\frac{\sqrt{n}+1}{n}\tag{*}$$

Since $\lim_{n\to \infty } \, \text{Ci}\left(\sqrt{n}\right)= 0$ the limit of the partial sum is given by

$$s = \cos(1) - 2 \text{Ci}(1) + \lim_{n\to \infty } \,i_2$$

Observing (*) $s$ remains finite as $n\to\infty$ hence the original sum is convergent. QED.

Remark

A more sophisticated study if the integral $i_2$ might provide better numerical bounds, and even a closed form.

$\endgroup$
1
$\begingroup$

This approach works in two steps and is generally applicable: first it transforms the sum to an alternating sum which then, in the second step, can be studied by the Dirichlet criterion.

Step 1: Transformation to an alternating sum

The partial sum in question is

$$s_n = \sum_{k=1}^n c_k\tag{1}$$

where

$$c_k = \frac{\cos(\sqrt{k})}{k}\tag{2}$$

Now collecting all subsequent summands with the same sign we can write

$$s_n = \sum_{m=0}^M (-1)^m f_m\tag{3}$$

where

$$f_0 = \sum_{k=1}^{\lfloor z_{1}\rfloor} c_{k}\tag{4a}$$

$$f_{m\ge 1} = (-1)^m \sum_{k={\lceil z_{m}\rceil}}^{\lfloor z_{m+1} \rfloor} c_{k}\tag{4b}$$

is the sum of terms between two adjacent roots $k=z_m$ and $k=z_{m+1}$ of $c(k) = 0$, and $M$ is some number depending on $n$ which can in principle be specified but it is normally not necessary as it goes to $\infty$ together with $n$

Then, by an appropirate choice of the factor $(-1)^m$, all $f_m$ can be chosen to be positive quantities.

Step 2: Application of Dirichlet's criterion

Now we can apply the Dirichlet criterion to (3). This reads now as follows: $s_n$ is convergent if

(1) $f_m \to 0$ for $m\to\infty$
(2) $f_m$ is monotonous

ad (1)

We have for $m\ge1$

$$|f_{m}| \le g(m)$$

where we have dropped the $\cos$ and have defined

$$g(m) = \sum_{k={\lceil z_{m}\rceil}}^{\lfloor z_{m+1} \rfloor} \frac{1}{k} =H_{\lfloor z_{m+1} \rfloor}-H_{\lceil z_{m}\rceil-1}\tag{5} $$

Here $H_n$ ist the harmonic number.

Now the zeroes of $c_{k}$ are given by

$$z_m = \left(\pi(m-\frac{1}{2})\right)^2\tag{6}$$

Dropping Floor and Ceiling in $g(m)$ defines

$$g_0(m) = H_{z_{m+1}}-H_{z_{m}-1}$$

Letting ${\lfloor x \rfloor} \to x-1,{\lceil x \rceil} \to x+1 $ defines another function

$$g_1(m) = H_{z_{m+1}-1}-H_{z_{m}+1-1}$$

and we have the inequality

$$g_1(m) \lt g(m) \lt g_0(m)$$

Asymptotically this leads, up to $O(\frac{1}{m^2})$, to the inequality

$$\frac{2}{m}- \frac{1}{\pi^2 m^2}< g(m) <\frac{2}{m}+\frac{1}{\pi^2 m^2} $$

This shows that $f_m$ goes to zero.

ad (2)

(to be continued)

$\endgroup$
0
$\begingroup$

Outline

I haven't fully thought out this answer but leaving it here as a response to a comment on a duplicate question.

At the cost of introducing a constant $C_N$ we can start taking the sum at a large index $N$. $\sum_{n=1} \cos (\sqrt n) = C_N +\sum_{n=N} \cos (\sqrt n)$

Define $x_n = \sqrt n$ so have $\sum_{n=N} \cos (\sqrt n) / n = \sum_{n=N} \cos (x_n) / x_n^2$.

Defining $\Delta x_n = x_{n+1} - x_{n}$ we have $\Delta x_n \approx \frac 1 {2 \sqrt n} = \frac 1 {2 x_n}$ via first order taylor expansion of $x(n+1) \approx x(n) + x'(n)\cdot 1$

Substituting into the sum, we have $ \sum_{n=N} \cos (\sqrt n) / n \approx 2 \sum_{n=N}\cos (x_n) / x_n \Delta x_n$. The right hand side is a Riemann / Darboux integral for $2 \int_{\sqrt N} \frac {\cos x} x dx$ and the integral is finite.

$\endgroup$
1
  • $\begingroup$ That does make sense now $\endgroup$ Feb 24, 2021 at 13:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .