|   | 1 |  initial version  | 
This might only partially answer your question, but hopefully it helps.
Declaring a and b to be positive integers:
sage: a, b = SR.var('a, b', domain='positive')
sage: assume("a, b, 'integer'")
sage: assumptions()
[b > 0, a > 0, a is integer, b is integer]
and declaring f as a function of a single variable
sage: f(x) = x^(a - 1) * e^(-b*x)
we get:
sage: f.integrate(x, 0, oo)
gamma(a)/b^a
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.