Question: i am trying to understand the second step in the formula per below - and how the summation sign $\sum\_{k=1}^K$ splits into the terms 1-$\sum\_{k=1}^{K-1}$ terms. Any help much appreciated

![enter image description here](https://i.stack.imgur.com/Hbd5u.png)

Answer: 
We have that
$$
\sum\limits\_{k=1}^K x\_k=\sum\limits\_{k=1}^K \mathbb{I}(x=k)=1
$$
since $x$ takes on exactly one of the values in $\{1,2,\ldots,K\}$. Therefore, $x\_K=1-\sum\limits\_{k=1}^{K-1} x\_k$. 

Similarly, $\mu\_k=P(x=k)$ and hence $\sum\_{k=1}^K \mu\_k=1$ by the same argument. Thus, we also have $\mu\_K=1-\sum\limits\_{k=1}^{K-1}\mu\_k$.
First, not *'the summation sign splits'* but simply the last term of the sum gets separated:
$$
\sum\limits\_{k=1}^K x\_k \log \mu\_k = \left( \sum\limits\_{k=1}^{K-1} x\_k \log \mu\_k \right) + x\_K \log \mu\_K$$

Then the last term $(x\_K \log \mu\_k)$ gets replaced with equivalent expression, as @StefanHansen explained.