Given series $\sum_{n=1}^{\infty}\frac {\cos(n^2)}n$.

It is easy to prove it does not converge absolutely.

I need to prove that it converges сconditionally.

I thought about using Dirichlet's test because $1/n$ series is monotone and $\lim_{n\rightarrow\infty} 1/n = 0$.

So the thing i need to prove is $\left|\sum_{1}^k \cos(n^2)\right| < M,\ \forall k$.

If there was $\cos(n)$ instead of $n^2$, it would be easy to prove this statement by multiplication and division by $\cos(0.5)$ and then using some trigonometric formula so that $\left|\sum_{1}^k \cos(n^2)\right| = \left|\frac{cos(0.5)-cos(n-0.5)}{\cos(0.5)}\right| < 2$ or something like that. But this approach seems to be impossible for $\cos(n^2)$.

Maybe there is a way to prove it using the fact that $\int \cos(x^2) = \sqrt{2/\pi}$?

Or any simpler way?

  • $\begingroup$ Your bounds would need to go from $1$ to $\infty$ since $\frac{\cos(n^2)}{n}$ is undefined at $0$. $\endgroup$
    – Kaj Hansen
    May 25, 2014 at 23:02
  • $\begingroup$ Sure, I'll fix it, thanks. $\endgroup$
    – Daniel
    May 25, 2014 at 23:03

1 Answer 1


It is sufficient to show that $$\left|\sum_{n=0}^{N}\cos(n^2)\right|\leq C\sqrt{N}\log N\tag{1}$$ to ensure convergence by partial summation. Consider that: $$\left|\sum_{n=1}^{N}e^{in^2}\right|^2 = \left(\sum_{n=1}^{N}e^{in^2}\right)\cdot\left(\sum_{n=1}^{N}e^{-in^2}\right)=N+\sum_{d=1}^{N-1}\sum_{r=1}^{N-d}2\cos(2dr+d^2),\tag{2}$$ and that: $$(2)\ll \sum_{d=1}^{N-1}\min\left(N-d,\left\|\frac{d}{\pi}\right\|^{-1}\right)\tag{3}$$ (where $\|x\|$ denotes the distance of $x$ from the closest integer) by the usual arguments about simple exponential sums. If now we take $\frac{a}{q}$ as a good rational approximation of $\frac{1}{\pi}$, $\left|\frac{a}{q}-\frac{1}{\pi}\right|<\frac{1}{3Nq}$, it is not difficult to see that: $$ (3)\ll \sum_{\substack{d=1\\q\nmid d}}^{N}\left\|\frac{a d}{q}\right\|^{-1}\ll(N+q)\log q\ll N\log N,\tag{4}$$ hence $(1)$ holds and the series $\sum_{n=1}^{+\infty}\frac{\cos n^2}{n}$ converges.

  • $\begingroup$ This is also known as "Weyl differencing trick". $(1)$ is just a consequence of the general en.wikipedia.org/wiki/Weyl%27s_inequality . $\endgroup$ May 25, 2014 at 23:31
  • $\begingroup$ I do not understand how to prove convergence then. What kind of convergence test that is? $\endgroup$
    – Daniel
    May 25, 2014 at 23:59
  • $\begingroup$ You can call it "generalized Dirichlet test", but is just partial summation. What we have is: $$\sum_{n=1}^{N}\frac{\cos(n^2)}{n}=\frac{1}{N}\sum_{n=1}^{N}\cos(n^2)+\sum_{n=1}^{N-1}\frac{1}{n(n+1)}\sum_{k=1}^{n}\cos(n^2)\ll\sum_{n=1}^{N}\frac{\sqrt{n}\log n}{n^2}.$$ $\endgroup$ May 26, 2014 at 2:14
  • $\begingroup$ Hi, great solution! I have a question: can you give some estimates for sums of form $\sum_{n=1}^N exp( i f(n))$ where $f$ is not a polynomial, but a bit more complicated, say $f(n) = \sqrt{n}$. ? $\endgroup$
    – orangeskid
    Aug 18, 2017 at 11:28
  • $\begingroup$ To anyone who is reading this after seven years, I think there is a (correctible) mistake in the proof. Namely, estimating the term $$\sum_{q | d} (N-d) \sim \frac{N^2}{2q}$$ requires a lower estimate for $q$, which depends on the Liouville-Roth constant. Luckily, we know that $\frac{1}{\pi}$ is not a Liouville number, so the series will still converge, but you will get some worse asymptotic growth than $O(\sqrt{N} \log N)$ for those cosines. $\endgroup$ May 22, 2021 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.