25
$\begingroup$

Consider $f(x)=\sum\limits_{k=1}^n\sin (kx), 0\le x \le \pi$.

Here is the graph of $y=f(x)$ for $n=8$.

enter image description here

I noticed that, as $n\to\infty$, the maximum value of $\frac1n f(x)$ seems to approach a limit of approximately $0.7246$.

What is $\lim\limits_{n\to\infty}\frac1n \left(\text{maximum value of }\sum\limits_{k=1}^n\sin (kx)\right)$ ?

My thoughts:

I tried to find the first turning point to the right of the $y$-axis, without success.

I don't know if this helps, but I have found the roots of $f(x)$, and shown that there is exactly one turning point between neighboring roots.

Finding the roots of $f(x)$

$f(x)=\text{Im}\sum\limits_{k=1}^n e^{kxi}=\dots=\dfrac{\sin x+\sin ((nx+x)-x)-\sin (nx+x)}{2-2\cos x}=0$

If $\sin (nx)=0$ then $(\sin x)(1-\cos (nx))=0\implies x=0, \pi, \frac{2k\pi}{n}$

If $\sin (nx+x)=0$ then $(\sin x)(1-\cos ((n+1)x)=0\implies x=0, \pi, \frac{2k\pi}{n+1}$

We have found $n+1$ distinct roots. Now we will show that these are the only roots.

$\sin (kx)=\text{Im}(\cos x+i\sin x)^k=(\sin x)(k-1 \text{ -degree polynomial in $\cos x$})$

$\implies f(x)=(\sin x)(n-1 \text{ -degree polynomial in }\cos x)$

The $n-1 \text{ degree polynomial in }\cos x$ has at most $n-1$ distinct roots in $\cos x$, so it has at most $n-1$ distinct roots in $x$. The roots of $\sin x$ are $0$ and $\pi$. So $f(x)$ has at most $n+1$ distinct roots in $x$. So the $n+1$ roots that I found above, are the only roots.

Showing that $f(x)$ has exactly one turning point between neighboring roots

$\cos (kx)=\text{Re}(\cos x+i\sin x)^k=k \text{ -degree polynomial in $\cos x$}$

$\implies f'(x)=\sum\limits_{k=1}^n k\cos (kx)$ is an $n$ -degree polynomial in $\cos x$

So $f'(x)$ has at most $n$ distinct roots in $\cos x$, so it has at most $n$ distinct roots in $x$.

So $f(x)$ has at most $n$ turning points. Earlier we found that $f(x)$ has at exactly $n+1$ distinct roots. So $f(x)$ has exactly one turning point between neighboring roots.

$\endgroup$

5 Answers 5

20
$\begingroup$

Define $f_n:[0,\pi]\to\mathbb{R}$ by

$$ f_n(x) = \sum_{k=1}^{n} \sin(kx) = \frac{\sin(\frac{n}{2}x)\sin(\frac{n+1}{2}x)}{\sin(\frac{x}{2})}. $$

1. Narrowing down the location of the maximum point. Note that $f_n(x) \geq 0$ if and only if $\sin(\frac{n}{2}x)$ and $\sin(\frac{n+1}{2}x)$ have the same sign, which occurs precisely when $x$ lies in one of the intervals of the form

$$ I_k = \left[ \frac{2\pi}{n}(k-1), \frac{2\pi}{n+1}k \right], \qquad k = 1,\ldots,n $$

Moreover, if $n \geq 2$, $k \geq 2$, and $x \in I_k\cap [0, \pi]$, then it can be shown that

$$ f_n(x) \leq \frac{1}{\sin(\frac{\pi}{n})} \leq \frac{1}{2\sin(\frac{\pi}{4n})} \leq f_n\left(\frac{\pi}{2n}\right). $$

Hence, the maximum point of $f_n$ lies in $I_1$.

2. Characterizing the limit. We know that the maximum point of $f_n$ occurs somewhere between $0$ and $\frac{2\pi}{n+1}$. So,

$$ \frac{1}{n} \max_{x \in [0, \pi]} f_n(x) = \max_{t \in [0, 2\pi]} \frac{f_n(t/n)}{n}. $$

However,

$$ \frac{f_n(t/n)}{n} = \sum_{k=1}^{n} \sin\left(\frac{tk}{n}\right) \frac{1}{n} \to \int_{0}^{1} \sin(tu) \, \mathrm{d}u = \frac{1 - \cos t}{t} $$

uniformly in $t \in [0, 2\pi]$. This uniform convergence guarantees that the maximum operator and limit can be interchanged, yielding

$$ M := \lim_{n\to\infty} \frac{1}{n} \max_{x \in [0, \pi]} f_n(x) = \max_{t \in [0, 2\pi]} \frac{1 - \cos t}{t}. $$

Below is the graph of $\frac{1-\cos t}{t}$ for $t \in [0, 2\pi]$.

Graph of the limiting function

Although the maximum point $t^*$ of this function is unlikely to be given by a closed form, it is easy to locate it numerically, yielding

$$ t^* \approx 2.3311223704144226136, \qquad M = \frac{1-\cos t^*}{t^*} \approx 0.7246113537767084758. $$

$\endgroup$
5
  • $\begingroup$ Did you consider that $\sin(x/2)<0$ and $\sin(nx/2),\sin((n+1)x/2)$ have different sign can occur to make $f_n>0$? $\endgroup$
    – FShrike
    Commented Oct 10, 2023 at 15:20
  • $\begingroup$ Also, it is maybe the case that $\sin(nx/2)$ and $\sin((n+1)x/2$ have the same sign but $\sin(x/2)$ is negative, making $f$ negative too. $\endgroup$
    – FShrike
    Commented Oct 10, 2023 at 15:31
  • 1
    $\begingroup$ @FShrike, Thankfully OP is only considering the range $0\leq x\leq\pi$, where $\sin(x/2)$ is only non-negative. Let me edit my answer so this is clarified. $\endgroup$ Commented Oct 10, 2023 at 22:20
  • $\begingroup$ Great solution! $\endgroup$ Commented Oct 12, 2023 at 9:54
  • $\begingroup$ Maybe interesting: the same problem with $s(n,x) = \frac{1}{n}\sum_{k=0}^{n} \sin^2(k x)$ requires to solve the equation $t=\tan(t)$ and results in the limit $n\to\infty$ numerically in $max(s) = 0.608617$. $\endgroup$ Commented Oct 13, 2023 at 19:21
4
$\begingroup$

An alternative to @Sangchul Lee's excellent answer is to note that $nM_n \to L$ for some $L \in [0,2\pi]$, where $M_n$ denotes the maximal point of $f_n$.

To see this, note that any convergent subsequence must converge to the same $L$. Indeed, as @FShrike showed, the $M_n$ satisfy the equation :

$$\csc \left(\frac{M_n}{2}\right)= n \sin\left(\left(n+\frac{1}{2}\right)M_n\right)\csc^2\left(\frac{nM_n}{2}\right)$$

Thence, any limit point $L$ satisfies $\displaystyle\tan\left(\frac{L}{2}\right) = L$, which has a unique solution in $[0,2\pi]$ which we call $L^{*} \approx 2.331.$

As shown by @Sangchui Lee, $nM_n \in [0,2\pi] $, and so it follows that there is a unique limit point establishing convergence.

Lastly, using @FShrike's final expression for $f_n$ in terms of $M_n$ and continuity, we have that the limit is $\sin(L^*) \approx 0.724$.

$\endgroup$
1
  • $\begingroup$ : ) nicely done. It would be worth mentioning how you derived $\tan(L/2)=L$, I can see it myself using asymptotics but it takes a few steps $\endgroup$
    – FShrike
    Commented Oct 10, 2023 at 15:34
3
$\begingroup$

$$f_n(x) = \sum_{k=1}^{n} \sin(kx) = \csc \left(\frac{x}{2}\right) \sin \left(\frac{n x}{2}\right) \sin \left(\frac{(n+1)x}{2} \right)$$

Computing the first derivative, expanding it as a series around $x=0$ and using power series reversion, the first maximum is given by $$x_{(n)}=\frac 2 {\sqrt{n (n+1)}}\left(1+\frac{2 n^2+2 n-1}{18 n (n+1)} +\frac{104 n^4+208 n^3+12 n^2-92 n+11}{3240 n^2 (n+1)^2} +\cdots\right)$$

Plugging this value in $f_n(x)$ and expanding again for large $n$, making the coefficients rational $$\frac 1n\,f_n(x_{(n)})=\frac{405}{463} \sin ^2\left(\frac{463}{405}\right)+\frac{423}{1168 n}-\frac{205}{1621 n^2}+\frac{205}{3242 n^3}+O\left(\frac{1}{n^4}\right)$$

and

$$\frac{405}{463} \sin ^2\left(\frac{463}{405}\right)=0.72431496\cdots$$

Using this approach, the limit is always in the form of $$\left(\frac{q}{p}\right)\, \sin ^2\left(\frac{q}{p}\right)$$ The sequence formed by $\left(\frac{q}{p}\right)$ being $$\left\{\frac 11,\frac{9}{10},\frac{405}{463},\frac{42525}{49132},\frac{114 8175}{1332587},\frac{3978426375}{4627139098},\frac{46547588587 5}{541933175653},\frac{2327379429375}{2711083979944},\frac{124 63116844303125}{14521821035317853},\frac{351646841762012671875}{409792870507910293814},\frac{22153751031006798328125}{25818990484975251416687},\frac{59615744024439294300984375}{69481921458742666150619372},\cdots\right\}$$

The last of the above list gives $\color{red}{0.72461135}13$

Edit

Starting from @Sangchul Lee's elegant answer (so simple ... after reading it !) we need to solve to $t$ the equation $$t \sin (t)+\cos (t)-1=0$$ By inspection, the solution is close to $t_0=\frac {3}4 \pi$.

The first iterate of Newton method is $$t_{(2)}=\frac {3}4 \pi-\left(\frac{4 \left(1+\sqrt{2}\right)}{3 \pi }-1\right)$$ and $$\frac{1-\cos(t_{(2)})}{t_{(2)}}=\color{red}{0.7246113}24$$

The first iterate of Halley method is $$t_{(3)}=\frac {3}4 \pi-\frac{6 \pi \left(3 \sqrt{2} \pi -4 \left(2+\sqrt{2}\right)\right)}{16 \left(2+\sqrt{2}\right)+3 \pi \left(8-9 \sqrt{2} \pi \right)}$$ and $$\frac{1-\cos(t_{(3)})}{t_{(3)}}=\color{red}{0.7246113537}66$$ I shall not type the first iterate of Householder method $t_{(4)}$ but $$\frac{1-\cos(t_{(4)})}{t_{(4)}}=\color{red}{0.7246113537767}06$$

The next order method (no nma for it) gives $$\frac{1-\cos(t_{(5)})}{t_{(5)}}=\color{red}{0.724611353776708475}28$$

$\endgroup$
2
  • $\begingroup$ Using Lagrange inversion about $\pi$ we get a rather slowly converging (but pretty) expansion in terms of odd reciprocal powers of $\pi$: $t^\ast=\pi-\frac{2}{\pi}-\frac{10}{3 \pi ^3}-\frac{166}{15 \pi ^5}-\frac{4814}{105 \pi^7}-\frac{12410}{63 \pi ^9}-\frac{570}{\pi^{11}}-\frac{990}{\pi ^{13}}-\frac{858}{\pi ^{15}}-\cdots$ $\endgroup$ Commented Oct 12, 2023 at 11:48
  • 1
    $\begingroup$ @AaronHendrickson. Tank you, stranger ! Nice to see you (!!) $\endgroup$ Commented Oct 12, 2023 at 11:49
2
$\begingroup$

A partial answer that makes no progress on the problem itself but just writes down some useful identities that were too long for a comment.


$f$ can be expressed more beautifully and usefully as: $$f(x)=\sin\left(\frac{n+1}{2}\cdot x\right)\sin\left(\frac{n}{2}\cdot x\right)\csc\left(\frac{1}{2}x\right)$$Whereupon easy differentiation and easy but tedious application of trigonometric identities finds: $$f'(x)=\frac{1}{2}\csc^2\left(\frac{1}{2}x\right)\cdot\left(n\cdot\sin\left(\left(n+\frac{1}{2}\right)\cdot x\right)\sin\left(\frac{1}{2}x\right)-\sin^2\left(\frac{n}{2}x\right)\right)$$(taking the continuous extension wherever either expression is not strictly defined).

The roots of $f'$ occur exactly when (note that $f'$ is nonzero at the problematic points where $\sin(x/2)=0$) we have: $$\csc\left(\frac{1}{2}x\right)=n\sin\left(\left(n+\frac{1}{2}\right)x\right)\csc^2\left(\frac{n}{2}x\right)$$The values of $f$ at these points will be: $$n\cdot\frac{\sin\left(\frac{n+1}{2}\cdot x\right)\sin\left(\left(n+\frac{1}{2}\right)\cdot x\right)}{\sin\left(\frac{n}{2}\cdot x\right)}=\frac{n}{2}\cdot\frac{\cos\left(\frac{n}{2}x\right)-\cos\left(\left(\frac{3n}{2}+1\right)\cdot x\right)}{\sin\left(\frac{n}{2}x\right)}$$Dividing by $n$, we care about: $$\lim_{n\to\infty}\max_{x:f'(x)=0}\frac{\sin\left(\frac{n+1}{2}\cdot x\right)\sin\left(\left(n+\frac{1}{2}\right)\cdot x\right)}{\sin\left(\frac{n}{2}\cdot x\right)}$$

$\endgroup$
1
$\begingroup$

Let $f_n(x) = \sum_{k=1}^n \sin{kx}$. Using the geometric series formula (not showing all my work), we find that \begin{align*}f_n(x) &= \frac{\sin{x} + \sin{nx} - \sin{(n+1)x}}{2(1-\cos x)} \\&= \frac{\sin{nx}}{2} + \frac{\sin{x}}{2}\frac{1-\cos{nx}}{1-\cos{x}}\end{align*} where in the last step we used the sine angle identity for $\sin{(n+1)x} = \sin{(nx + x)}$.

The maximum value of $\frac{1}{n} f_n(x)$ is the same as the maximum value of $g_n(z) = \frac{1}{n}f\left(\frac{z}{n}\right)$ (we are just scaling the $x$ axis by a factor of $n$, which doesn't affect the maximum y-value). I claim that as $n\to\infty$ we have $g_n$ converges pointwise to a function $g$; then the answer we seek is the maximum value of $g$. To prove the claim, we evaluate the limit first to get the pointwise limit: \begin{align*}\lim_{n\to\infty} \frac{1}{n}f\left(\frac{z}{n}\right) &= \lim_{n\to\infty} \frac{1}{n}\frac{\sin{z}}{2} + \frac{1}{n}\frac{\sin{\frac{z}{n}}}{2}\frac{1-\cos{z}}{1-\cos{\frac{z}{n}}}\\&\sim \lim_{n\to\infty}\frac{1}{n}\frac{\frac{z}{n}}{2}\frac{1-\cos{z}}{\frac{1}{2}\left(\frac{z}{n}\right)^2}\\&=\frac{1-\cos{z}}{z}\end{align*}

where we can use Taylor expansions in the penultimate step because when $n\to\infty$ we have $\frac{z}{n}\to 0$.

At this point, we need to make an argument about the convergence of $g_n$, simply pointwise convergence isn't enough, unfortunately. I need to think about this further. But this gives us basically the expression for the limiting value of the function, which is our goal.

Therefore, the answer is the maximum value of $g(z)=\frac{1-\cos{z}}{z}$ which others have shown is approximately 0.72461.

$\endgroup$
4
  • $\begingroup$ Although I love the way you decomposed $f_n(x)$, it is not true that $g_n(z)$ converges uniformly to $g(z)$ on all of $\mathbb{R}$. (In general, on $\mathbb{R}$, a periodic function cannot converge uniformly to a non-constant function that vanishes at $\pm\infty$.) What is true is that $g_n(z)\to g(z)$ locally uniformly. Since locally uniform convergence does not necessarily preserve maximum, we need an extra argument to ensure that a maximum point of $g_n$ is localized regardless of $n$. $\endgroup$ Commented Oct 13, 2023 at 17:25
  • $\begingroup$ Argh crud, you're right. My initial comment just left it at pointwise convergence! Oops $\endgroup$ Commented Oct 13, 2023 at 18:53
  • $\begingroup$ How about this: on [0, 2\pi], the sequence definitely converges uniformly. Sangchul Lee's answer above establishes that (one of) g_n's maximum occurs at $x^*_n \in [0, 2\pi]$ (actually an even smaller interval suffices!). Then $lim max g_n(x) = lim g_n(x^*_n)$ and we can apply interchange of lim and max under uniform convergence: math.stackexchange.com/questions/836250/… $\endgroup$ Commented Oct 13, 2023 at 19:14
  • $\begingroup$ Hrngggg I need to re-learn real analysis because I still haven't proven uniform convergence! Argh $\endgroup$ Commented Oct 13, 2023 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .