Approximating the roots of $\sum_{k=1}^n{\sin{\left(\frac{x}{k}\right)}}$ for large $n$ and large $x$.

177 Views Asked by At

Here is the graph of $\sum_{k=1}^{n}{\sin{\left(\frac{x}{k}\right)}}$ for $n=1000$.

enter image description here

There appear to be roots, or actually "clusters" of roots, at:

$x\approx2.17n$
$x\approx5.05n$
$x\approx8.07n$
$x\approx11.2n$
$x\approx14.3n$
$x\approx17.4n$
$x\approx20.5n$
$x\approx23.7n$
$x\approx26.9n$

It seems that, for large $n$ and large $x$, the gap between clusters is $\pi n$.

For large $n$ and large $x$, what pattern emerges for the locations of these clusters of roots, and why?

My attempt:

Expressing the series as a Riemann sum, we are looking for the values of $x$ such that

$$n\int_0^1{\sin{\left(\frac{x/n}{t}\right)}}dt=0$$

What values of $x$ satisfy this equation?

2

There are 2 best solutions below

11
On BEST ANSWER

Approximating the Sum

Let's say that $x=\lambda n$ $$\newcommand{\Ci}{\operatorname{Ci}} \begin{align} \sum_{k=1}^n\sin\left(\frac xk\right) &=\sum_{k=1}^n\sin\left(\frac{\lambda n}k\right)\tag{1a}\\ &=n\sum_{k=1}^n\sin\left(\frac{\lambda n}k\right)\frac1n\tag{1b}\\ &\sim n\int_0^1\sin\left(\frac\lambda u\right)\,\mathrm{d}u\tag{1c}\\ &=n\lambda\int_\lambda^\infty\frac{\sin(u)}{u^2}\,\mathrm{d}u\tag{1d}\\ &=n\lambda\left(\frac{\sin(\lambda)}\lambda+\int_\lambda^\infty\frac{\cos(u)}u\,\mathrm{d}u\right)\tag{1e}\\ &=n\lambda\left(\frac{\sin(\lambda)}\lambda-\Ci(\lambda)\right)\tag{1f} \end{align} $$ Explanation:
$\text{(1a):}$ $x=\lambda n$
$\text{(1b):}$ multiply by $n\cdot\frac1n$
$\text{(1c):}$ approximate a Riemann Sum with an integral
$\text{(1d):}$ substitute $u\mapsto\frac\lambda u$
$\text{(1e):}$ integrate by parts
$\text{(1f):}$ $\Ci(\lambda)=-\int_\lambda^\infty\frac{\cos(u)}u\,\mathrm{d}u$ by definition

enter image description here

Multiply the numbers on both axes by $1000$ and this matches the image in the question pretty well.


Approximating the Roots of $\bf{(1f)}$

Integration by parts gives $$ \hspace{-12pt}\small\Ci(\lambda)=\frac{\sin(\lambda)}{\lambda}-\frac{\cos(\lambda)}{\lambda^2}-\frac{2\sin(\lambda)}{\lambda^3}+\frac{6\cos(\lambda)}{\lambda^4}+\frac{24\sin(\lambda)}{\lambda^5}-120\int_\lambda^\infty\frac{\sin(u)}{u^6}\,\mathrm{d}u\tag2 $$ Thus, $$ \sin(\lambda)-\lambda\Ci(\lambda)=\frac{\cos(\lambda)}{\lambda}+\frac{2\sin(\lambda)}{\lambda^2}-\frac{6\cos(\lambda)}{\lambda^3}-\frac{24\sin(\lambda)}{\lambda^4}+O\!\left(\frac1{\lambda^5}\right)\tag3 $$ Using the first term of $(3)$, the roots of $\sin(\lambda)-\lambda\Ci(\lambda)$ should tend to the roots of $\cos(\lambda)=0$; that is $\lambda=\left(m+\frac12\right)\!\pi$ for $m\in\mathbb{Z}$.

