Derivative of Rational Function from Lang's Algebra
The key is to generalize the Leibniz rule $(fg)'=f'g+fg'$ to multiple factors: we have $$D\left(\prod_j f_j\right)=\sum_if_i'\prod_{j\neq i}f_j$$ Thus, for $R(X)=c\prod_{j}(X-\alpha_{j})^{m_{j}}$ we have \begin{align} R'(X) &=cD\left(\prod_{j}(X-\alpha_{j})^{m_{j}}\right)\\ &=c\sum_{i}D((X-\alpha_{i})^{m_i})\prod_{j\neq i}(X-\alpha_{j})^{m_{j}}\\ &=c\sum_{i}m_i(X-\alpha_{i})^{m_i-1}\prod_{j\neq i}(X-\alpha_{j})^{m_{j}} \end{align} hence \begin{align} \frac{R'(X)}{R(X)} &=\frac{c\sum_{i}m_i(X-\alpha_{i})^{m_i-1}\prod_{j\neq i}(X-\alpha_{j})^{m_{j}}}{c\left(\prod_{j}(X-\alpha_{j})^{m_{j}}\right)}\\ &=\sum_{i}m_i(X-\alpha_{i})^{m_i-1}\frac{\prod_{j\neq i}(X-\alpha_{j})^{m_{j}}}{\prod_{j}(X-\alpha_{j})^{m_{j}}}\\ &=\sum_{i}m_i(X-\alpha_{i})^{m_i-1}\frac{1}{(X-\alpha_i)^{m_i}}\\ &=\sum_{i}\frac{m_i}{X-\alpha_i}\\ \end{align}