The Geometric Mean as a Minimum. This is problem 8.5 from the book "Cauchy Schwarz Master Class":
Problem: Prove that the geometric mean has the representation $$\left(\prod_{k=1}^n a_k \right)^{1/n} = \min\left\{\frac{1}{n} \sum_{k=1}^n a_kx_k:(x_1,\cdots,x_n)\in D\right\},$$
where $a_k \geq 0$ and $D$ is the region of $\mathbb{R}^n$ defined by $$D = \left\{(x_1,\cdots,x_n): \prod_{k=1}^n x_k =1, x_k \geq 0, k = 1,2, \cdots, n\right\}.$$
Question: The author proceeded to use the AM-GM inequality to show that
$$\left(\prod_{k=1}^n a_k \right)^{1/n}  = \left(\prod_{k=1}^n a_kx_k \right)^{1/n} \leq \frac{1}{n}\sum_{k=1}^n a_kx_k,$$and showed that equality occurs when $a_kx_k$ does not depend on $k$. But then the author said that picking $x_k = \frac{a_k}{(\prod\limits_{k=1}^n a_k)^{1/n}}$ yields equality in the AM-GM bound. However, when I plugged this in, $a_kx_k$ is constant iff $a_k$ is constant, which is not given. Am I missing anything here?

Looks like the  equality-yielding definition for $x_k$ is upside down, or an exponent $-1$ is missing on one side. The assertion $a_kx_k=c$ for all $k=1,\ldots n$ leads to
$$
\prod_{k=1}^n a_k\prod_{k=1}^n  x_k = c^n.
$$ Since $\prod_{k=1}^n  x_k=1$, this gives $$c=\left(\prod_{k=1}^n  a_k\right)^{1/n}$$ and
$$
x_k = \frac c{a_k}=\frac{(\prod\limits_{k=1}^n a_k)^{1/n}}{a_k}.$$
