For non-zero $a_1, a_2, \ldots , a_n$ and for $\alpha_1, \alpha_2, \ldots , \alpha_n$ such that $\alpha_i \neq \alpha_j$ for $i \neq j$, show that the equation $$a_1e^{\alpha_1x} + a_2e^{\alpha_2x} + \cdots + a_ne^{\alpha_nx} = 0$$ has at most $n - 1$ real roots.
I thought of applying Rolle's theorem to the function $f(x) = a_1e^{\alpha_1x} + a_2e^{\alpha_2x} + \cdots + a_ne^{\alpha_nx}$ and reach a contradiction, but I can't find a way to use it.