Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Digamma function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Computation and approximation== The asymptotic expansion gives an easy way to compute {{math|''Ο''(''x'')}} when the real part of {{mvar|''x''}} is large. To compute {{math|''Ο''(''x'')}} for small {{mvar|x}}, the recurrence relation :<math> \psi(x+1) = \frac{1}{x} + \psi(x)</math> can be used to shift the value of {{mvar|x}} to a higher value. Beal<ref>{{cite thesis |first1=Matthew J. |last1=Beal |title=Variational Algorithms for Approximate Bayesian Inference|year= 2003 |type=PhD thesis |publisher= The Gatsby Computational Neuroscience Unit, University College London |pages=265β266 |url=http://www.cse.buffalo.edu/faculty/mbeal/papers/beal03.pdf}}</ref> suggests using the above recurrence to shift {{mvar|x}} to a value greater than 6 and then applying the above expansion with terms above {{math|''x''<sup>14</sup>}} cut off, which yields "more than enough precision" (at least 12 digits except near the zeroes). As {{mvar|x}} goes to infinity, {{math|''Ο''(''x'')}} gets arbitrarily close to both {{math|ln(''x'' β {{sfrac|1|2}})}} and {{math|ln ''x''}}. Going down from {{math|''x'' + 1}} to {{mvar|x}}, {{mvar|Ο}} decreases by {{math|{{sfrac|1|''x''}}}}, {{math|ln(''x'' β {{sfrac|1|2}})}} decreases by {{math|ln(''x'' + {{sfrac|1|2}}) / (''x'' β {{sfrac|1|2}})}}, which is more than {{math|{{sfrac|1|''x''}}}}, and {{math|ln ''x''}} decreases by {{math|ln(1 + {{sfrac|1|''x''}})}}, which is less than {{math|{{sfrac|1|''x''}}}}. From this we see that for any positive {{mvar|x}} greater than {{math|{{sfrac|1|2}}}}, :<math>\psi(x)\in \left(\ln\left(x-\tfrac12\right), \ln x\right)</math> or, for any positive {{mvar|x}}, :<math>\exp \psi(x)\in\left(x-\tfrac12,x\right).</math> The exponential {{math|exp ''Ο''(''x'')}} is approximately {{math|''x'' β {{sfrac|1|2}}}} for large {{mvar|x}}, but gets closer to {{mvar|x}} at small {{mvar|x}}, approaching 0 at {{math|''x'' {{=}} 0}}. For {{math|''x'' < 1}}, we can calculate limits based on the fact that between 1 and 2, {{math|''Ο''(''x'') β [β''Ξ³'', 1 β ''Ξ³'']}}, so :<math>\psi(x)\in\left(-\frac{1}{x}-\gamma, 1-\frac{1}{x}-\gamma\right),\quad x\in(0, 1)</math> or :<math>\exp \psi(x)\in\left(\exp\left(-\frac{1}{x}-\gamma\right),e\exp\left(-\frac{1}{x}-\gamma\right)\right).</math> From the above asymptotic series for {{mvar|Ο}}, one can derive an asymptotic series for {{math|exp(β''Ο''(''x''))}}. The series matches the overall behaviour well, that is, it behaves asymptotically as it should for large arguments, and has a zero of unbounded multiplicity at the origin too. :<math> \frac{1}{\exp \psi(x)} \sim \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} + \cdots</math> This is similar to a Taylor expansion of {{math|exp(β''Ο''(1 / ''y''))}} at {{math|''y'' {{=}} 0}}, but it does not converge.<ref>If it converged to a function {{math|''f''(''y'')}} then {{math|ln(''f''(''y'') / ''y'')}} would have the same [[Maclaurin series]] as {{math|ln(1 / ''y'') β ''Ο''(1 / ''y'')}}. But this does not converge because the series given earlier for {{math|''Ο''(''x'')}} does not converge.</ref> (The function is not [[analytic function|analytic]] at infinity.) A similar series exists for {{math|exp(''Ο''(''x''))}} which starts with <math>\exp \psi(x) \sim x- \frac 12.</math> If one calculates the asymptotic series for {{math|''Ο''(''x''+1/2)}} it turns out that there are no odd powers of {{mvar|x}} (there is no {{mvar|x}}<sup>β1</sup> term). This leads to the following asymptotic expansion, which saves computing terms of even order. :<math> \exp \psi\left(x+\tfrac{1}{2}\right) \sim 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} + \cdots</math> Similar in spirit to the [[Lanczos approximation]] of the <math>\Gamma</math>-function is [[Spouge's approximation]]. Another alternative is to use the recurrence relation or the multiplication formula to shift the argument of <math>\psi(x)</math> into the range <math>1\le x\le 3</math> and to evaluate the Chebyshev series there.<ref>{{cite journal|first1=Jet|last1=Wimp | title=Polynomial approximations to integral transforms|journal=Math. Comp. |year=1961|volume=15|issue=74 |pages=174β178| doi=10.1090/S0025-5718-61-99221-3|jstor=2004225}}</ref><ref>{{cite journal|title=Chebyshev series expansion of inverse polynomials|first1=R. J.|last1=Mathar|journal=Journal of Computational and Applied Mathematics |year=2004|volume=196 |issue=2 |pages=596β607 |doi=10.1016/j.cam.2005.10.013 |arxiv=math/0403344}} App. E</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)