I met an equation of the following form:
$$\sum_{i=1}^nk_ip_i e^{-k_i\lambda}~~=~~b,$$
where $p_i\ge 0$, $k_i$ and $b$ are known for $i=1,\cdots, n$. I'd like to know how to find the solution $\lambda$ numerically. Basically, I consider two cases:
1. Assume that $k_i\ge 0$ for all $i=1,\cdots, n$. Then the function $\varphi(\lambda):=\sum_{i=1}^nk_ip_i e^{-k_i\lambda}$ is clearly decreasing and convex on $\mathbb R$. Under this situation, it is known that, for any $b<0$, there is no solution, and for any $b>0$, there is a unique solution. So does there exist some numerical scheme treating the special case?
2. Actually in my problem I can chose $k_i$ with some kind of freedom. So I can simply set $k_i=i/n$ w.l.o.g. and under this situation, solving the equation turns to solve the following polynomial
$$\sum_{i=1}^na_i z^i~~=~~b,$$
where $a_i=ip_i/n$ and $z=e^{-\lambda/n}$. My question is how to solve numerically this polynomial (assuming $b>0$)?
Many thanks for the idea and comment!