I have to show that $ \sum_1^N \cos(nx) = O(\frac 1{|x|}), [-\pi, \pi] $, x different from 0.
I really don't know how to show that. I obviously know that $\cos(nx)$ is bounded by $1$, I know what big O means, but I have totally no clue for that one. Any hint? Thank you.
We have
$$ \left|\sum_{n=1}^{N} \cos(nx) \right| \leq \sum_{n=1}^{N} |cos(nx)| \leq \sum_{n=1}^{N} 1 = N = N\pi \frac{1}{\pi} \leq N\pi \frac{1}{|x|} $$
for $x \in [-\pi,\pi]$, $x \neq 0$.
More generally, since the sum is bounded by the constant $N$ we can deduce that
$$ \sum_{n=1}^{N} \cos(nx) = O(f(x)) $$
for any function $f$ satisfying $|f(x)| \geq c > 0$ for some constant $c$. In our case we had $c = 1/\pi$.