compute: $\int_{0}^{1}e^x(1-x)^{100}dx$

For what it's worth:

Write $$ t^{100}e^{-t}=t^{100}(1-t+{t^2\over 2!}-{t^3\over 3!}-\cdots ) =t^{100}-t^{101}+{t^{102}\over 2!}-{t^{103}\over 3!}-\cdots $$

The above series is uniformly convergent on $[0,1]$; thus: $$ \eqalign{ \int_0^1 e^{-t}t^{100}\,dt &=\sum_{n=0}^\infty \int_0^1 (-1)^n{t^{100+n}\over n!}\cr &=\sum_{n=0}^\infty (-1)^n{t^{101+n}\over({101+n}) n!}\Bigl|_0^1\cr &=\sum_{n=0}^\infty (-1)^n{1\over({101+n}) n!}. \cr } $$


The integral is exactly the fractional part of $100!\,e$, or in other words $100!\ e-\lfloor100!\ e\rfloor\approx0.00999901019\ldots$

Apply integration by parts to the integral $I_n=\int_0^1e^{1-t}t^n\,dt$ (it's nicer not to pull the $e$ out to the front) and we find for $n\geq1$, $$I_n=-1+nI_{n-1}$$

This gives us $$I_{100}=-1+100[-1+99[-1+98[-1+\cdots+2[-1+1I_0]\cdots]]]$$

$I_0$ is a straightforward computation: $e-1$. So

This gives us $$I_{100}=-1+100[-1+99[-1+98[-1+\cdots+2[-1+e-1]\cdots]]]$$

Here is a nice observation. Once this is multiplied out, it (clearly?) simplifies to $100!\,e-N$ for some integer $N$. A graphical examination of the integral reveals that $I_{100}$ is somewhere between $0$ and $1$. (You could prove this using the fact that $e^{1-t}t^{100}=e^{1-t}tt^{99}\leq t^{99}$ on $[0,1]$.) So $N$ must equal the integer part of $100!\,e$, leaving $I_{100}$ to be the fractional part.


It's interesting to note that since $I_n\to0$ as $n\to\infty$, the fractional part of $n!\,e$ must approach zero; that is, $n!\,e$ gets closer and closer to being an integer. (Although I suppose that is obvious if we consider the usual series expansion for $e$.)


For computational purposes, we can use this to find a decimal approximation by throwing out the first $100$ terms or so (which are all integers) of the series expansion for $100!\, e$.

$$ \begin{align} \int_0^1e^{1-t}t^{100}\,dt & = 100!\, e-\lfloor100!\,e\rfloor\\ & = \sum_{n=101}^{\infty}\frac{100!}{n!} \end{align} $$

This is the series that bgins has found with a slightly different argument. At first, this series converges faster than David Mitra's alternating series. It is correct to at least 17 decimal places after only 8 partial summands. David's requires 18 partial summands to get that much accuracy. However since both series have a ratio of order $1/n$ and David's series is alternating, I think that in the long run for very high accuracy demands, his series might be better.


Use the formula $$ \frac{d}{dx}\left(e^x\ \sum_{n\ge0}\ (-1)^n\ f^{(n)}(x)\right)=e^x\ f(x), $$ which holds if $f$ is a polynomial.