Show that $\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}\sin(1 + \frac{x}{n})$ converges uniformly on $\mathbb{R}$
I am trying to show the followng:
Show that $\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}\sin(1 + \frac{x}{n})$ converges uniformly on $\mathbb{R}$.
I have shown it for a compact subset of $\mathbb{R}$ however, do not know how to extend it to the reals. Below is my proof for convergence on a compact subset.
I break up the sum into two parts and attack each individually
$\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}\sin(1 + \frac{x}{n})$ = $\underbrace{\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}\sin(1)}_{(1)}$ + $\underbrace{\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}[\sin(1 + \frac{x}{n})-\sin(1)]}_{(2)}$.
$\textbf{Equation (1)}$
$\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}\sin(1)$ converges because $\sum_{n=1}^{\infty} \frac{(-1)^{n}}{\sqrt{n}}$ converges by the alternating series test.
$\textbf{Equation (2)}$
we will first bound $\sin(1 + \frac{x}{n})-\sin(1)$ as follows:
\begin{align*} |\sin(1 + \frac{x}{n})-\sin(1)| &= \Big|\int_{1}^{1+\frac{x}{n}} \cos(t)dt\Big| \\ &\leq \Big|\int_{1}^{1+\frac{x}{n}} |\cos(t)| dt\Big| \\ &\leq \Big|\int_{1}^{1+\frac{x}{n}} dt\Big| \\ &\leq \Big|1+\frac{x}{n} - 1 \Big| \\ &= \frac{|x|}{n} \\ \end{align*} Therefore, on any compact interval $ x \in [-M, M]$ \begin{align*} |\sin(1 + \frac{x}{n})-\sin(1)| \leq \frac{M}{n} \end{align*}
It follows that
\begin{align*} \Big|\frac{(-1)^{n}}{\sqrt{n}} \Big( \sin(1 + \frac{x}{n})-\sin(1)\Big)\Big| &= \Big|\frac{(-1)^{n}}{\sqrt{n}}\Big|\Big|\sin(1 + \frac{x}{n})-\sin(1)\Big| \\ &= \frac{1}{\sqrt{n}}\Big|\sin(1 + \frac{x}{n})-\sin(1)\Big| \\ &\leq \frac{1}{\sqrt{n}}\frac{M}{n} \\ &= \frac{M}{n^{\frac{3}{2}}} \end{align*}
Hence,
\begin{align*} \sum_{n}^{\infty}\frac{1}{n^{\frac{3}{2}}} < \infty &\implies \sum_{n}^{\infty}\frac{M}{n^{\frac{3}{2}}} < \infty \\ &\implies \sum_{n=1}^{\infty}\Big|\frac{(-1)^{n}}{\sqrt{n}} \Big[ \sin(1 + \frac{x}{n})-\sin(1)\Big]\Big| < \infty \\ &\implies \sum_{n=1}^{\infty}\frac{(-1)^{n}}{\sqrt{n}} \Big[ \sin(1 + \frac{x}{n})-\sin(1)\Big] < \infty \end{align*}
Hence, we have that both $(1)$ and $(2)$ converge on a compact interval $[-M,M]$ which implies our original equation of interest does also.
I want to extend this proof to all $\mathbb{R}$ but I do not know how to. Could someone please help me with this. Anything is appreciated.
EDIT: Since this is now a bountied question, I will explain the major sticking point in my proof where I began to hand-wave. For a fixed $N$, I have to show that
$$\inf_{x\in\mathbb{R}} \left \{\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{x}{n}\right)+(-1)^n\right)^2\right\}=0$$
I proved this fact by showing that a subsequence was equidistributed over $[0,1]$. Unfortunately, this portion of the proof is hand-wavy at best. However, the rest of the proof is solid.
We will attempt to prove that
$$\sum_{n=1}^\infty\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right)$$
does not converge uniformly on the reals. Unfortunately, some details of the proof require more careful attention to the analysis of special functions in the complex plain. While these details might be lacking in a formal proof, I feel that enough progress has been made here to write everything down.
Suppose that it converges uniformly. Let $N_0\in\mathbb{N}$ such that for all $M\geq N\geq N_0$
$$\left|\sum_{n=1}^{M}\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right)-\sum_{n=1}^{N}\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right) \right|=\left|\sum_{n=N+1}^{M}\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right)\right|<1$$
(this is the Cauchy criteria for uniform convergence with $\epsilon=1$). In fact, as long as $M\geq N\geq N_0$, we are free to choose any natural numbers. As such, choose $N= \text{max}(2,N_0)$ and $M=2N$ to get
$$\left|\sum_{n=N+1}^{2N}\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right)\right|<1$$
Now, consider the function
$$f(x)=\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{x}{n}\right)+(-1)^n\right)^2$$
Clearly, this function is defined for all $x\in\mathbb{R}$ and we know
$$0\leq \sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{x}{n}\right)+(-1)^n\right)^2\leq \sum_{n=N+1}^{2N}4=4(2N-N)=4N$$
Thus, we know that the infimum of $f(x)$ over the reals exists (as well as the supremum) and is well defined. We shall show that this infimum is $0$. To do this, we will show that a subsequence of real numbers is equidistributed over $[0,4N]$. First normalize by $4N$ so that
$$0\leq \frac{f(x)}{4N}\leq 1$$
Next, consider the sequence $x_k=k(2N)!$ for $k\in\mathbb{N}$. If we can show that
$$a_k=\frac{1}{4N}\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2$$
is equidistributed over $[0,1]$ then we are done. To do this, we will use Weyl's criterion. That is, a sequence $a_k$ is equidistributed over $[0,1]$ if and only if for all $l\in\mathbb{N}$ the limit
$$\lim_{m\to\infty}\frac{1}{m}\sum_{k=1}^m e^{2\pi i l a_k}=0$$
Now, plugging our sequence into the test we get
$$\lim_{m\to\infty}\left|\frac{1}{m}\sum_{k=1}^m e^{2\pi i l a_k}\right|=\lim_{m\to\infty}\left|\frac{1}{m}\sum_{k=1}^m \exp\left[ \frac{2\pi i l}{4N}\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2\right]\right|$$
$$\lim_{m\to\infty}\left|\frac{1}{m}\sum_{k=1}^m \prod_{n=N+1}^{2N}\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2\right]\right|$$
Since these are finite sums and products, there is no issue with reversing their order:
$$=\lim_{m\to\infty}\left| \prod_{n=N+1}^{2N}\frac{1}{m}\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2\right]\right|$$
$$=\prod_{n=N+1}^{2N}\lim_{m\to\infty}\left|\frac{1}{m}\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2\right]\right|$$
Thus, if we can show that
$$\lim_{m\to\infty}\left|\frac{1}{m}\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2\right]\right|=0$$
for arbitrary $n\leq 2N$ then we are done. To begin, since $n\leq 2N$, it is clear that
$$1+\frac{k(2N)!}{n}=1+k\frac{(2N)!}{n}$$
is an arithmetic sequence that increases by $(2N)!/n$ at each step. To simplify notation, we may as well call this natural number $b$. Then the problem simplifies to showing that
$$\lim_{m\to\infty}\left|\frac{1}{m}\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(bk+1\right)+(-1)^n\right)^2\right]\right|=0$$
for some $b\in\mathbb{N}$ and all $l\in\mathbb{N}$. Next, we will separate the $\sin(x)$ function
$$\sin(kb+1)=\cos(1)\sin(kb)+\sin(1)\cos(kb)$$
Now,
$$\left|\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(bk+1\right)+(-1)^n\right)^2\right]\right|=\left|\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\cos(1)\sin(kb)+\sin(1)\cos(kb)+(-1)^n\right)^2\right]\right|$$
$$=\left|\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\cos^2(1)\sin^2(kb) + 2 \cos(1)\sin(kb) \sin(1)\cos(kb) + \sin(1)^2\cos^2(kb) + 2 \cos(1)\sin(kb) (-1)^n + 2 \sin(1)\cos(kb) (-1)^n + 1\right)\right]\right|$$
As this is extremely difficult to read, let us rename these terms $s_1$ through $s_5$ (where $s_i$ is real):
$$=\left|\sum_{k=1}^m\exp\left[ i\left(s_1\sin^2(kb) + s_2\sin(kb) \cos(kb) + s_3\cos^2(kb) + s_4\sin(kb) + s_5\cos(kb) + 1\right)\right]\right|$$
Now, we can rewrite the exponential as
$$\exp\left[ i\left(s_1\sin^2(kb) + s_2\sin(kb) \cos(kb) + s_3\cos^2(kb) + s_4\sin(kb) + s_5\cos(kb) + 1\right)\right]$$ $$=e^{i}\exp\left[ i\left(s_1\sin^2(kb) + s_2\sin(kb) \cos(kb) + s_3\cos^2(kb) + s_4\sin(kb) + s_5\cos(kb) \right)\right]$$
$$=e^{i}\exp\left[ i\left((s_3+s_5)+(s_2+s_4)kb+\frac{1}{2}(2s_1-2s_3-s_5)k^2b^2+\cdots \right)\right]$$
where the infinite series is the Taylor series expansion for the trigonometric functions from the previous equality. What is important to note is that each power of $k$ will have an imaginary coefficient (as the addition of real numbers $s_i$ is multiplied by $i$) which go to zero (as sums and products of sinusoids are analytic, the coefficients must go to zero). Thus, we can rewrite this exponential as
$$=e^{i+g_0}\exp\left({\sum_{q=1}^\infty g_q k^q}\right)$$
where $g_q$ is a purely imaginary number. Having thoroughly run roughshod over all of our math at this point, we can put this series back into our original sum from $k=1$ to $m$:
$$\left|\sum_{k=1}^m\exp\left[ \frac{2\pi i l}{4N}\left(\sin\left(bk+1\right)+(-1)^n\right)^2\right]\right|=\left|\sum_{k=1}^me^{i+g_0}\exp\left({\sum_{q=1}^\infty g_q k^q}\right)\right|$$
$$\left|e^{i(1+\text{Im}(g_0)}\right|\left|\sum_{k=1}^m\prod_{q=1}^\infty\exp\left( g_q k^q\right)\right|$$
As the infinite product converges absolutely, we can switch it with the finite sum (and discard $e^{i(1+\text{Im}(g_0)}$)
$$=\left|\prod_{q=1}^\infty\sum_{k=1}^m\exp\left( g_q k^q\right)\right|=\prod_{q=1}^\infty\left|\sum_{k=1}^m\exp\left( g_q k^q\right)\right|$$
At this point, we are leaving what I at least am familiar with and instead journey into the land of special functions and limits in mathematica. That is, if anyone can fill in more details than what I will put down in this next section, please feel free.
First, note that we can approximate the finite sum with its integral counterpart to get
$$\sum_{k=1}^m\exp\left( g_q k^q\right)\approx\int_1^m\exp\left( g_q x^q\right)dx=\frac{E_{\frac{q-1}{q}}(-g_q)-m E_{\frac{q-1}{q}}\left(-g_q m^q\right)}{q}$$
Now, note that the next detail is slightly ambiguous, but it seems that since $Re(g_q)=0$ and $q>0$
$$\lim_{m\to\infty}m E_{\frac{q-1}{q}}\left(-g_q m^q\right)=0$$
Again, I do not have a proof for this and am only able to submit the following graph produced in mathematica as evidence
As you can see, for $1\leq q\leq 10$ and $-10\leq \text{Im}(g_q)\leq 10$ (with Re$(g_q)=0$) the limit is always $0$ (the artifact at the origin is simply because I set $m=1000$ to get this plot). Then for large $m$, the expression above becomes
$$\frac{E_{\frac{q-1}{q}}(-g_q)-m E_{\frac{q-1}{q}}\left(-g_q m^q\right)}{q}\approx \frac{E_{\frac{q-1}{q}}(-g_q)}{q}$$
In much the same way as above, I conjecture (and numerical evidence supports), that
$$\left|E_{\frac{q-1}{q}}(-g_q)\right|$$
goes to $0$ for large $q$ (mainly since $|g_q|\to 0$). Especially, it should be the case that this expression is bounded above by some constant (let us call it $Q$). Perhaps someone with more experience with complex analysis could investigate? With this, we get
$$\lim_{m\to\infty}\frac{1}{m}\prod_{q=1}^\infty\left|\sum_{k=1}^m\exp\left( g_q k^q\right)\right|\leq \lim_{m\to\infty}\frac{1}{m}\prod_{q=1}^\infty\left|\frac{Q}{q}\right|=0$$
After all that handwaving and limits by inspection, we have finally arrived at our original goal: namely that
$$a_k=\frac{1}{4N}\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{k(2N)!}{n}\right)+(-1)^n\right)^2$$
is equidistributed on $[0,1]$. Now, we can return to more solid ground. By definition, there exist infinite $k$ such that $a_k<1/(64\cdot 4N)$. Define $x=k_0(2N)!$ where $k_0$ is the smallest such $k$ where the inequality holds. Then we have
$$\frac{1}{64\cdot 4N}>\frac{f(x)}{4N}=\frac{1}{4N}\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{x}{n}\right)+(-1)^n\right)^2$$
$$\sum_{n=N+1}^{2N}\left(\sin\left(1+\frac{x}{n}\right)+(-1)^n\right)^2<\frac{1}{64}$$
Since this must hold as we sum from $N+1\leq n\leq 2N$, it must hold for the individual $n$. That is, for $N+1\leq n\leq 2N$
$$\left(\sin\left(1+\frac{x}{n}\right)+(-1)^n\right)^2<\frac{1}{64}$$ $$\left|\sin\left(1+\frac{x}{n}\right)+(-1)^n\right|<\frac{1}{8}$$
This implies that
$$\frac{7}{8} <\sin\left(1+\frac{x}{n}\right)\leq 1$$
for even $n$ and
$$-1 \leq\sin\left(1+\frac{x}{n}\right)<-\frac{7}{8}$$
for odd $n$. We can use these bounds in our original equation
$$\left|\sum_{n=N+1}^{2N}\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right)\right|>\frac{7}{8}\left|\sum_{n=N+1}^{2N}\frac{1}{\sqrt{n}}\right|$$
Now, one bound for this sum is
$$\frac{7}{8}\left|\sum_{n=N+1}^{2N}\frac{1}{\sqrt{n}}\right|=\frac{7}{8}\sum_{n=N+1}^{2N}\frac{1}{\sqrt{n}}>\frac{7}{8}\int_N^{2N+1}\frac{1}{\sqrt{x}}dx$$
$$=\frac{7}{4}(\sqrt{2N+1}-\sqrt{N})>\frac{7}{4}\sqrt{2N}-\sqrt{N})=\frac{7}{4}\sqrt{N}(\sqrt{2}-1)$$
$$\geq\frac{7}{4}\sqrt{2}(\sqrt{2}-1)=\frac{7}{2}-\frac{7}{2 \sqrt{2}}=1.02513>1$$
This is a contradiction. Thus, the series in question does not uniformly converge.
In conclusion, we have proved that
$$\sum_{n=1}^\infty\frac{(-1)^n}{\sqrt{n}}\sin\left(1+\frac{x}{n}\right)$$
does not converge uniformly on the reals. Unfortunately, there are a few details in the middle that need to be cleaned up by someone other than me as I do not trust my knowledge/expertise to do so.
The sum is not uniformly convergent on $\mathbb{R}$.
Take $\epsilon \in (0,\frac{1}{10})$. Suppose $N$ is large such that $|\sum_{N \le n \le 2N} \frac{(-1)^n}{\sqrt{n}}\sin(1+\frac{x}{n})| \le \epsilon$ for all $x \in \mathbb{R}$. Take $X = 2\pi\prod_{N \le n \le 2N} n$. Independent of the specific choice of $X$, we of course have $$\frac{1}{X}\int_0^{X} \left|\sum_{N \le n \le 2N} \frac{(-1)^n}{\sqrt{n}}\sin(1+\frac{x}{n})\right|^2dx \le \epsilon^2.$$ But due to the specific choice, we have $$\frac{1}{X}\int_0^{X} \left|\sum_{N \le n \le 2N} \frac{(-1)^n}{\sqrt{n}}\sin(1+\frac{x}{n})\right|^2dx$$ $$= \frac{1}{X}\int_0^X \sum_{N \le n,m \le 2N} \frac{(-1)^{n+m}}{\sqrt{nm}}\sin(1+\frac{x}{n})\sin(1+\frac{x}{m})dx$$ $$ = \frac{1}{X}\sum_{N \le n \le 2N} \frac{1}{n}\left(\frac{X}{2}-\frac{1}{4}n\sin(\frac{2(n+X)}{n})+\frac{1}{4}n\sin(2)\right),$$ where we used $\int \sin(1+\frac{x}{n})\sin(1+\frac{x}{m})dx = \frac{1}{2}mn\left(\frac{\sin(x(\frac{1}{n}-\frac{1}{m}))}{m-n}-\frac{\sin(\frac{x}{m}+\frac{x}{n}+2)}{m+n}\right)$ for $m \not = n$ (which takes the same value at $0$ and $X$ by our choice of $X$) and $\int \sin^2(1+\frac{x}{n})dx = \frac{x}{2}-\frac{1}{4}n\sin(\frac{2(n+x)}{n})$. And once again by our choice of $X$, we end up with $$\frac{1}{X}\sum_{N \le n \le 2N} \frac{X}{2n},$$ which is around $\frac{1}{2}\ln(2)$, much greater than $\frac{1}{100}$.