Digamma Function - Computation and Approximation

Computation and Approximation

According to the Euler Maclaurin formula applied for the digamma function for x, also a real number, can be approximated by

 \psi(x) = \ln(x) - \frac{1}{2x} - \frac{1}{12x^2} + \frac{1}{120x^4} - \frac{1}{252x^6} + \frac{1}{240x^8} - \frac{5}{660x^{10}} + \frac{691}{32760x^{12}} - \frac{1}{12x^{14}} + O\left(\frac{1}{x^{16}}\right)

which is the beginning of the asymptotical expansion of . The full asymptotic series of this expansions is

 \psi(x) = \ln(x) - \frac{1}{2x} + \sum_{n=1}^\infty \frac{\zeta(1-2n)}{x^{2n}} = \ln(x) + \frac{1}{2x} - \sum_{n=1}^\infty \frac{B_{2n}}{2n\, x^{2n}}

where is the kth Bernoulli number and is the Riemann zeta function. Although the infinite sum converges for no x, this expansion becomes more accurate for larger values of x and any finite partial sum cut off from the full series. To compute for small x, the recurrence relation

can be used to shift the value of x to a higher value. Beal suggests using the above recurrence to shift x to a value greater than 6 and then applying the above expansion with terms above cut off, which yields "more than enough precision" (at least 12 digits except near the zeroes).

 \psi(x) \in
(see proof)
 \exp(\psi(x)) \approx \begin{cases} \frac{x^2}{2} &: x\in \\ x - \frac{1}{2} &: x>1 \end{cases}

From the above asymptotic series for you can derive asymptotic series for that contain only rational functions and constants. The first series matches the overall behaviour of well, that is, it behaves asymptotically identically for large arguments and has a zero of unbounded multiplicity at the origin, too. It can be considered a Taylor expansion of at .

 \frac{1}{\exp(\psi(x))} = \frac{1}{x}+\frac{1}{2\cdot x^2}+\frac{5}{4\cdot3!\cdot x^3}+\frac{3}{2\cdot4!\cdot x^4}+\frac{47}{48\cdot5!\cdot x^5} - \frac{5}{16\cdot6!\cdot x^6} + \dots

The other expansion is more precise for large arguments and saves computing terms of even order.

 \exp(\psi(x+\tfrac{1}{2})) = x + \frac{1}{4!\cdot x} - \frac{37}{8\cdot6!\cdot x^3} + \frac{10313}{72\cdot8!\cdot x^5} - \frac{5509121}{384\cdot10!\cdot x^7} + O\left(\frac{1}{x^9}\right)\quad\mbox{for } x>1

(See derivation of all coefficients.)

Read more about this topic:  Digamma Function

Famous quotes containing the word computation:

    I suppose that Paderewski can play superbly, if not quite at his best, while his thoughts wander to the other end of the world, or possibly busy themselves with a computation of the receipts as he gazes out across the auditorium. I know a great actor, a master technician, can let his thoughts play truant from the scene ...
    Minnie Maddern Fiske (1865–1932)