Solution
= Solution
Let $G=\prod_i y_i^{a_i}>0$ be the weighted <geometric mean> and set $x_i=y_i/G$. Since the weights sum to one,
$$
\prod_i x_i^{a_i}=\frac{\prod_i y_i^{a_i}}{G^{\sum_i a_i}}=1.
$$
Part (i) implies $\sum_i a_iy_i/G\geq1$, proving the <weighted arithmetic-geometric mean inequality>:
$$
\boxed{\prod_i y_i^{a_i}\leq\sum_i a_iy_i}.
$$
Equality holds exactly when $x_i=1$ for every $i$, or equivalently when all the $y_i$ are equal.