# Order of magnitude for trigonometric sum

Consider the following sum: $$S_N = \sum_{ \substack{ k_1 + k_2 + k_3 =N \\ -(N-2) \leq k_1, k_2 , k_3 \leq N \\ k_1, k_2 , k_3 \neq 0 } } \frac{1}{k_1 k_2 k_3} \sin\left( \frac{k_1\pi}{N} \right) \sin\left( \frac{k_2\pi}{N} \right) \sin\left( \frac{k_3\pi}{N} \right)$$ The summation indexes $$k_1, k_2, k_3$$ are integers that satisfy the restriction $$k_1 + k_2 + k_3 =N$$, and each one of them ranges between $$-(N-2)$$ and $$N$$, but they're also different from $$0$$.

I would be interested to know if there is any way to estimate the order of magnitude of this quantity for arbitrary large $$N$$ (for example, in terms of big O notation). Any reference to papers or books with similar topics would also be appreciated

• Each term is bounded by a constant over N^3, so the sum is bounded by c/N. I have personal reason to believe c is less than 64. Gerhard "Getting Personal With Sum Estimates" Paseman, 2019.11.18. – Gerhard Paseman Nov 18 at 15:44
• If I am not mistaken, you have a total of about 4N^2 terms, each term less than 8/N^3. They are also all positive, so I think the result is bounded by 32/N. Gerhard "Maybe It Is Even Smaller" Paseman, 2019.11.18. – Gerhard Paseman Nov 18 at 18:04
• Also, I believe (and you should prove) that the largest term occurs when the k's are equal, giving a Max of about 17.5/N^3. Further, you should be able to bound more than half the summands by something over N^4. Finally, you can look at how many big terms there are. If there are at least N^(3/2) many, you can get a weak lower bound for your sum of N^(-3/2). Gerhard "Back Of The Envelope Rulez!" Paseman, 2019.11.18. – Gerhard Paseman Nov 18 at 18:16
• Notice that the product of three sinuses can be replaced with just $\frac{-3}{4}\sin(\frac{2k_3\pi}N)$. – Max Alekseyev Nov 19 at 15:09
• @Max, how does that replacement work? In particular, when the k's are nearly equal, I get a positive term. Gerhard "Read The Wrong Sign, Maybe?" Paseman, 2019.11.19. – Gerhard Paseman Nov 19 at 16:06

I believe the problem can be approached from the generating-functions perspective.

First we notice that at least two of the $$k_i$$'s are positive. Based on the symmetry, let's consider the sum with $$k_1,k_2>0$$ and multiply it by 3. This will cover all cases, but the case with all $$k_i>0$$ will be counted thrice. Hence, $$S_N = 3S_N^{(2)} - 2S_N^{(1)},$$ where in $$S_N^{(2)}$$ sums under the assumption $$k_1,k_2>0$$, while $$S_N^{(1)}$$ sums under the assumption $$k_1,k_2,k_3>0$$.

Let me consider $$S_N^{(1)}$$, which takes the form: $$S_N^{(1)} = (\sin\alpha)^3\sum_{k_1+k_2+k_3=N\atop k_1,k_2,k_3>0} \frac{1}{k_1k_2k_3} U_{k_1-1}(\cos\alpha)U_{k_2-1}(\cos\alpha)U_{k_3-1}(\cos\alpha),$$ where $$U_k()$$ are Chebyshev polynomials of second kind and $$\alpha:=\frac{\pi}{N}$$.

From the generating function for Chebyshev polynomials we have $$\sum_{m\geq 1} \frac{U_{m-1}(\cos\alpha)}m t^m =\frac{\arctan\frac{t\sin\alpha}{1-t\cos\alpha}}{\sin\alpha}.$$ Hence, $$S_N^{(1)} = [t^N]\ (\arctan\frac{t\sin\alpha}{1-t\cos\alpha})^3.$$ So, essentially we got the generating function for $$S_N^{(1)}$$. It should be possible to get the asymptotic by standard means (e.g., see Section 5.4 in generatingfunctionology).

UPDATE. Here is yet another (more straightforward) take on the original problem.

Let $$z:=e^{I\frac{\pi}{N}}$$ and notice that $$\sin(k\alpha) = -\frac{I}{2}(z^k - z^{-k})$$, where $$I$$ is the imaginary unit. Taking into account symmetry in summation indices and that $$z^N=-1$$, we get $$\begin{split} S_N &= \frac{I}{8} \sum_{ \substack{ k_1 + k_2 + k_3 =N \\ -(N-2) \leq k_1, k_2 , k_3 \leq N \\ k_1, k_2 , k_3 \neq 0 } } \frac{1}{k_1 k_2 k_3} (z^{k_1}-z^{-k_1}) (z^{k_2}-z^{-k_2}) (z^{k_3}-z^{-k_3})\\ &=\frac{I}{8} \sum_{ \substack{ k_1 + k_2 + k_3 =N \\ -(N-2) \leq k_1, k_2 , k_3 \leq N \\ k_1, k_2 , k_3 \neq 0 } } \frac{1}{k_1 k_2 k_3} \big( (z^{k_1+k_2+k_3}-z^{-(k_1+k_2+k_3)}) - 3(z^{k_1+k_2-k_3}-z^{-(k_1+k_2-k_3)})\big)\\ &=-\frac{3I}{8} \sum_{ \substack{ k_1 + k_2 + k_3 =N \\ -(N-2) \leq k_1, k_2 , k_3 \leq N \\ k_1, k_2 , k_3 \neq 0 } } \frac{1}{k_1 k_2 k_3} (z^{2k_3}-z^{-2k_3}). \end{split}$$

