I am looking into C.Bishop's Pattern Recognition and Machine Learning chapter 10. In section 10.1.1 (p.465) he's proceeding through an analysis of the evidence lower bound which goes on like so:
\begin{align} \mathcal{L}(q) & = \int\prod_{i}q_i\{\ln{p(X, Z)}-\sum_{i}\ln{q_i}\}dZ \\ & = \int q_j\,\{\int{\ln{p(X,Z)}\prod_{i\neq j}}{q_i}\, dZ_i\}\, dZ_j - \int{q_j \ln{q_j} \,dZ_j }\, + const \\ & = \int{q_j\ln{\widetilde{p}(X,Z_j)\,dZ_j}}-\int{q_j \ln{q_j} \,dZ_j }\, + const \end{align}
where $q_j = q_j(Z_j)$
I understand he's working through the equation to finally arrive at the definition of the KL divergence between $\widetilde{p}(X,Z_j)$ and $q_j(Z_j)$, what I cannot wrap my head around is how he got from the first step to the second. Does anyone have any suggestions?