# Upper and lower limits of $f(x)=\cos(x^2)-\cos((x+1)^2)$ as $x\to\infty$.

I believe that the upper limit is +2 and the lower limit is -2. We have the trigonometric identity $\cos(x^2)-\cos((x+1)^2)=2\sin(x^2+x+1/2)\sin(x+1/2)$. We then make the substitution $x=m2\sqrt{\pi}$ where $m$ is a positive integer, so that $f(m2\sqrt{\pi})=2\sin^2(m2\sqrt{\pi}+1/2)$. From here we use the fact that for irrational $\gamma$, the set $S_\gamma=\{a+b\gamma\mid a\in\mathbb{Z}, b\in\mathbb{N}\}$ is dense in the reals, together with the continuity of sine to prove that $f$ can get arbitrarily close +2 on any domain of the form $(x,\infty)$. We can show that the lower limit of $f$ is -2 using similar reasoning and the substitution $x=(2n+1)\sqrt{\pi}$.

Is this proof right? Is there another proof that doesn't use the density lemma or even better, that doesn't discretize the domain (ie. doesn't restrict the domain to a countable set)? (I can give a proof of the density lemma, but it hasn't been checked.)

-
Your argument looks good to me. I think you've chosen the most natural approach: find a sequence along which the difference converges to 2 (resp., -2), and you find such a sequence by a density argument. – Gerry Myerson Sep 11 '12 at 3:06
The argument seems having problem as $1/2$ is fixed, not varying... – Solitary Jul 30 '15 at 18:02