# Find $\limsup\limits_{x\rightarrow\infty}\ (\sin(x)+\sin(\pi x))$

I'm studying for my Qualifying exams and this was one of the questions in the question bank under real analysis section. I'm currently stuck on this question. I think the answer is 2 but don't have a rigorous proof.

Find $$\limsup\limits_{x\rightarrow\infty}\ (\sin(x)+\sin(\pi x))$$.

My attempt: I tried to look at the sequence $$x_n=\frac{1}{2}+2n$$ but not sure how to calculate further and find the $$\limsup$$

• Does this answer your question? Minimum of sum of incommensurable functions May 10 '21 at 5:21
• I have given an answer which uses continued fractions. If you want something that doesn't use continued fractions, I can add that, but it is only an existence proof, it won't produce any examples.
– robjohn
May 14 '21 at 16:59
• @robjohn Beautiful answer. Would you mind giving your sketch for a proof without continued fractions?
– Ovi
May 15 '21 at 0:28

Your original idea of looking at $$x=\frac12+2n$$ is in the right direction, because that gives $$\sin(\pi x)=1$$. The remaining piece is to seek $$x\approx\left(\frac12+2m\right)\pi$$ so that $$\sin(x)\approx1$$.

What We Would Like

If $$|\,(4m+1)\pi-(4n+1)\,|\le2\epsilon$$, then \begin{align} 1-\sin\left(2n+\tfrac12\right) &=\left|\,\sin\left(\left(2m+\tfrac12\right)\pi\right)-\sin\left(2n+\tfrac12\right)\tag{1a}\,\right|\\[6pt] &\le\left|\,\left(2m+\tfrac12\right)\pi-\left(2n+\tfrac12\right)\,\right|\tag{1b}\\[6pt] &\le\epsilon\tag{1c} \end{align} Explanation:
$$\text{(1a)}$$: $$1-\sin(x)\ge0$$ and $$\sin\left(\left(2m+\tfrac12\right)\pi\right)=1$$
$$\text{(1b)}$$: $$|\sin(x)-\sin(y)|=2\left|\,\cos\left(\frac{x+y}2\right)\sin\left(\frac{x-y}2\right)\,\right|\le|x-y|$$
$$\text{(1c)}$$: assumption about $$m$$ and $$n$$

Since $$\sin\left(\left(2n+\tfrac12\right)\pi\right)=1$$, we have $$\overbrace{\sin\left(2n+\tfrac12\right)}^{\ge1-\epsilon}+\overbrace{\sin\left(\left(2n+\tfrac12\right)\pi\right)}^{=1}\ge2-\epsilon\tag2$$ Thus, given an $$\epsilon\gt0$$, we would like to find $$m,n\in\mathbb{Z}$$ so that $$|\,(4m+1)\pi-(4n+1)\,|\le2\epsilon$$.

Results from Continued Fraction Approximations

Suppose that $$\frac{p_{n-1}}{q_{n-1}}$$ and $$\frac{p_n}{q_n}$$ are two consecutive continued fraction convergents for $$\pi$$. Then \begin{align} \left|\,\frac{p_{n-1}}{q_{n-1}}-\pi\,\right|+\left|\,\pi-\frac{p_n}{q_n}\,\right| &=\left|\,\frac{p_{n-1}}{q_{n-1}}-\frac{p_n}{q_n}\,\right|\tag{3a}\\ &=\frac1{q_{n-1}q_n}\tag{3b} \end{align} Explanation:
$$\text{(3a)}$$: $$\pi$$ is between any two consecutive convergents
$$\text{(3b)}$$: a property of continued fraction convergents: $$p_{n-1}q_n-p_nq_{n-1}=(-1)^{n-1}$$

For any $$a,b\ge0$$, since $$p_{n-1}-q_{n-1}\pi$$ and $$p_n-q_n\pi$$ have different signs, $$(3)$$ implies \begin{align} |(ap_{n-1}+bp_n)-(aq_{n-1}+bq_n)\pi| &=|a(p_{n-1}-q_{n-1}\pi)+b(p_n-q_n\pi)|\tag{4a}\\[3pt] &\le\frac{\max(a,b)}{q_n}\tag{4b} \end{align} Consider the matrix whose columns are consecutive convergents of $$\pi$$. By $$(3)$$, the determinant is $$\pm1$$.