Using the first two terms of $(3)$, the roots should tend to the roots of $\tan\left(\lambda-\frac\pi2\right)=\frac2\lambda$; that is, $\lambda\approx\left(m+\frac12\right)\!\pi+\frac2{\left(m+\frac12\right)\pi}$ for $m\in\mathbb{Z}$. $$ \begin{array}{l|l} m&\lambda:\text{root of }(3)&\left(m+\frac12\right)\pi&\left(m+\frac12\right)\pi+\frac2{\left(m+\frac12\right)\pi}\\\hline 0&\phantom{0}2.1562352499&\phantom{0}1.5707963268&\phantom{0}2.8440358715\\ 1&\phantom{0}5.0465185699&\phantom{0}4.7123889804&\phantom{0}5.1368021620\\ 2&\phantom{0}8.0813348344&\phantom{0}7.8539816340&\phantom{0}8.1086295429\\ 3&11.1660275642&10.9955742876&11.1774656511\\ 4&14.2728635755&14.1371669412&14.2786380017\\ 5&17.3912167409&17.2787595947&17.3945086443\\ 6&20.5162494516&20.4203522483&20.5182937518\\ 7&23.6454749210&23.5619449019&23.6468275382\\ 8&26.7774943010&26.7035375555&26.7784339993\\ 9&29.9114642648&29.8451302091&29.9121428167 \end{array} $$


Estimating the Error in Step $\bf{(1c)}$

For any $\epsilon\gt0$, $$ \left|\,\sum_{k=1}^{\lfloor\epsilon n\rfloor}\sin\left(\frac{\lambda n}k\right)\frac1n\,\right|\le\epsilon\tag4 $$ and $$ \left|\,\int_0^\epsilon\sin\left(\frac\lambda u\right)\,\mathrm{d}u\,\right|\le\epsilon\tag5 $$ The error in approximating $$ \sum_{k=\lfloor\epsilon n\rfloor+1}^n\sin\left(\frac{\lambda n}k\right)\frac1n=\int_\epsilon^1\sin\left(\frac\lambda u\right)\,\mathrm{d}u\tag6 $$ is the variation of the integrand times the step size. For $u\in[\epsilon,1]$ the variation of $\sin\left(\frac\lambda u\right)$ is bounded by $\frac{2\lambda}{\pi\epsilon}$ and the step size is $\frac1n$. Thus, if we use $\epsilon=\left(\frac{\lambda}{\pi n}\right)^{1/2}$, we get the error in approximating $$ \sum_{k=1}^n\sin\left(\frac{\lambda n}k\right)\frac1n=\int_0^1\sin\left(\frac\lambda u\right)\,\mathrm{d}u\tag7 $$ is bounded by $$ 2\epsilon+\frac{2\lambda}{\pi\epsilon n}=4\left(\frac{\lambda}{\pi n}\right)^{1/2}\tag8 $$ This is sufficient for finding the values of $\lambda$ where the sum crosses $0$.


Asymptotic Series for the Roots of $\bf{(3)}$

