Evaluate: $\int_{0}^{\infty}\left(x^2-3x+1\right)e^{-x}\ln^3(x) dx$

calculusdefinite integralsintegration

$$I=\large \int_{0}^{\infty}\left(x^2-3x+1\right)e^{-x}\ln^3(x)\mathrm dx$$

$$e^{-x}=\sum_{n=0}^{\infty}\frac{(-x)^n}{n!}$$

$$I=\large \sum_{n=0}^{\infty}\frac{(-1)^n}{n!}\int_{0}^{\infty}\left(x^2-3x+1\right)x^n\ln^3(x)\mathrm dx$$

$$J=\int \left(x^2-3x+1\right)x^n\ln^3(x)\mathrm dx$$

We can evaluate $J$ by integration by parts but problem, the limits does not work.

How to evaluate integral $I?$

Best Answer

Here's a way that only requires the identity $\Gamma'(1) = - \gamma$ , since all derivatives of higher order cancel: \begin{align} I &=\int \limits_0^\infty (x^2 - 3x+1) \ln^3 (x) \mathrm{e}^{-x} \, \mathrm{d} x \\ &= \left[\frac{\mathrm{d}^2}{\mathrm{d} t^2} + 3 \frac{\mathrm{d}}{\mathrm{d}t}+1 \right] \int \limits_0^\infty \ln^3 (x) \mathrm{e}^{- t x} \, \mathrm{d} x ~\Bigg\vert_{t=1}\\ &= \left[\frac{\mathrm{d}^2}{\mathrm{d} t^2} + 3 \frac{\mathrm{d}}{\mathrm{d}t}+1 \right] \frac{1}{t} \int \limits_0^\infty \left[\ln^3 (y) - 3 \ln^2(y) \ln(t) + 3 \ln(y) \ln^2(t) - \ln^3 (t)\right] \mathrm{e}^{-y} \, \mathrm{d} y ~\Bigg\vert_{t=1}\\ &= \left[\frac{\mathrm{d}^2}{\mathrm{d} t^2} + 3 \frac{\mathrm{d}}{\mathrm{d}t}+1 \right] \frac{1}{t} \left[\Gamma'''(1) - 3 \Gamma''(1) \ln(t) + 3 \Gamma'(1) \ln^2(t) - \ln^3 (t)\right] ~\Bigg\vert_{t=1} \\ &= 2 \Gamma'''(1) + 6 \Gamma''(1) + 3 \Gamma''(1) + 6 \Gamma'(1) - 3 \Gamma'''(1) - 9 \Gamma''(1) + \Gamma'''(1) \\ &= 6 \Gamma'(1)\\ &= - 6 \gamma \, . \end{align}

In fact, integration by parts yields the following generalisation: \begin{align} \gamma &= \int \limits_0^\infty (-\ln (x)) \mathrm{e}^{-x} \, \mathrm{d} x = \int \limits_0^\infty \frac{-\ln (x)}{x} x \mathrm{e}^{-x} \, \mathrm{d} x \\ &= \int \limits_0^\infty (-\ln (x))^2 \frac{1-x}{2} \mathrm{e}^{-x} \, \mathrm{d} x \\ &= \int \limits_0^\infty (-\ln (x))^3 \frac{x^2 - 3x +1}{6} \mathrm{e}^{-x} \, \mathrm{d} x \\ &= \dots \, \\ &= \int \limits_0^\infty (-\ln (x))^{n+1} \frac{p_n (x)}{(n+1)!} \mathrm{e}^{-x} \, \mathrm{d} x \, . \end{align} The polynomials $p_n$ are defined recursively by $p_0(x) = 1$ and $$p_n (x) = \mathrm{e}^{x} \frac{\mathrm{d}}{\mathrm{d}x} \left(x p_{n-1} (x) \mathrm{e}^{-x}\right) \, , \, n \in \mathbb{N} \, ,$$ for $x \in \mathbb{R}$ . The exponential generating function $$ \sum \limits_{n=0}^\infty \frac{p_n(x)}{n!} t^n = \mathrm{e}^{t+x(1-\mathrm{e}^t)}$$ can actually be computed from a PDE and it turns out that the polynomials are given by $$p_n(x) = \frac{B_{n+1}(-x)}{-x} \, , \, x \in \mathbb{R} \, , \, n \in \mathbb{N}_0 \, , $$ where $(B_k)_{k \in \mathbb{N}_0}$ are the Bell or Touchard polynomials.