numerical methods - How bad is the trapezoid rule in the approximation of $ n! = \int_0^\infty x^n \, e^{-x} \, dx $? - Mathematics Stack Exchange


the gamma function (over $\mathbb{r}$) allows express factorial function euler integral: $$ n! = \int_0^\infty x^n \, e^{-x} \, dx $$ happens if use trapezoid rule on improper integral on right hand side? general functions says: $$ \int_a^b f(x) \, dx \approx (b-a) \left[ \frac{f(a)+ f(b)}{2} \right] $$ can partition $\mathbb{r}_{\geq 0} $ union of segments $[n,n+1]$ on possible integers $n \geq 0$. therefore: $$ a! \approx \sum_{m \geq 0} 1 \cdot \frac{m^a \, e^{-m}+ m^{a+1}e^{-(m+1)}}{2} = - \frac{1}{2} + \sum_{m \geq 0} m^a e^{-m}$$

how bad trapezoid rule in kind of estimate? error term usually:

$$ \left|\; \int_a^b f(x) \, dx \;- \;(b-a) \left[ \frac{f(a)+ f(b)}{2} \right] \; \right| \leq \frac{(b-a)^3}{12}f''(\xi) $$

so each term losing $\frac{1}{12} \times \text{constant}$. can understand error term better?


related: an elementary proof of error estimates trapezoidal rule d. cruz-uribe , c. j. neugebauer


Comments

Popular posts from this blog

analysis of two transistors ib,ic,ie? - Electrical Engineering Stack Exchange

Choosing and replace capacitors for audio amplifier - Electrical Engineering Stack Exchange

sql server 2008 r2 - LogWriter: Operating system error 1117 - Database Administrators Stack Exchange