3
$\begingroup$

What is the best method to calculate the value of digamma and trigamma functions? Wikipedia suggests using recurrence relations

$\psi_0(x+1) = \psi_0(x) + 1/x$, $\quad\psi_1(x+1) = \psi_1(x) - 1/x^2$

to make $x$ big enough, and then evaluating corresponding power series up to a certain term

$\psi_0(x) = \ln x - 1/2x - \sum\limits_{n=1}^{\infty} \dfrac{B_{2n}}{2n \cdot x^{2n}}$

$\psi_1(x) = 1/x + 1/2x^2 + \sum\limits_{n=1}^{\infty} \dfrac{B_{2n}}{x^{2n+1}}$

However, these series do not converge absolutely (moreover, $n$'th term tends to infinity, since $B_{2n}$ grows very fast), and I wasn't able to find any way to estimate residuals and relative errors.

  • 0
    I'd start by differentiating the Lanczos approximation for $\log\Gamma$.2012-09-20

1 Answers 1

1

Here is a reference. I hope it is helpful.