I'm fairly new to the subject and trying to figure things out. Would be nice to hear some ideas and trickery for what follows.
Suppose we wish to show there exists an integer $x$ in some finite set $S$ and satisfying some prescribed equation $f(x) = c$. One way to do this is by looking at the function $$ \dfrac{1}{N}\sum_{k=1}^N\cos\left(\dfrac{2\pi k(f(x) - c)}{N} \right) = \begin{cases} 1 & \mbox{ if } N \mid (f(x) - c);\\ 0 & \mbox{ otherwise}. \end{cases} $$ Assuming that $f(x) - c$ is bounded, we can pick $N$ large enough so that we get $$ \dfrac{1}{N}\sum_{k=1}^N\cos\left(\dfrac{2\pi k(f(x) - c)}{N} \right) = \begin{cases} 1 & \mbox{ if } f(x) = c;\\ 0 & \mbox{ otherwise}. \end{cases} $$ Thus the number of $x \in S$ satisfying $f(x) = c$ is given by $$ A(S) = \sum_{x \in S}\dfrac{1}{N}\sum_{k=1}^N\cos\left(\dfrac{2\pi k(f(x) - c)}{N} \right). $$ The goal is then to show that $A(S) > 0$ (if this can be done at all).
Using the Taylor series $\cos(z) = \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} z^{2n}$ we get \begin{align*} A(S) &= \sum_{x \in S} \dfrac{1}{N}\sum_{k=1}^N \sum_{n=0}^\infty \dfrac{(-1)^n}{(2n)!} \left( \dfrac{2\pi k(f(x) - c)}{N} \right)^{2n}\\ &= \sum_{x \in S} \sum_{n=0}^\infty \dfrac{(-1)^n}{(2n)!} \left( 2\pi (f(x) - c) \right)^{2n}\dfrac{1}{N^{2n + 1}} \sum_{k=1}^N k^{2n}\\ &= \sum_{x \in S} \sum_{n=0}^\infty \dfrac{(-1)^n}{(2n)!} \left( 2\pi (f(x) - c) \right)^{2n}H_N(2n), \end{align*} where $H_N(t) := \frac{1}{N^{t+1}}\sum_{k=1}^N k^t$. Continuing we get \begin{align*} A(S) &= \sum_{x \in S} \sum_{\substack{n=0\\ n \text{ even}}}^\infty \dfrac{1}{(2n)!} \left( 2\pi (f(x) - c) \right)^{2n}H_N(2n) - \sum_{x \in S} \sum_{\substack{n=1\\ n \text{ odd}}}^\infty \dfrac{1}{(2n)!} \left( 2\pi (f(x) - c) \right)^{2n}H_N(2n)\\ &= \sum_{x \in S} \sum_{n=0}^\infty \left( \dfrac{1}{(4n)!}\left( 2\pi (f(x) - c) \right)^{4n}H_N(4n) - \dfrac{1}{(4n + 2)!}\left( 2\pi k(f(x) - c) \right)^{4n + 2}H_N(4n + 2)\right)\\ &= \sum_{x \in S} \sum_{n=0}^\infty \dfrac{\left( 2\pi (f(x) - c) \right)^{4n}}{(4n)!} \left( H_N(4n) - \dfrac{\left( 2\pi (f(x) - c) \right)^{2}}{(4n+1)(4n + 2)} H_N(4n + 2) \right). \end{align*} Eww. Now we can show that, for $N$ fixed, we have that $H_N(n)$ is decreasing with limit $1/N$ as $n \to \infty$. As $f(x) - c$ is bounded for $x \in S$, then clearly $$ \frac{\left( 2\pi (f(x) - c) \right)^{2}}{(4n+1)(4n + 2)} H_N(4n + 2) \to 0 $$ as $n \to \infty$. However if $f(x) \neq c$, then $$ H_N(4n) - \dfrac{\left( 2\pi (f(x) - c) \right)^{2}}{(4n+1)(4n + 2)} H_N(4n + 2) \leq 0 $$ for every $n \in [0, T]$, for some $T$, while the inequality is strictly reversed for $n > T$. Then we can write $$ A(S) = M(N, T) - R(N, T), $$ where $M(N, T), R(N, T) \geq 0$ are given by \begin{align*} M(N, T) &= \sum_{x \in S} \sum_{n=T+1}^\infty \dfrac{\left( 2\pi (f(x) - c) \right)^{4n}}{(4n)!} \left( H_N(4n) - \dfrac{\left( 2\pi (f(x) - c) \right)^{2}}{(4n+1)(4n + 2)} H_N(4n + 2) \right);\\ R(N, T) &= \sum_{x \in S} \sum_{n=0}^T \dfrac{\left( 2\pi (f(x) - c) \right)^{4n}}{(4n)!} \left( \dfrac{\left( 2\pi (f(x) - c) \right)^{2}}{(4n+1)(4n + 2)} H_N(4n + 2) - H_N(4n) \right). \end{align*} Note that every term of $M, R$ is $\geq 0$. Need to show $M(N, T) > R(N, T)$ for a clever choice of $N, T$. It does not look so bad as the sum for $M(N, T)$ has infinite number of (all) positive terms. But now I stop and wonder if there are some general ideas/techniques that I may be able to use at this point. And if whether any of this is correct... How good should the lower/upper bounds be for, say $\sum_{x \in S} f(x)$ and $\sum_{x \in S}f(x)^2$, in order to get $M(N, T) > R(N, T)$? Is this a good approach? Or am I overcomplicating things? Thanks a lot for any insights. Sorry for the long post!