Integration by parts of the $\Gamma(x+1)$ doesn't match answer in book Pattern Recognition and Machine Learning

96 Views Asked by At

I'm working through problem 1.17 in Pattern Recognition and Machine Learning where I'm getting:

\begin{align*} \Gamma(x+1) = & \int_{0}^{\infty} u^{(x+1)-1}e^{-u} \hspace{1mm} du \\ = & \big[-u^x e^{-u} \big]_{0}^{\infty} - \int_{0}^{\infty} e^{-u}xu^{x-1} \hspace{1mm} du & \text{(simplify and integrate by parts*)} \end{align*}

*$f=u^x$, $g_u=e^{-u}$, $f_u= xu^{x-1}$, and $g=\int e^{-u} \hspace{1mm} du$. To solve the integral for $g$: \begin{align*} g= & - \int e^s \hspace{1mm} ds & \text{(substitute $s = -u$ and $-ds = du$)} \\ = & -e^s + C & \text{(by known antidervative)} \\ = & -e^{-u} + C & \text{(substitute $s = -u$)} \end{align*}

The book (in the link above) says the integration by parts results in (notice the plus sign - otherwise equivalent): $$\big[-e^{-u}u^x \big]_{0}^{\infty} \boldsymbol{+} \int_{0}^{\infty} xu^{x-1}e^{-u}$$

I've gone over my work again and again. I can't see where I made a mistake.

1

There are 1 best solutions below

0
On BEST ANSWER

\begin{align} \int_0^\infty u^x e^{-u} \, du & = \int_0^\infty \Big( u^x\Big) \Big( e^{-u} \, du\Big) \\[10pt] & = \underbrace{ \int f\, dg = fg - \int g\,df}_{\large\text{This is integration by parts.}} \end{align}

You have \begin{align} f & = u^x, & & & df & = xu^{x-1}\, du \\ dg & = e^{-u}\, du & & & g & = -e^{-u} \end{align}

So $$ fg - \int f \,dg = \left[ -u^x e^{-u} \vphantom{\frac 1 1} \right]_{u=0}^{u=\infty} -\int_0^\infty (-e^{-u}) xu^{x-1} \,du $$