Sign up ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

How to calculate the following expression:


As I know,

$$\int_0^\infty{\ln(x)x^{k-1}e^{-x}}dx = \Gamma(k)\Psi(k)$$

Are there any way to transfer the integral as expression by digamma, gammaln functions?

Or, are there any fast but also precise enough way to evaluate the integral? Thanks. Matlab's numerical integration directly is not so fast, but if there is a relation with the built in functions such as psi, gammaln, then that'll meet the need.

share|cite|improve this question
Do you want the integral over $x \in [0,u]$ or $x \in [0,\infty)$? L.Silberman's answer addresses the latter. – Noam D. Elkies Nov 28 '11 at 15:47
Yes, and probably "Psi" is matlab's name for the logarithmic derivative. I withdraw my answer. The expectation in question is instead the logarithmic derivative of the <i>incomplete</> gamma function. I think most programs have a built-in for that, so perhaps one thing to try is numerical differentiation of the incomplete gamma function? – Lior Silberman Nov 28 '11 at 17:28
Thanks for your comments, that's still a numerical way, no better than direct solving numerical integral. Ideally, I am looking for an explicit relation with the so called incomplete gamma function(in matlab: gammainc), or other matlab built-in functions such as (psi,gamma,gammaln,etc). Numerical methods whether differentiation w.r.t k of the incomplete gamma or just integration directly are considered just as an alternative then if there are no explicit relations. – user19213 Nov 29 '11 at 10:49

1 Answer 1

Differentiating under the integral sign, the expectation you are looking at is exactly the logarithmic derivative of the gamma function.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.