I have the following formula:
$$h(x)=\sum_{R=1}^m \frac{1}{R+1}-1$$
I have re-expressed this (correctly, I hope!) in terms of the harmonic number $H(m)=\sum_{R=1}^m \frac{1}{R}$:
$$h(x)=H(m)+\frac{1}{m+1}-2$$
However, Mathematica insists on simplifying $h(x)$ to
$$\gamma+\psi_0(m+2)-H(m)-2$$
where $\gamma$ is the Euler-Mascheroni constant and $\psi$ is the polygamma function, which various websites tell me is given by $\psi_0(m+2)=\frac{d^1}{d(m+2)^1} \ln \Gamma(m+2)$.
Is there a proof for Mathematica's simplification? And have I summarised it correctly?
I've never worked with gamma functions, so I'd be grateful for help.
You can find this in my notes too, in the section about special functions.
The Mittag-Leffler and Weierstrass theorems about the factorization of entire functions equip us with the nice identity $$ \Gamma(z+1) = e^{-\gamma z}\prod_{n\geq 1}\left(1+\frac{z}{n}\right)^{-1} e^{z/n} \tag{1}$$ which holds uniformly over any compact subset of $\mathbb{C}\setminus\{0,-1,-2,-3,\ldots\}$. It can be proved also through Euler's product formula, which on its turn, if restricted to the positive real line, is a consequence of the definition of the $\Gamma$ function provided by the Bohr-Mollerup theorem, i.e. $\Gamma(x+1)$ is the only log-convex function which fulfills the functional equation $f(x+1)=(x+1)\cdot f(x),\;f(0)=1$, i.e. the "most natural" extension of the factorial function to the positive real numbers. The constant $\gamma$ appearing above stands for $$ \lim_{n\to +\infty} H_n-\log(n) = \sum_{n\geq 1}\left(\frac{1}{n}-\log\left(1+\frac{1}{n}\right)\right)\stackrel{\mathcal{L}^{-1}}{=}\int_{0}^{+\infty}\frac{1}{e^x-1}-\frac{1}{x e^x}\,dx\approx\frac{1}{\sqrt{3}}. \tag{2}$$ If we apply $\frac{d}{dz}\log(\cdot)$ to both sides of $(1)$ and define the Digamma function as $\frac{d}{dz}\log\Gamma(z)=\frac{\Gamma'(z)}{\Gamma(z)}$ we have: $$ \psi(z+1)+\gamma = \sum_{n\geq 1}\left(\frac{1}{n}-\frac{1}{n+z}\right) \tag{3} $$ and if $z\in\mathbb{N}$ the RHS of $(3)$ is a telescopic series, equal to $H_z$ by the combinatorial definition of harmonic numbers. Clearly $H_z = \gamma+\psi(z+1)$ allows to define harmonic numbers with non-integer parameters, and the functional identities for the $\Gamma$ function $$ \Gamma(s)\Gamma(1-s)=\frac{\pi}{\sin(\pi s)},\qquad \Gamma(x+1)=x\cdot\Gamma(x) $$ imply the following functional identities for the Digamma function, by logarithmic differentiation: $$ \psi(s)-\psi(1-s) = -\pi\cot(\pi s),\qquad \psi(s+1)=\frac{1}{s}+\psi(s). \tag{4}$$ We also have duplication and multiplication formulas, and a little gem from Gauss.
They lead to a number of interesting facts, among them: $$ H_{1/2}=2-2\log 2,\qquad \int_{0}^{+\infty}\frac{dx}{1+x^a}=\frac{\pi}{a\sin\frac{\pi}{a}}\quad\forall a>1. \tag{5}$$ By differentiating $(3)$ and invoking creative telescoping, a short proof of Stirling's approximation follows.