I am trying to find $$\hat{t}=\underset{t \in [a,b]}{\text{argmax}}\,\left|\sum_{j=1}^n e^{i x_j t}\right|$$ where $t$ is a real number, $[a,b]$ is a given interval, $i$ is $\sqrt{-1}$, and $x_j$ are arbitrary real numbers.
My goal is efficient and accurate numerical computation of $\hat{t}$, so I don't necessarily need a simple formula.
What I've been doing is binning the $x_j$ values (that is, counting the number found in equally spaced intervals), taking a fast Fourier transform of the counts, and searching though the resulting vector for its maximum on the given interval. My question is: is there a better way?
In case the size of the sum turns out to matter, I'll add that in my applications, $n$ is typically around a hundred.
I think this problem could be formulated as maximizing the $L_1$ norm of you given vector. This could be formulated as a nonlinear optimization problem with constraints.