Suppose we have a function $f : \mathbb{N_0} \to \mathbb{R}$ for which we can give an estimate of its values, and say its values $f(n)$ are roughly uniformly distributed for $n$ in some range $[1,N]$. Let $e(x) := e^{2\pi i x}$. Can we give an upper bound for $$ \left| \sum_{n=1}^N e(f(n))\right| \ ? $$
In my case the function $f$ is essentially something of the form $$ f(n) = \int_{0}^1 g(x)e(-nx)dx $$ for some function $g(x)$. My feeling is that knowing the distribution (say roughly uniform) of the values of the function $f$ should say something about how much cancellation we could get from the sum. Thanks a lot.
The trivial bound (from the triangle inequality) is $N$, while if the exponential terms are chosen independently and uniformly at random from the unit circle, then the central limit theorem implies that the sum has size around $\sqrt{N}$ if $N$ is large.
One of the main goals in analytic number theory is trying to realize this square-root cancellation. In general this is very difficult, as one might expect since many big open problems can be reformulated in terms of estimating exponential sums. An important example where square-root cancellation is actually achieved is Weil's bound for Kloosterman sums. The proof uses the algebraic geometry of curves over finite fields.