Suppose \begin{align} \begin{bmatrix}p_{n-1}&p_n\\q_{n-1}&q_n\end{bmatrix}^{-1}\begin{bmatrix}1\\1\end{bmatrix} &=(-1)^{n-1}\begin{bmatrix}q_n&-p_n\\-q_{n-1}&p_{n-1}\end{bmatrix}\begin{bmatrix}1\\1\end{bmatrix}\tag{5a}\\[3pt] &=\begin{bmatrix}(-1)^n(p_n-q_n)\\(-1)^{n-1}(p_{n-1}-q_{n-1})\end{bmatrix}\tag{5b}\\[3pt] &\equiv\begin{bmatrix}a\\b\end{bmatrix}\pmod4\tag{5c} \end{align} where $$0\le a,b\lt4$$. Then $$\begin{bmatrix}p_{n-1}&p_n\\q_{n-1}&q_n\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix}\equiv\begin{bmatrix}1\\1\end{bmatrix}\pmod4\tag6$$ Thus, we have from $$(5)$$ $$ap_{n-1}+bp_n\equiv aq_{n-1}+bq_n\equiv1\pmod4\tag7$$ and from $$(4)$$ $$|(ap_{n-1}+bp_n)-(aq_{n-1}+bq_n)\pi|\le\frac{\max(a,b)}{q_n}\tag8$$

Convergents and Examples

Here are some examples of generating $$n$$ and $$m$$ that satisfy $$(1)$$ for arbitrarily small $$\epsilon\gt0$$.

The convergents for $$\pi$$ start out $$\frac31,\frac{22}7,\frac{333}{106},\frac{355}{113},\frac{103993}{33102},\frac{104348}{33215},\dots$$ Example $$\bf{1}$$

