4

I am working with the log of negative binomial distribution $NegBin(r,p)$. I need to differentiate the following with respect to $r$ such that at the end, I am NOT left with $r$ in factorial form.

$$\frac{d \;log( \Gamma(x + r) )}{dr} = \;\; ?$$

I read about digamma function, but I have $x+r$ within the bracket in my case. Can anyone show me how this can be done ?

user1769197
  • 1,227

1 Answers1

3

As mentioned in this answer, $$ \frac{\mathrm{d}}{\mathrm{d}x}\log(\Gamma(x))=\frac{\Gamma'(x)}{\Gamma(x)}=-\gamma+\sum_{k=1}^\infty\left(\frac1k-\frac1{k+x-1}\right) $$ where $\gamma$ is the Euler-Mascheroni Constant.

It is also mentioned there, that when $x$ is a positive integer, $$ \sum_{k=1}^\infty\left(\frac1k-\frac1{k+x-1}\right)=\sum_{k=1}^{x-1}\frac1k=H_{x-1} $$ where $H_n$ is the $n^\text{th}$ Harmonic Number.


Since you ask about a slightly different form, we simply apply the chain rule: $$ \frac{\mathrm{d}}{\mathrm{d}r}\log(\Gamma(x+r))=-\gamma+\sum_{k=1}^\infty\left(\frac1k-\frac1{k+x+r-1}\right) $$

robjohn
  • 345,667