We can extend $(3)$ as follows: $$ \begin{align} &\sin(\lambda)-\lambda\operatorname{Ci}(\lambda)\\ &=\cos(\lambda)\left(\frac1{\lambda}-\frac6{\lambda^3}+\frac{120}{\lambda^5}-\frac{5040}{\lambda^7}+\frac{362880}{\lambda^9}+O\!\left(\frac1{\lambda^{11}}\right)\right)\\ &{}+{}\sin(\lambda)\left(\frac2{\lambda^2}-\frac{24}{\lambda^4}+\frac{720}{\lambda^6}-\frac{40320}{\lambda^8}+\frac{3628800}{\lambda^{10}}+O\!\left(\frac1{\lambda^{12}}\right)\right)\tag9\\ \end{align} $$ which has roots when $$ \begin{align} \tan\left(\lambda-\frac\pi2\right) &=-\cot(\lambda)\tag{10a}\\ &=\frac{\frac2{\lambda^2}-\frac{24}{\lambda^4}+\frac{720}{\lambda^6}-\frac{40320}{\lambda^8}+\frac{3628800}{\lambda^{10}}+O\!\left(\frac1{\lambda^{12}}\right)}{\frac1{\lambda}-\frac6{\lambda^3}+\frac{120}{\lambda^5}-\frac{5040}{\lambda^7}+\frac{362880}{\lambda^9}+O\!\left(\frac1{\lambda^{11}}\right)}\tag{10b}\\ &=\frac2\lambda-\frac{12}{\lambda^3}+\frac{408}{\lambda^5}-\frac{26352}{\lambda^7}+\frac{2635488}{\lambda^9}+O\!\left(\frac1{\lambda^{11}}\right)\tag{10c} \end{align} $$ which leads to the recursion $$ \hspace{-12pt}\lambda=\left(m+\frac12\right)\pi+\tan^{-1}\left(\frac2\lambda-\frac{12}{\lambda^3}+\frac{408}{\lambda^5}-\frac{26352}{\lambda^7}+\frac{2635488}{\lambda^9}+O\!\left(\frac1{\lambda^{11}}\right)\right)\tag{11} $$ which, upon iterating and setting $\mu=\left(m+\tfrac12\right)\pi$, leads to the asymptotic series $$ \lambda=\mu+\frac2\mu-\frac{56}{3\mu^3}+\frac{8936}{15\mu^5}-\frac{3741824}{105\mu^7}+\frac{1055734496}{315\mu^9}+O\!\left(\frac1{\mu^{11}}\right)\tag{12} $$ The first two terms of $(12)$ were used to generate the table following $(3)$. $(12)$ is not very good for small $m$, which is normal for asymptotic series, but is much better for large $m$: $$ \begin{array}{r|r} m&\scriptsize\lambda:\sin(\lambda)+\lambda\operatorname{Ci}(\lambda)=0&\text{value from }(12)\\\hline 0&2.1562352499&56115.9471256\\ 1&5.0465185699&7.4488639194\\ 2&8.0813348344&8.1001763470\\ 3&11.1660275642&11.1667233185\\ 4&14.2728635755&14.2729191745\\ 5&17.3912167409&17.3912238551\\ 6&20.5162494516&20.5162507055\\ 7&23.6454749210&23.6454752000\\ 8&26.7774943010&26.7774943752\\ 9&29.9114642648&29.9114642874\\ 10&33.0468477414&33.0468477492\\ 15&48.7355988299&48.7355988300\\ 20&64.4336346713&64.4336346713\\ \end{array} $$

4
On

$$\int_0^1{\sin{\left(\frac{x}{nt}\right)}}dt=\sin \left(\frac{x}{n}\right)-\frac{x }{n}\,\text{Ci}\left(\frac{x}{n}\right)$$ Let $y=\frac{x}{n}$ and you look for the zeros of function $$f(y)=\sin (y)-y \,\text{Ci}(y)$$ Using @robjohn's answer, the first iterate of Newton ot Halley method around $y=\left(m+\frac{1}{2}\right) \pi$ is given by

$$y_{(2,3)}=\frac{(-1)^m}{K_m} \qquad \text{with} \qquad K_m=\text{Ci}\left(\left(m+\frac{1}{2}\right) \pi \right)$$

Using instead Householder method $$y_{(4)}=t\,\,\frac{ (-1)^m \left(t^2-6\right)K_m^2-2 t K_m +(-1)^m} {-6 tK_m^3 + (-1)^m t^2K_m^2-2 tK_m +(-1)^m }\qquad \text{with} \qquad t=\left(m+\frac{1}{2}\right) \pi$$

Some results $$\left( \begin{array}{cccc} m & y_{(2,3)} & y_{(4)} &\text{solution} \\ 0 & 2.1186411 & 2.1582777 & 2.1562352 \\ 1 & 5.0401305 & 5.0465284 & 5.0465115 \\ 2 & 8.0793538 & 8.0813336 & 8.0813344 \\ 3 & 11.165197 & 11.166027 & 11.166028 \\ 4 & 14.272446 & 14.272863 & 14.272864 \\ 5 & 17.390979 & 17.391217 & 17.391217 \\ 6 & 20.516102 & 20.516249 & 20.516249 \\ 7 & 23.645378 & 23.645475 & 23.645475 \\ 8 & 26.777427 & 26.777494 & 26.777494 \\ 9 & 29.911416 & 29.911464 & 29.911464 \\ 10 & 33.046811 & 33.046848 & 33.046848 \end{array} \right)$$

