How to optimize the following with respect to $\lambda_1$ and $\lambda_2$:
$\sum_{i} f(i) \cdot \log(\lambda_1 g(i) + \lambda_2 h(i))$,
where $f(i)$, $g(i)$, and $h(i)$ are known funtions.
Find $\lambda_1$ and $\lambda_2$ that satisfy $\lambda_1 + \lambda_2 = 1$ and maximize the expression.
Is there any close-form solution or algorithm to find them?
If you have as objective function $$\Phi(\lambda_1,\lambda_2)=\sum_{i} f_i * \log(\lambda_1 g_i + \lambda_2 h_i)$$ and, since you want that at solution $\lambda_1 +\lambda_2=1$, extract $\lambda_2$ from this constraint and then consider $$\Psi(\lambda_1)=\sum_{i} f_i * \log\big(\lambda_1 g_i + (1-\lambda_1) h_i\big)$$ Since you want $\Psi$ to be maximum,$$\frac {d\Psi(\lambda_1)}{d\lambda_1}=\sum_{i}\frac {f_i(g_i-h_i)}{\lambda_1(g_i-h_i)+h_i}=0$$ So, you have to solve a single equation for a single unknown. This equation represents a sum of hyperbolas with $i$ asymptotes; so you have many roots but between two hyperbolas, you cane use a root-finder algorithm (what I would suggest is a combination of Newton steps and bissections steps in a permanentely updated interval).
If you want me to elaborate more on this topic, just post. This is the kind of equations I worked for decades.