# Upper bound $f(t,d)$ such that $\sum_{j=1}^{d} cos(2 \pi j \; t) \leq f(t,d)$?

I have a sum of a series of trig function as follows:

$\sum_{j=1}^{d} cos(2 \pi j \; t)$ where t is just a constant.

I am looking for the upper bound $f(t,d)$ such that $\sum_{j=1}^{d} cos(2 \pi j \; t) \leq f(t,d)$. Any idea or link or some papers that I can find hint about this problem will be much appreciated! Thanks ;)

Here, we can assume $t$ is a small number and $t \neq 0$. Thanks a lot!

## 2 Answers

All the cosines are bounded above by 1, so $d$ is an upper bound. It is tight because at $t=0$ the sum has value $d$.

In fact, we can do this sum exactly: multiplying by $\sin{\pi t}$, and using the prosthaphaeresis formula $$2\cos{A}\sin{B} = \sin{(A+B)}-\sin{(A-B)}$$ we have $$\sum_{n=1}^d \cos{2\pi n t}\sin{\pi t} = \frac{1}{2}\sum_{n=1}^d \left(\sin{(2n+1)\pi t}-\sin{(2n-1)\pi t}\right),$$ which we can see telescopes since $2(n+1)-1=2n+1$, and hence we only have the end terms, which are $\sin{(2d+1)\pi t}$ and $-\sin{\pi t}$, giving the result $$\sum_{n=1}^d \cos{2\pi n t} = \frac{\sin{(2d+1)\pi t}}{2\sin{\pi t}}-\frac{1}{2}.$$

Now, to get an upper bound near $t=0$, we can expand this in a power series: for $0<x<\sqrt{6}$, we have $$x-x^3/6<\sin{x}<x,$$ from which we have $$\frac{1}{\pi t} \leqslant \frac{1}{\sin{\pi t}} \leqslant \frac{1}{\pi t-(\pi t)^3/6} = \frac{1}{\pi t} \frac{1}{1-\pi^2 t^2/6},$$ for $\lvert t \rvert <\sqrt{6}/\pi$, and $$\sin{(2d+1)\pi t} \leqslant (2d+1)\pi t,$$ so the whole lot is less than $$\frac{(2d+1)\pi t}{2\pi t}-\frac{1}{2} = d$$

For a less trivial estimate, probably your best bet is keeping the top sine intact, and taking $$\frac{\sin{(2d+1)\pi t}}{2\pi t(1-\pi^2 t^2/6)}-\frac{1}{2}$$ as the upper limit. On the other hand, there are the bounds $x>\sin{x}>\frac{2}{\pi} x$ for $0<x<\pi/2$, which may be of use to you.

For a lower bound, you can expand the Taylor series around $t=0$ up to the negative quadratic term, which is \begin{align*} -&\frac{1}{2}+\frac{(2d+1)\pi t(1-(2d+1)^2\pi^2 t^2/6)+O(t^5)}{2\pi t(1-\pi^2 t^2/6)+O(t^5)} \\ &= -\frac{1}{2}+(d+1/2)\left( 1-\frac{(2d+1)^2\pi^2}{6} t^2+O(t^5) \right) \left( 1+\frac{\pi^2}{6} t+O(t^5) \right) \\ &= d + \frac{\pi^2}{12}(2d+1) \left( 1-(2d+1)^2 \right) t^2 + O(t^4) \\ &= d -\frac{\pi^2}{3}d(d+1)(2d+1) t^2 + O(t^4) \end{align*} (Now, notice the quadratic term looks suspiciously like the sum of the squares? We know perfectly well why that is...)

• Sorry, I forgot to metion $t$ is not zero, we can assume t is a small number, actully $t =t(\epsilon, p)$. I am looking for a upper limit $f(t,d)$ such that $\sum_{j=1}^{d} cos(2 \pi j \; t) \leq f(t,d)$. Thanks – Pew Mar 26 '15 at 4:27
• Thanks! that solved my problem! – Pew Apr 10 '15 at 2:02

(Nothing really original here, though I know my use of $\mathbb{Re}$ for "real part" is wrong.)

$\begin{array}\\ s(d, t) &=\sum_{j=1}^{d} cos(2 \pi j \; t)\\ &=\sum_{j=1}^{d} \mathbb{Re} e^{2 \pi ij t}\\ &=\mathbb{Re}\sum_{j=1}^{d} e^{2 \pi ij t}\\ &=\mathbb{Re}e^{2\pi it}\sum_{j=0}^{d-1} e^{2 \pi ij t}\\ &=\mathbb{Re}e^{2\pi it}\dfrac{e^{2 \pi id t}-1}{e^{2 \pi i t}-1}\\ &=\mathbb{Re}e^{2\pi it}\dfrac{(e^{2 \pi id t}-1)(e^{-2 \pi i t}-1)}{(e^{2 \pi i t}-1)(e^{-2 \pi i t}-1)}\\ &=\mathbb{Re}e^{2\pi it}\dfrac{e^{2 \pi i(d-1) t}-e^{2 \pi id t}-e^{2 \pi i t}+1}{1-(e^{-2 \pi i t}+e^{2 \pi i t})+1)}\\ &=\mathbb{Re}\dfrac{e^{2 \pi id t}-e^{2 \pi i(d+1) t}-e^{4 \pi i t}+e^{2\pi it}}{2-2\cos(2 \pi t)}\\ &=\dfrac{\cos(2 \pi d t)-\cos(2 \pi (d+1) t)-\cos(4 \pi t)+\cos(2\pi t)}{2(1-\cos(2 \pi t))}\\ &=\dfrac{\cos(2 \pi d t)-\cos(2 \pi (d+1) t)-\cos(4 \pi t)+\cos(2\pi t)}{2(2\sin^2( \pi t))}\\ &=\dfrac{\cos(2 \pi d t)-\cos(2 \pi (d+1) t)-\cos(4 \pi t)+\cos(2\pi t)}{4\sin^2( \pi t)}\\ \end{array}$

Since $2t <\sin(\pi t)< \pi t$ (because $\sin(x) > \frac{2x}{\pi}$ for $0 < x < \frac{\pi}{2}$), and all the $\cos$ terms are at most $1$,

$|s(d, t)| \le \frac1{\sin^2(\pi t)} <\frac1{4t^2}$.

You can get better bounds that actually involve $d$ by looking at the differences $\cos(2 \pi d t)-\cos(2 \pi (d+1) t)$ and $\cos(4 \pi t)-\cos(2\pi t)$, but I'll leave that to you.

• Thanks! That solved the problem! – Pew Apr 10 '15 at 2:02