We will need generating functions: $$\sum_{k=1}^{N} \frac{t^k}{k} = \int_0^t dx \frac{1-x^N}{1-x},$$ $$\sum_{k=-(N-2)}^{-1} \frac{t^k}{k} = \sum_{k=2}^{N-1}\frac{t^{k-N}}{k-N} = \int_0^t dx\frac{1-x^{N-2}}{(1-x)x^{N-1}},$$ and sum of the two: $$F_N(t) := \sum_{-(N-2)\leq k\leq N\atop k\ne 0} \frac{t^k}{k} = \int_0^t dx \frac{1-x^{N-2}+x^{N-1}-x^{2N-1}}{(1-x)x^{N-1}}$$

Then $$S_N = -\frac{3I}{8} [t^N]\ F_N(t)^2\big( F_N(z^2t) - F_N(z^{-2}t)\big)$$

• @Amadocta: Your formula does not hold for $t=0$. – Max Alekseyev Nov 19 at 13:47
• OK. Although I don't like the minus sign, I can see replacing the triple sin with a sin 2k3 term now. It seems the minus sign may be needed anyway. Gerhard "That Took Some Brain Sweat" Paseman, 2019.11.19 – Gerhard Paseman Nov 19 at 16:53
• @GerhardPaseman: You are right being suspicious about the minus sign -- I got it wrong. Now, it's corrected. – Max Alekseyev Nov 19 at 17:03

If you apply Gerhard's observation that you can bound each term by $$C/N^3$$ using $$|\sin(x)|\leq|x|$$ we get the following upper bound:

\begin{aligned} |S_N| &\leq \sum_{k_1+k_2+k_3=N\\0<|k_i|\leq N}\frac{\pi^3}{N^3}\\ &\leq\frac{\pi^3}{N^3}\sum_{k_1+k_2+k_3=N\\0<|k_i|\leq N}1\\ &\leq\frac{\pi^3}{N^3}2N^2=\frac{2\pi^3}{N}. \end{aligned}

$$\frac{\sin(x\pi/N)}{x}\geq 0$$ for $$-N\leq x\leq N$$ so this should be a pretty good upper bound, at least asymptotically.

Update: I had the further idea to try to approximate the sum with an integral. Numerical tests showed that this gave a very good approximation.

\begin{aligned} &\sum_{k_1+k_2+k_3=N\\|k_i|\leq N}\frac{\sin(\frac{k_1\pi}{N})\sin(\frac{k_2\pi}{N})\sin(\frac{k_3\pi}{N})}{k_1k_2k_3}\\ &\approx \iiint_{k_1+k_2+k_3=N\\|k_i|\leq N}\frac{\sin(\frac{k_1\pi}{N})\sin(\frac{k_2\pi}{N})\sin(\frac{k_3\pi}{N})}{k_1k_2k_3}\\ &=\iint_{|k_1|,|k_2|\leq N\\|N-k_1-k_2|\leq N}\frac{\sin(\frac{k_1\pi}{N})\sin(\frac{k_2\pi}{N})\sin(\frac{(N-k_1-k_2)\pi}{N})}{k_1k_2(N-k_1-k_2)}\\ &=\iint_{|k_1|,|k_2|\leq N\\0

on substituting $$x_1=\frac{k_1\pi}{N}$$ and $$x_2=\frac{k_2\pi}{N}$$. The integral on the right is independent of $$N$$ and can be evaluated as approximately 3.589. Thus we have

\begin{aligned} S_N\approx \frac{3.589 \pi}{N}=\frac{11.274}{N}. \end{aligned}

I have some numerical tests and this is in very close agreement with the sum for large values of N, with a relative error of less than a few % for $$N$$ bigger than 50 say.

Here is a plot of the approximation in Mathematika:

• I think the last line should be \begin{aligned} |S_N| &\leq \frac{1}{N}\sqrt{\frac{32\log^2(N)}{N}}\\ \end{aligned} as otherwise it is a worse estimate than the one without oscillation – Conrad Nov 18 at 22:02
• @Conrad Thanks for the heads up - I have updated my post to correct this and to add some numerical data. – Ivan Meir Nov 19 at 1:36
• As Gerhard Paseman alludes to in comments on the OP, one can get a better rigorous upper bound, even more quickly, using the inequality $|(\sin y)/y| \le 1$. I recommend redoing the first part of this post. – Greg Martin Nov 19 at 6:46
• @GregMartin Thanks I've updated my post to include this. – Ivan Meir Nov 19 at 9:41
• I got a similar result with a slightly different change of variables $$S_N \approx \frac{1}{N} \int_{-1}^1 \int_{-x}^{2-x} \frac{\sin(x\pi)\sin(y\pi)\sin(\pi -\pi x-\pi y)}{xy(1-x-y)}dydx \approx \frac{8.53819}{N}$$ When I posted the question, I was hoping that the correct answer would turn out to be of order $O\left(\frac{1}{N^2}\right)$ (this is part of a larger problem I'm working on), but it seems pretty clear that it is not the case. – Amadocta Nov 22 at 0:58