# Differentiating $\ln\,\Gamma\left(\frac{v}{2}\right)$ wrt $v$

I need to differentiate

$$-\frac{v}{2}\ln(2) - \ln\,\Gamma\left(\frac{v}{2}\right)$$

I did it and got

$$-\frac{\ln(2)}{2} - \frac{\Gamma'(\frac{v}{2})}{\Gamma(\frac{v}{2})}$$

But the answers say it should be

$$-\frac{\ln(2)}{2} - \frac{\Gamma'(\frac{v}{2})}{2\Gamma(\frac{v}{2})}$$

How?

-
For some basic information about writing math at this site see e.g. here, here, here and here. – Américo Tavares Jan 15 '13 at 15:41

## 2 Answers

$$\frac{d}{dv}\left(-\frac{v}{2}\ln 2 -\ln \Gamma \left(\frac{v}{2}\right)\right)=-\frac{1}{2}\ln 2 -\frac{1}{\Gamma(v/2)} \frac{d}{dv} \Gamma\left(\frac{v}{2}\right)\ =$$

$$= -\frac{1}{2}\ln 2 -\frac{1}{\Gamma(v/2)}\cdot \frac{1}{2} \Gamma '\left(\frac{v}{2}\right)\$$

-
So I have to use chain rule to do $\frac{d}{dv} \left( \Gamma \left(\frac{v}{2} \right) \right)$? – Kaish Jan 15 '13 at 15:06
Of course, @Kaish: how else? It is the composition of two functions.\ – DonAntonio Jan 15 '13 at 15:10

Let's $f(u)=\frac{u}{2}$. Then, $$-\frac{v}{2}\ln(2) - \ln\,\Gamma\left(\frac{v}{2}\right)= -\ln(2)\cdot f(u)-\ln\circ \Gamma\circ f(u)$$ By chain rule, \begin{align} \frac{d}{du}\bigg[-\ln(2)\cdot f(u)-\ln\circ \Gamma\circ f(u)\bigg]= & -\ln(2)\cdot \frac{1}{2} \\ -& \bigg( D_z\ln(z)\bigg|_{z=\Gamma\circ f(u)} \bigg) \cdot \bigg(D_y\Gamma(y)\bigg|_{y=f(u)} \bigg)\cdot \bigg( D_x f(x)\bigg|_{x=u} \bigg) \end{align}

-