\]
takg the derivative of \(\athcal{l}\) with respect to \(\pi_k\) and settg it to zero:
\[
\frac{\partial}{\partial \pi_k} \athcal{l}(\boldsybol{\pi}, \bda) = \su_{n=1}n \frac{\gaa(z_{nk})}{\pi_k} + \bda = 0
\]
rearrangg the equation, we have:
\[
\su_{n=1}n \frac{\gaa(z_{nk})}{\pi_k} = -\bda
\]
knog that \(\su_{k=1}k \pi_k = 1\), we can write:
\[
\su_{k=1}k \su_{n=1}n \frac{\gaa(z_{nk})}{\pi_k} = -\bda \su_{k=1}k \pi_k = -\bda
\]
th, \(-\bda = n\)
substitute \(-\bda\) back to the previo equation:
\[
\su_{n=1}n \frac{\gaa(z_{nk})}{\pi_k} = n
\]
solvg for \(\pi_k\), we get:
\[
\pi_k = \frac{n_k}{n},
\]
where \(n_k = \su_{n=1}n \gaa(z_{nk})\)
therefore, g the grange ultiplier thod, we have shown that \(\pi_k = \frac{n_k}{n}\) axiizes the given expression while keepg \(\gaa(z_{nk})\) fixed
\newpage
next, let&039;s nsider the axiization with respect to \(\pi_k\) \\
here, we need to fd the derivative of the follog expression with respect to \(\pi_k\), and then solve for \(\pi_k\):
\[
\ln p(\athbf{x} \id \boldsybol{\pi}, \boldsybol{\u}, \boldsybol{\siga}) + \bda \left( \su_{k=1}k \pi_k - 1 \right)