# Evaluating the Gamma Function with Taylor Series

So, I recently discovered the gamma function, and I was playing around with this variant of it: $$\int_0^\infty{x^z e^{-x}}dx$$ It appears to be impossible to take the antiderivative of this. I looked around, and all I could find were answers for special cases and certain numbers. But for any number "z", how would you perform this integration? The best thing I could think of was creating a taylor series for $$x^z e^{-x}$$ and then integrating that. Would that work, or is there another method I'm missing? (Sorry, calculus noob here.) Thanks!

• You could use recursion. – Tavish May 2 at 20:42
• If $z$ is an integer, integrate by parts $z$ times. – Angela Pretorius May 2 at 20:54
• Thank you so much for all the responses - In the end, I decided to use a riemann sum. – N8Javascript May 2 at 21:30

Do you remember this formula? $$\int a^xdx=\frac{1}{\ln a}a^x+C$$ So $$\int x^zdz=\int e^{z\ln x}dz=\frac{1}{\ln x}x^z+C$$ and hence $$\int \Gamma(z)dz=\int\int_0^\infty x^ze^{-x}dxdz=\int_0^\infty\int x^ze^{-x}dzdx=\int_0^\infty \bigg(\frac{1}{\ln x}x^z+C\bigg)e^{-x}dx=\int_0^\infty \frac{1}{\ln x}x^ze^{-x}dx+C.$$