Could anyone point me in the right direction of finding the roots of equations of the form $$ \sum_{i=1}^n a_ie^{f_i(x)}, $$ where $a_i \in \mathbb{R}$ and the $f_i$ are each first degree polynomials $x$, $i = 1,2,\ldots, n$? For example, solve $$ a_1e^{f_1(x)} + a_2e^{f_2(x)} + a_3e^{f_3(x)}+ a_4e^{f_4(x)} = 0 $$ for $x$.
Note that if I can transform it into a linear combination of the $f_i$'s then it is simply root-finding for a first degree polynomial. E.g. for $n=2$, assuming $a_1>0$ and $a_2<0$ we get $$ \begin{align*} a_1e^{f_1(x)} + a_2e^{f_2(x)} = 0 & \iff a_1e^{f_1(x)} = -a_2e^{f_2(x)} \\ & \iff \log(a_1) + f_1(x) = \log(-a_2) + f_2(x) \\ &\iff f_1(x) - f_2(x) = \log(-a_2/a_1), \end{align*} $$ which is easily solved for $x$ since $f_1(x) - f_2(x) \in \mathbb{P}^1$.