I have a maximization problem as follows:
$$\max_{\mathbf{p}} w\text{ln}\Bigg(\sum_{i=1}^I p_ia_i\Bigg) - \sum_{i=1}^{I}p_id_i, $$
where $p_i \in \{0,1\}$ is binary variable and $\sum_{i=1}^I p_i = 1$. I need to find optimal $p^*_i$, where
$$\mathbf{p}^* = \arg \max_{\mathbf{p}} w\text{ln}\Bigg(\sum_{i=1}^I p_ia_i\Bigg) - \sum_{i=1}^{I}p_id_i$$.
Is there any way to obtain the closed-form of $p^*_i$ as the function of $w$, $a_i$, and $d_i$?
It is just $p_i=[i=i^*]$, where $i^*=\arg\max_i (w\ln a_i-d_i)$. The square brackets here are Iverson notation.