Using $y_{(2,3)}$, the asymptotic distance between two roots is given by $$\Delta_{(m+1,m)}=\pi -\frac{2}{\pi m^2}+O\left(\frac{1}{m^3}\right)$$

Edit

Another solution is to let $$y=\left(m+\frac{1}{2}\right) \pi+x$$ Then expand as series around $x=0$ and follow by a series reversion to have $$x=w+(-1)^m \frac{w^3 (2 t-w)}{12 t^2 \,K_m }+O(w^5)\qquad \text{with} \qquad w=-t+\frac {(1)^m} {K_m} $$ which is simpler, better than $y_{(2,3)}$ but worse than $y_{(4)}$.

For $m=0$, it will give $y=2.14916$ and, for $m=1$, $y=5.04619$

Update

Using $$t=(2m+1)\frac \pi 2 \qquad \text{and } \qquad L=\text{Ci}(t)$$ the series expansion of $f(y)$ is $$f(y)=\Big[(-1)^m-t\,L\Big]-L (y-t)+\frac{(-1)^m}{6t}\sum_{n=3}^\infty (-1)^{n-1} \, P_n(t) \, (y-t)^n$$ where the first polynomials $P_n(t)$ are $$\left( \begin{array}{cc} n & P_n(t) \\ 3 & 1 \\ 4 & \frac{1}{2 t} \\ 5 & \frac{3}{10 t^2}-\frac{1}{20}\\ 6 & \frac{1}{5 t^3}-\frac{1}{30 t} \\ 7 & \frac{1}{7 t^4}-\frac{1}{42 t^2}+\frac{1}{840} \\ 8 & \frac{3}{28 t^5}-\frac{1}{56 t^3}+\frac{1}{1120 t}\\ 9 & \frac{1}{12 t^6}-\frac{1}{72 t^4}+\frac{1}{1440 t^2}-\frac{1}{60480} \\ 10 & \frac{1}{15 t^7}-\frac{1}{90 t^5}+\frac{1}{1800 t^3}-\frac{1}{75600 t} \\ 11 & \frac{3}{55 t^8}-\frac{1}{110 t^6}+\frac{1}{2200 t^4}-\frac{1}{92400 t^2}+\frac{1}{6652800} \\ 12 & \frac{1}{22 t^9}-\frac{1}{132 t^7}+\frac{1}{2640 t^5}-\frac{1}{110880 t^3}+\frac{1}{7983360 t} \end{array} \right)$$

Considering now $$g(z)=a_0+a_1 \,z +\sum_{n=3}^\infty a_n\,z^n $$ and using series reversion $$z=-\frac{a_0}{a_1}+\frac{a_0^3 a_3}{a_1^4}-\frac{a_0^4 a_4}{a_1^5}-\frac{a_0^5 \left(3 a_3^2-a_1 a_5\right)}{a_1^7}+\frac{a_0^6 (7 a_3 a_4-a_1 a_6)}{a_1^8}+\cdots$$

Considering the expansion up to $O\big[(y-t)^{12}\big]$ , replacing the coefficients and computing

$$\left( \begin{array}{ccc} m &\text{estimate} &\text{solution} \\ 0 & \color{red}{2.156}0726691988474991 & 2.1562352499207028655 \\ 1 & \color{red}{5.0465185}531800573819 & 5.0465185698610751842 \\ 2 & \color{red}{8.0813348343}087486866 & 8.0813348343961138711 \\ 3 & \color{red}{11.1660275642}19194987 & 11.166027564221116458 \\ 4 & \color{red}{14.272863575496}435334 & 14.272863575496531499 \\ 5 & \color{red}{17.39121674085500}0157 & 17.391216740855008394 \\ 6 & \color{red}{20.51624945162485}3514 & 20.516249451624854543 \\ 7 & \color{red}{23.645474921006132}644 & 23.645474921006132814 \\ 8 & \color{red}{26.777494301026216}871 & 26.777494301026216906 \\ 9 & \color{red}{29.91146426477264437}0 & 29.911464264772644379 \\ 10 & \color{red}{33.04684774143358785}0 & 33.046847741433587853 \end{array} \right)$$