The harmonic-geometric mean inequality is defined as follows $$ \frac{n}{\sum_{i=1}^n \frac{1}{x_i}} \leq (\Pi_{i=1}^{n}x_i)^{\frac{1}{n}}\tag{1} $$
Given the following linear programming problem
$$ \min \sum_{i=1}^n \frac{1}{x_i}\\ \begin{align} \text{s.t} \,\,\,\,\,\,\,& \Pi_{i=1}^{n}x_i=1\\ &x\geq0 \end{align} $$ where $x \in \mathbb{R}^n$. If we set up KKT conditions, we end up with $x =[1, \cdots, 1]^{\top}$ as the optimal point of the optimization. Hence the minimum value is $n$.
Question: using the above result how we can prove $(1)$?
Suppose we have $y_1, \ldots, y_n > 0.$ Define $P = \prod_{i=1}^n y_i$ and $x_i = y_i \cdot P^{-1/n}.$ Then $x_i \geq 0$ and $\prod_{i=1}^n x_i = 1$ so by the result of the optimization problem we have
$$ \sum_{i=1}^n \frac{1}{x_i} \geq n$$
Since $x_i = y_i \cdot P^{-1/n}$ we have
$$\sum_{i=1}^n \frac{P^{1/n}}{y_i} \geq n$$
which rearranges to $$\frac{n}{\sum_{i=1}^n \frac{1}{y_i}} \leq P^{1/n}$$ as required.