Q:

Sum of probability differential is zero

I keep seeing:
$$
\sum_i [ln(p_i) + 1]dp_i = \sum_i ln(p_i)dp_i
$$
where $p_i$ is the probability of the $i^{th}$ state and where
$ \sum_i p_i = 1 $
cropping up in my statistical mechanics course. I'm a bit unsure of how one comes to this?
EDIT: A similar result which confuses me is:
$$
\sum_i [ln(Z)] dp_i = 0
$$
where $Z$ is the partition function.

A:

Presumably because we always have $ \sum_i p_i = 1$: if we differentiate this condition,
$$ \sum_i dp_i = 0 $$
so that the total probability remains $1$. It's like $\dot{x} \cdot x = 0 $ when $x$ is forced to lie on a sphere $x \cdot x = R^2$.