Using the first two convergents as columns: $$\begin{bmatrix}3&22\\1&7\end{bmatrix}^{-1}\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}15\\-2\end{bmatrix}\equiv\begin{bmatrix}3\\2\end{bmatrix}\pmod4$$ and $$\begin{bmatrix}3&22\\1&7\end{bmatrix}\begin{bmatrix}3\\2\end{bmatrix}=\begin{bmatrix}53\\17\end{bmatrix}\equiv\begin{bmatrix}1\\1\end{bmatrix}\pmod4$$ and $$|53-17\pi|=0.407075$$ which is less than $$\frac37$$ as given in $$(4)$$. $$\bbox[5px,border:2px solid #C0A000]{\sin\left(\frac{53}2\right)+\sin\left(\frac{53}2\pi\right)=1.9793576431}$$ Example $$\bf{2}$$

Using the third and fourth convergents as columns: $$\begin{bmatrix}333&355\\106&113\end{bmatrix}^{-1}\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}242\\-7\end{bmatrix}\equiv\begin{bmatrix}2\\1\end{bmatrix}\pmod4$$ and $$\begin{bmatrix}333&355\\106&113\end{bmatrix}\begin{bmatrix}2\\1\end{bmatrix}=\begin{bmatrix}1021\\325\end{bmatrix}\equiv\begin{bmatrix}1\\1\end{bmatrix}\pmod4$$ and $$|1021-325\pi|=0.0176124$$ which is less than $$\frac2{113}$$ as given in $$(4)$$. $$\bbox[5px,border:2px solid #C0A000]{\sin\left(\frac{1021}2\right)+\sin\left(\frac{1021}2\pi\right)=1.9999612255979}$$ Example $$\bf{3}$$

Using the fourth and fifth convergents as columns: $$\begin{bmatrix}355&103993\\113&33102\end{bmatrix}^{-1}\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}-70891\\242\end{bmatrix}\equiv\begin{bmatrix}1\\2\end{bmatrix}\pmod4$$ and $$\begin{bmatrix}355&103993\\113&33102\end{bmatrix}\begin{bmatrix}1\\2\end{bmatrix}=\begin{bmatrix}208341\\66317\end{bmatrix}\equiv\begin{bmatrix}1\\1\end{bmatrix}\pmod4$$ and $$|208341-66317\pi|=0.000008114318$$ which is less than $$\frac2{33102}$$ as given in $$(4)$$. $$\bbox[5px,border:2px solid #C0A000]{\sin\left(\frac{208341}2\right)+\sin\left(\frac{208341}2\pi\right)=1.99999999999176973}$$

• Thanks for the excellent answer. I'm curious to see your proof, or the idea of the proof, without continued fractions. But, if you don't wanna write it, that's completely fine with me. May 16 '21 at 2:38
• I am writing up the other proof, but I have been taken away by other matters. I will get back to it soon.
– robjohn
May 16 '21 at 20:36
• Done.
– robjohn
May 19 '21 at 13:48
• Is there a reason for the downvote? I would like to fix whatever is wrong, but I can't do that if I don't know what is wrong.
– robjohn
Aug 7 '21 at 17:03

Here is the alternate answer I offered a while ago. The beginning is identical, but from $$(3)$$ on is an approach not using continued fractions.

Your original idea of looking at $$x=\frac12+2n$$ is in the right direction, because that gives $$\sin(\pi x)=1$$. The remaining piece is to seek $$x\approx\left(\frac12+m\right)\pi$$ so that $$\sin(x)\approx1$$.

What We Would Like

If $$|\,(4m+1)\pi-(4n+1)\,|\le2\epsilon$$, then \begin{align} 1-\sin\left(2n+\tfrac12\right) &=\left|\,\sin\left(\left(2m+\tfrac12\right)\pi\right)-\sin\left(2n+\tfrac12\right)\tag{1a}\,\right|\\[6pt] &\le\left|\,\left(2m+\tfrac12\right)\pi-\left(2n+\tfrac12\right)\,\right|\tag{1b}\\[6pt] &\le\epsilon\tag{1c} \end{align} Explanation:
$$\text{(1a)}$$: $$1-\sin(x)\ge0$$ and $$\sin\left(\left(2m+\tfrac12\right)\pi\right)=1$$
$$\text{(1b)}$$: $$|\sin(x)-\sin(y)|=2\left|\,\cos\left(\frac{x+y}2\right)\sin\left(\frac{x-y}2\right)\,\right|\le|x-y|$$
$$\text{(1c)}$$: assumption about $$m$$ and $$n$$

Since $$\sin\left(\left(2n+\tfrac12\right)\pi\right)=1$$, we have $$\overbrace{\sin\left(2n+\tfrac12\right)}^{\ge1-\epsilon}+\overbrace{\sin\left(\left(2n+\tfrac12\right)\pi\right)}^{=1}\ge2-\epsilon\tag2$$ Thus, given an $$\epsilon\gt0$$, we would like to find $$m,n\in\mathbb{Z}$$ so that $$|\,(4m+1)\pi-(4n+1)\,|\le2\epsilon$$.

Pigeonhole Approximations

Suppose $$\pi$$ is a positive irrational number. Choose an $$N$$ and break $$[0,1)$$ into $$N$$ equal sub-intervals $$\left\{I_k=\left[\frac kN,\frac{k+1}N\right):0\le k\lt N\right\}\tag3$$ Using $$\{x\}=x-\lfloor x\rfloor$$, consider the $$N+1$$ real numbers $$\{\{j\pi\}:0\le j\le N\}\tag4$$ which live in $$[0,1)$$. The Pigeonhole Principle says that there must be one of the $$N$$ sub-intervals, $$I_k$$, that contains at least two of the $$N+1$$ real numbers, $$\{j_1\pi\}\lt\{j_2\pi\}$$. Note that this does not imply that $$j_1\lt j_2$$, only that $$0\lt\{(j_2-j_1)\pi\}\lt\frac1N\tag5$$ $$(5)$$ says that there are integers $$p,q\in\mathbb{Z}$$, with $$|q|\le N$$, so that $$0\lt p+q\pi\lt\frac1N\tag6$$ The set \begin{align} M &=\left\{j(p+q\pi):1\le j\lt\frac1{p+q\pi}\right\}\tag{7a}\\ &=\left\{\{jq\pi\}:1\le j\lt\frac1{\{q\pi\}}\right\}\tag{7b} \end{align} has at least one element in each $$I_k$$ since the distance between elements of $$M$$ is $$p+q\pi\lt\frac1N$$. Furthermore, $$M$$ covers all of the $$I_k$$ because $$j\gt\frac1{p+q\pi}\implies j(p+q\pi)\gt1$$.

Since $$N$$ can be as large as we wish, we have shown that $$\{\mathbb{Z}\pi\}$$ is dense in $$[0,1]$$.

Getting What We Want

We can rewrite the condition $$|\,(4m+1)\pi-(4n+1)\,|\le2\epsilon$$ from above as \begin{align} \frac\epsilon2 &\ge\left|\,m\pi-n+\frac{\pi-1}4\right|\tag{8a}\\ &=\left|\{m\pi\}-\frac{5-\pi}4\right|\tag{8b} \end{align} We can find an $$m$$ to satisfy $$(8)$$ because $$\{\mathbb{Z}\pi\}$$ is dense in $$[0,1]$$.

You're off to a good start. If $$x = 2n+\frac12$$ then $$\sin \pi x=1$$. How big can we make $$\sin x$$ though? We'd like to say $$x\approx 2m\pi+\frac\pi2$$ so that $$\sin x\approx 1$$ and then conclude that the $$\limsup$$ is $$2$$. Then we'd have $$\pi\approx\frac{2n+1/2}{2m+1/2}=\frac{4n+1}{4m+1}$$ So, that's the plan of attack. Show that there is an infinite sequence of fractions of this form converging to $$\pi$$ and then conclude that there is a sequence $$(x_n)$$ such that $$\lim_{n\to\infty}\sin(x_n)+\sin(\pi x_n)=2$$

Can you carry out the plan?

EDIT

The above is incorrect. See the correction by Thomas Andrews in the comments.

• Converging to $\pi$ is not enough, you need $$4n_i+1-\pi(4m_i+1)\to 0.$$ That is harder. May 10 '21 at 5:12
• @ThomasAndrews You're right. I'm getting sleepy, I'm afraid. May 10 '21 at 5:15

Not an answer, but too,long for comment.

$$2$$ is certainly an upper bound, and is likely the supremes. What you want is:

$$x\approx \frac{\pi}{2}(4n+1)\\ \pi x\approx \frac{\pi}{2}(4m +1)$$

If $$x=\frac 12(4m+1)$$ then you need:

$$\pi\approx \frac{4m+1}{4n+1}\tag 1$$

The question is, how good an approximation can we get in this form? If $$(4m+1)/(4n+1)$$ is in the continued fraction for $$\pi,$$ then:$$-\frac1{2(4n+1)}<\frac12(4n+1)\pi-\frac12 (4m+1)<\frac1{2(4n+1)}$$ In which case $$\sin ((4m+1)/2)>1-\frac1{4(4n+1 )^2}$$ So if there are infinitely many such continued fractions, we can get closer and closer to $$2.$$

But I can’t think of any way to ensure the continued fractions will take this form infinitely often. Given the apparent randomness of the coefficients for $$\pi,$$ we might expect a convergent of this form in one out of ever $$12$$ convergents, but proving that will be hard.

The first example is:$$\frac{208341}{66317}$$ and $$x=\frac{208341}{2},$$ and, according to my calculator, $$1-\sin x <\frac1{10^{11}}.$$

The next is $$\frac{165707065}{52746197}.$$

But proving there are infinitely many will be hard.

So we might need less stringent conditions on $$m,n.$$ We need a sequence $$(m_i,n_i)$$ such that:

$$\pi(4m_i+1)-(4n_i+1)\to 0.$$

• So, you just need $\pi m + \frac{\pi-1}{4}$ to be close to an integer, for which I think it should be sufficient to use that the image of $\pi \mathbb{Z}$ is dense in $\mathbb{R}/\mathbb{Z}$. May 10 '21 at 6:09
• While finding "limsup"when one sequence say a_n converges to "a" then limsup of (a_n +b_n) =a+limsup b_n. Can we use this result for the chosen sequence a_n=(2n+1) (pi/2)? May 10 '21 at 6:11
• Yeah, you are right, @DanielSchepler May 10 '21 at 6:16
• We don't actually need to use a convergent, but we can take combinations of two consecutive convergents. For example, neither $\frac{333}{106}$ nor $\frac{355}{113}$ are $\frac{4n+1}{4m+1}$. However, $\frac{2\cdot333+355}{2\cdot106+113}=\frac{1021}{325}$ which gives $\sin\left(\frac{1021}2\right)+\sin\left(\frac{1021}2\pi\right)=1.9999612$.
– robjohn
May 10 '21 at 7:56
• @robjohn thanks! I looked for such an example,,but didn’t find this one. May 10 '21 at 14:09