Let $a_1,\ldots,a_n \in [0,1], \omega_1,\ldots,\omega_n \in (0,+\infty)$, and define, for every $t \ge 0$, $$ f(t) := \sum_{i = 1}^n a_i \sin(\omega_i t). $$ I'm interested in trying to optimize the coefficients of this function so that the first non-trivial zero is as large as possible. I want to know how this "optimal delay" for the first zero scales with $n$. More precisely, define the first time $T = T(a_1,\ldots,a_n, \omega_1,\ldots,\omega_n) > 0$ such that $f(T) = 0$, and $$ Z_n := \sup T(a_1,\ldots,a_n, \omega_1,\ldots,\omega_n), $$ where the sup ranges over all $a_1,\ldots,a_n \in [0,1], \omega_1,\ldots,\omega_n \in (0,+\infty)$ with the additional normalization constraint that $a_1 = \omega_1 = 1$.

**Question:** What is the rough asymptotic behavior of $Z_n$ as $n$ tends to infinity? E.g., can we find an upper bound which is a power of $n$?

The question can be visualized as concerning the first time when the composition of rotating parts that all start in the horizontal position and move counterclockwise stops being above the horizontal axis.

An easy lower bound of the form $Z_n \ge cn$ can be obtained by choosing $a_2,\ldots,a_n = 1$ and $\omega_2,\ldots,\omega_n \simeq n^{-1}$.